-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Editor: Unify the Editor Mode preference. #57642
Conversation
Size Change: +3.82 kB (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
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.
Looks good, thanks!
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.
Do we also need to update legacy storage data migration?
gutenberg/packages/preferences-persistence/src/migrations/legacy-local-storage-data/index.js
Lines 58 to 62 in 1451d8a
data = moveIndividualPreference( | |
data, | |
{ from: 'core/edit-post', to: 'core/edit-post' }, | |
'editorMode' | |
); |
gutenberg/packages/preferences-persistence/src/migrations/legacy-local-storage-data/index.js
Lines 79 to 83 in 1451d8a
data = moveIndividualPreference( | |
data, | |
{ from: 'core/edit-site', to: 'core/edit-site' }, | |
'editorMode' | |
); |
No, because I believe the editor migration is applied on top of this one (as seen in the unit tests) |
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.
Do we also need to update legacy storage data migration?
No, because I believe the editor migration is applied on top of this one (as seen in the unit tests)
I see, I think there's no problem in that case 👍
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.
Late to the party but this LGTM 👍
Unit tests are passing and it manually tests well across the site and post editors.
Related #52632
Similar to #57468
What?
This PR continues the work on the great unification between post and site editors. In this PR we're unifying the "editor mode" preference. If the user enables the code editor in the post editor, the setting should be used in the site editor as well.