Skip to content
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

#9209: eliminate new standalone mod components from Page Editor UI via "unsaved" mods #9219

Merged
merged 22 commits into from
Oct 6, 2024

Conversation

BLoe
Copy link
Contributor

@BLoe BLoe commented Oct 1, 2024

What does this PR do?

Remaining Work

Product/Design micro-decisions

cc @Pashaminkovsky

  • When a starter brick is picked from the menu and a new, "unsaved" mod is created, it will default to the name/label "New Mod," with a number added, counting up from 1, to avoid duplicates. So, e.g. "New Mod," "New Mod 1," "New Mod 2," etc.
  • A mod component cannot be deleted or moved to another mod if it is the only component in the mod

Future Work

For more information on our expectations for the PR process, see the
code review principles doc

@BLoe BLoe self-assigned this Oct 1, 2024
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 55.22388% with 120 lines in your changes missing coverage. Please review.

Project coverage is 74.75%. Comparing base (8318d74) to head (38f890a).
Report is 339 commits behind head on main.

Files with missing lines Patch % Lines
src/pageEditor/hooks/useCreateModFromUnsavedMod.ts 29.16% 51 Missing ⚠️
...geEditor/modListingPanel/modals/CreateModModal.tsx 8.82% 31 Missing ⚠️
src/pageEditor/hooks/useAddNewModComponent.ts 26.08% 17 Missing ⚠️
src/pageEditor/hooks/useSaveMod.ts 82.14% 10 Missing ⚠️
src/pageEditor/store/editor/editorSelectors.ts 55.55% 4 Missing ⚠️
src/pageEditor/hooks/useCreateModFromMod.ts 85.71% 3 Missing ⚠️
.../pageEditor/tabs/modMetadata/ModMetadataEditor.tsx 66.66% 3 Missing ⚠️
src/pageEditor/modListingPanel/ModComponents.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9219      +/-   ##
==========================================
+ Coverage   74.24%   74.75%   +0.51%     
==========================================
  Files        1332     1368      +36     
  Lines       40817    42356    +1539     
  Branches     7634     7914     +280     
==========================================
+ Hits        30306    31665    +1359     
- Misses      10511    10691     +180     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Oct 1, 2024

Playwright test results

passed  131 passed
flaky  3 flaky
skipped  4 skipped

Details

report  Open report ↗︎
stats  138 tests across 45 suites
duration  11 minutes, 42 seconds
commit  38f890a
info  For more information on how to debug and view this report, see our readme

Flaky tests

chrome › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
msedge › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
msedge › tests/runtime/modVariables/variableSync.spec.ts › Mod Variable Sync › session variable cross-tab sync

Skipped tests

chrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
msedge › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
msedge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

@@ -75,7 +75,8 @@ describe("useCreateModFromModComponent", () => {
});
});

it("does not throw an error if the mod fails the compareModComponentCounts check", async () => {
// eslint-disable-next-line jest/no-disabled-tests -- Unclear if we need this test anymore
it.skip("does not throw an error if the mod fails the compareModComponentCounts check", async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we should either validate that we do need these now or delete them. Otherwise, I think they're just going to end up being left skipped

Copy link
Contributor Author

@BLoe BLoe Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update the comment, I meant that I think I need to finish the entire project and then see if it still makes sense to have this test and update it to work, or if we should delete it.

Copy link
Contributor

@twschiller twschiller Oct 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those tests are no longer relevant because the hook doesn't call the methods because there's no original/"source" mod

@twschiller twschiller assigned twschiller and unassigned BLoe Oct 6, 2024
@twschiller twschiller changed the title #9209 Implement "unsaved" mods #9209: eliminate standalone mod components from Page Editor via "unsaved" mods Oct 6, 2024
@twschiller twschiller enabled auto-merge (squash) October 6, 2024 17:15
@twschiller twschiller changed the title #9209: eliminate standalone mod components from Page Editor via "unsaved" mods #9209: eliminate standalone mod components from Page Editor UI via "unsaved" mods Oct 6, 2024
@twschiller twschiller merged commit c3648a0 into main Oct 6, 2024
20 checks passed
@twschiller twschiller deleted the feature/9209-implement-unsaved-mods branch October 6, 2024 17:39
@twschiller twschiller changed the title #9209: eliminate standalone mod components from Page Editor UI via "unsaved" mods #9209: eliminate new standalone mod components from Page Editor UI via "unsaved" mods Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request page editor user experience Improve the user experience (UX)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement "unsaved mods" with @inner registry IDs - Slice 2
4 participants