Ensure that insertUsage is always present in preferences#14706
Merged
Conversation
aduth
approved these changes
Mar 29, 2019
Member
There was a problem hiding this comment.
I am approving, but at the same time I don't think we need or want this:
- Don't need: I can't reproduce the testing instructions causing an error in the master branch, and I wouldn't think it should, since the migration doesn't ever remove the preference from the
core/editorstore. If the point is about it affecting earlier versions, changing it here doesn't matter since it won't help those earlier versions. - Don't want: We should be skeptical toward anytime we'd ask "How long do we want to keep this dead code?" and the answer would be "I dunno, I guess forever?", which is how I feel toward this. Otherwise, it becomes a burden for future maintainers (and perhaps even a source of future bugs).
As it impacts Monday's Gutenberg 5.4 RC, it can be safe to merge, and we can continue the discussion afterward, since if we later decide it won't hurt to not have the preference, we could similarly safely remove it in the future.
Member
Author
|
I think that it might be also necessary to toggle on/off Publish panel between steps 3 and 4 to trigger saving editor preferences in the local storage. I will try again on Monday with screencast recording enabled, I will merge this change only if I’m able to reproduce on master. |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Follow-up for #14691. Another fix for #14580 :)
I did some more testing with
masterbranch and discover another case when an older version of Gutenberg explodes.Testing instructions:
localStorage.clear()in your Developer Tools ConsoleinsertUsagepreference fromcore/editor.