Remove custom layout declarations. #414
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.
Fixes #389
This PR removes the custom Layout object that modifies internal Gutenberg functionality to allow custom block alignments.
Gutenberg supports full width alignments when
add_theme_support('align-wide')
is added to a theme. We have that included in ourfunctions.php
which is why the full-width alignments show up when adding blocks on a new post/page. However,new-pattern
uses our own import of theEditor/BlockEditor
and therefore behaves differently. The problem here was solved in two steps:supportsLayout
tofalse
for the block editor.Considerations
supportsLayout
going to cause problems in the future since it's a forward-leaning feature?Screenshots
Enabled on Image Block
Enabled on Group Block
How to test the changes in this Pull Request:
new-pattern
Reading/Code References