-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Gallery block: turn on auto-migration of v1 Gallery blocks to v2 format when edited #36191
Merged
glendaviesnz
merged 30 commits into
trunk
from
update/gallery-block-disable-v2-when-useBalanceTags-set
Dec 1, 2021
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
af87cc0
Update experimental flag to block sites with use_BalanceTags option e…
09077a8
Remove update gallery modal
69b0899
Add check for gallery v2 compat to editor init so it is available whe…
ea46fd4
Remove references to gallery experimental flag
d1743b6
Revert "Remove references to gallery experimental flag"
cba6433
Abstract out the check for v2 gallery support and use the existing ex…
6e6e643
Add missing transformation updates
5e8db76
Update fixture to be compat with v2 of gallery block
40af59f
Fix unit tests
f5bed90
Fix issue with link destination not being set when block migrated
6cbc1f7
Check that we have a v1 gallery block before we send content through …
e79cdbe
Use `window.wp` global instead of store for gallery flag
mkevins 857d01b
Remove unnecessary destructuring
mkevins 970f717
Move the setting of wp.galleryBlockV2Enabled to directly after wp-dom…
2054a31
Add optional chaining operator to prevent error if images attribute n…
3b416e8
Simplify deprecations, etc. by always using using v1 methods if use_b…
d191bcb
Fix potential issue with attributes not being returned from v6 deprec…
7700d5c
Move assignment of gallery global flag to native Editor
mkevins 9f06d77
Move mocking of the galleryBlockV2Enabled flag to the jest globals file
9774355
Explicitly check for galleryBlockV2Enabled being false and default to…
5bc1aa2
Fail early if window.wp.galleryBlockV2Enabled is not a boolean
de9d187
Default to `true` for gallery flag when not yet cached
mkevins 9504e11
Only update gallery flag if fetch result is explicitly boolean
mkevins a6bfee5
Update editor settings response to the editor to include gallery flag
mkevins f2df281
Leave gallery flag `undefined` when not cached
mkevins 2226e57
Update the wording of the mobile warning
06b540c
Add filter to prevent use_balanceTags being enabled on WP < 5.9
ad7ec30
Switch to using settings_error for use_balanceTags notice
cff2300
Add a CLI error message
c752d64
Fix linting error
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Not a biggie, but would it possible to strip or replace the HTML entities for the CLI?
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.
The chance of somebody toggling on this option via CLI with gutenberg 12.1+ on WP < 5.9 is so slim as to not warrant the bother of adding a string replace method here in my view.
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.
Sounds fair enough to me 👍