-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#9433: mod commit message modal #9520
Conversation
return false; | ||
} | ||
|
||
if (!isModEditable(editablePackages, sourceModDefinition)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to SaveModVersionModal
applications/browser-extension/src/pageEditor/store/editor/editorSlice.ts
Outdated
Show resolved
Hide resolved
applications/browser-extension/src/pageEditor/modListingPanel/modals/SaveModVersionModal.tsx
Show resolved
Hide resolved
Playwright test resultsDetails Open report ↗︎ Flaky testschrome › tests/pageEditor/copyMod.spec.ts › run a copied mod with a built-in integration Skipped testschrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options |
error, | ||
}); | ||
} | ||
dispatch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are enforcing a save version modal on all mod saves after the initial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open for discussion, the PRD is still in brainstorming. Just wanted to get a head start on things: https://www.notion.so/pixiebrix/Create-View-mod-commit-messages-in-the-Page-Editor-13c43b21a25380bdaa16e086f6dcf626?pvs=4#13c43b21a253801eab9cd47c56934e97
An alternative would be to show it if the user has changed the version number, or if the server responds that the version needs to be bumped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: yes, we're giving always show + auto-increment patch version a try. See thread on behavior here: https://www.notion.so/Create-View-mod-commit-messages-in-the-Page-Editor-13c43b21a25380bdaa16e086f6dcf626?d=13c43b21a25380649234001c79a1dc51&pvs=4#10ee2f15bc6f42d6a94aac438f7c8256
@@ -336,30 +335,3 @@ describe("useSaveMod", () => { | |||
expect(notify.error).not.toHaveBeenCalled(); | |||
}); | |||
}); | |||
|
|||
describe("isModEditable", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New modal
@@ -124,59 +117,3 @@ export function validateRegistryId(id: string | undefined): RegistryId { | |||
|
|||
throw new Error("Invalid registry id"); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted there to their own file to make them easier to find
describe("useSaveMod", () => { | ||
function setupModDefinitionMocks( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to SaveModVersionModal test file
3b645f5
to
7deff60
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9520 +/- ##
==========================================
+ Coverage 74.24% 75.81% +1.57%
==========================================
Files 1332 1429 +97
Lines 40817 43147 +2330
Branches 7634 7935 +301
==========================================
+ Hits 30306 32714 +2408
+ Misses 10511 10433 -78 ☔ View full report in Codecov by Sentry. |
@extension-e2e-test-unaffiliated/new-mod-00000000-0000-0000-0000-000000000000 | ||
name: New Mod | ||
- version: 1.0.4 | ||
+ version: 1.0.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional lines are added to the diff as context around the actual change
@@ -264,14 +265,12 @@ export const appApi = createApi({ | |||
}), | |||
updateModDefinition: builder.mutation< | |||
PackageUpsertResponse, | |||
{ packageId: UUID; modDefinition: UnsavedModDefinition } | |||
{ packageId: UUID; modDefinition: UnsavedModDefinition; message?: string } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RTK Query change
@@ -71,6 +71,31 @@ function useModPackageVersionsQuery( | |||
}, [modId, editablePackage, packageVersionsQuery, editablePackagesQuery]); | |||
} | |||
|
|||
const PackageVersionRow: React.VFC<{ version: PackageVersionDeprecated }> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is replaced with PaginatedTable in the next PR: #9527
applications/browser-extension/src/pageEditor/hooks/useSaveMod.ts
Outdated
Show resolved
Hide resolved
When the PR is merged, the first loom link found on this PR will be posted to |
What does this PR do?
Discussion
Demo
https://www.loom.com/share/9112b6619b5e46d6b9094936928c248c?sid=a64aedf2-c9fe-4bc0-9f01-0b8f3b15aaa3
Remaining Work
pixiebrix-extension/applications/browser-extension/src/pageEditor/panes/ModEditorPane.tsx
Line 87 in c2fb6c9
Future Work
testIsSemVerString
allowing pre-release and build metadata.1.2.3-beta.1+321
passes the check. (Would be rejected server-side though)For more information on our expectations for the PR process, see the
code review principles doc