Add full and wide align controls to Query and Query Pagination blocks#29289
Add full and wide align controls to Query and Query Pagination blocks#29289ntsekouras wants to merge 3 commits into
full and wide align controls to Query and Query Pagination blocks#29289Conversation
| } ), | ||
| } ); | ||
| }; | ||
| if ( align ) extraBlockProps[ 'data-align' ] = align; |
There was a problem hiding this comment.
why d we need this? Isn't it done automatically in the hooks?
| } | ||
| } | ||
| if ( isset( $block->context['align'] ) ) { | ||
| $classnames .= " align{$block->context['align']}"; |
There was a problem hiding this comment.
Isn't this something that can be applied automatically by the the support flag?
There was a problem hiding this comment.
Check my comment about the attributes. This is what we had discussed about layout as well, so align goes to Query now.
|
Size Change: +103 B (0%) Total Size: 1.38 MB
ℹ️ View Unchanged
|
|
Agreed with the followup comment — we'd need to figure out what absorb in toolbar and passthrough mean in terms inner block properties. Making a wrapper be invisible or partially invisible (in the context of not affecting layout) is one of the oldest issues in #7694 |
carolinan
left a comment
There was a problem hiding this comment.
I have nothing to add to the code review.
The PR solves the problem described in the issue.
Full width and wide blocks inside a query loop appear with the correct widths inside the editor.
3a32bee to
cf38730
Compare
aristath
left a comment
There was a problem hiding this comment.
This looks OK to me, it just needs to be rebased before merging 👍
|
Thanks for reviewing!
Besides rebase and a small change to the selectors (not use |
PR has been merged so I assume this PR can be rebased and adjusted and then merged. |
Yes, it must be in combination with adding a wrapper for Query block. |
|
Closing in favor of: #30804 |
Description
Related: #27589
This PR adds
full and widealign support toQuery/QueryLoopandQuery Paginationblocks.Ideally we would want to handle this with a mechanism for
absorbingthe toolbar of nested block wrappers as described in this issue: #7694.That's why I haven't used the
supports.aligninQueryLoopand created an adhoc toolbar control foraligninQueryblock. This is a UI choice for better user experience.How has this been tested?
Manually by adding
QueryandQuery Paginationblocks and try different combinations ofalignoptions.Checklist: