Tiled gallery block: remove gallery shortcode transform #30756
Merged
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.
Currently, all
[gallery]
shortcodes end up transforming to Tiled gallery, regardless if they were Tiled galleries originally and if they have required attributes (ids
).The same short-code could be for different plugins like “Flickr gallery” or for Jetpack slideshows.
It's less confusing to let all those shortcodes transform to core gallery, which can easily be converted back to Tiled Gallery Slideshow blocks.
Keeping the shortcode for all the different gallery shortcode implementations requires us to maintain the transform, vs just core gallery taking care of it.
Once we can limit the shortcode transform to
[gallery layout="our-layouts-only" ids="these-must-exist"]
, it’s just a matter of copypasting it back.Relevant core issues: WordPress/gutenberg#10674, WordPress/gutenberg#11551
Related to https://github.com/Automattic/wp-calypso/issues/30723
Not sure if relevant, but marking for visibility: #26140
Changes proposed in this Pull Request
[gallery]
shortcode transform.Testing instructions
[gallery]
shortcode in the block editor