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 navigation blocker in editorial workflow #6981

Merged
merged 5 commits into from
Nov 23, 2023

Conversation

demshy
Copy link
Member

@demshy demshy commented Nov 17, 2023

Summary

Issue discovered here: #6964

After upgrade to React 18, when saving a new entry using editorial workflow, an unnecessary navigation blocker appeared before navigating to the new entry. By choosing cancel this lead to a bunch of problems.
There was actually a problem with a dispatch not being awaited, therefore when navigation blocker display condition was checked, the state was still set as persisting. Seems like excessive re-renders in previous versions of React somehow masked the issue.

Test plan

Checklist

Please add a x inside each checkbox:

A picture of a cute animal (not mandatory but encouraged)

Copy link

netlify bot commented Nov 17, 2023

Deploy Preview for decap-www canceled.

Name Link
🔨 Latest commit 0856799
🔍 Latest deploy log https://app.netlify.com/sites/decap-www/deploys/655e1f850330ce0008829d4a

Copy link

netlify bot commented Nov 17, 2023

Deploy Preview for cms-demo ready!

Name Link
🔨 Latest commit 0856799
🔍 Latest deploy log https://app.netlify.com/sites/cms-demo/deploys/655e1f85d063ee0008fcf94f
😎 Deploy Preview https://deploy-preview-6981--cms-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@demshy demshy force-pushed the fix/editorial-worflow-dialog branch from 91f8fe4 to c8a7e73 Compare November 17, 2023 09:20
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Nov 17, 2023
martinjagodic
martinjagodic previously approved these changes Nov 17, 2023
martinjagodic
martinjagodic previously approved these changes Nov 17, 2023
@martinjagodic martinjagodic merged commit 9495479 into master Nov 23, 2023
21 of 22 checks passed
@martinjagodic martinjagodic deleted the fix/editorial-worflow-dialog branch November 23, 2023 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants