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

Fix the form state cleanup related to standalone mod component migration #9002

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

BLoe
Copy link
Collaborator

@BLoe BLoe commented Aug 12, 2024

What does this PR do?

  • We were accidentally removing all "unsaved" form states because they do not have a corresponding activated mod component in the mod component redux slice, this fixes that problem

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

@BLoe BLoe self-assigned this Aug 12, 2024
@BLoe BLoe marked this pull request as ready for review August 12, 2024 14:47
@twschiller twschiller added this to the 2.1.0 milestone Aug 12, 2024
@twschiller twschiller added bug Something isn't working regression labels Aug 12, 2024
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 74.37%. Comparing base (8318d74) to head (57e0aea).
Report is 172 commits behind head on main.

Files Patch % Lines
...itor/hooks/useMigrateStandaloneComponentsToMods.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9002      +/-   ##
==========================================
+ Coverage   74.24%   74.37%   +0.12%     
==========================================
  Files        1332     1353      +21     
  Lines       40817    41898    +1081     
  Branches     7634     7828     +194     
==========================================
+ Hits        30306    31162     +856     
- Misses      10511    10736     +225     

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

Comment on lines +42 to +44
if (activatedModComponent == null) {
// We shouldn't touch "unsaved" form states that do not have a corresponding activated mod component
return;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: This whole concept will be going away soon in an upcoming project phase, when we update the page editor mods list UI and remove the ability to create new standalone mod components in the page editor front end.

Copy link

github-actions bot commented Aug 12, 2024

Playwright test results

passed  118 passed
flaky  4 flaky
skipped  6 skipped

Details

report  Open report ↗︎
stats  128 tests across 43 suites
duration  12 minutes, 34 seconds
commit  57e0aea
info  For more information on how to debug and view this report, see our readme

Flaky tests

chrome › tests/modLifecycle.spec.ts › create, run, package, and update mod
chrome › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
edge › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod
chrome › tests/runtime/sidebar/sidebarActivation.spec.ts › initiates sidebar mod activation from activate url click

Skipped tests

chrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
edge › 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
edge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
chrome › tests/runtime/insertAtCursor.spec.ts › Insert at Cursor › 8154: can insert at cursor after opening sidebar from selection menu
edge › tests/runtime/insertAtCursor.spec.ts › Insert at Cursor › 8154: can insert at cursor after opening sidebar from selection menu

Copy link
Collaborator

@grahamlangford grahamlangford left a comment

Choose a reason for hiding this comment

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

Approving, but we should include some testing to prevent a regression (Playwright or Jest)

Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@BLoe BLoe enabled auto-merge (squash) August 12, 2024 19:02
@BLoe BLoe merged commit 4fc082c into main Aug 12, 2024
25 checks passed
@BLoe BLoe deleted the bug/fix-persist-migrations-for-standalone-mods branch August 12, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants