[TEST] Gutenberg - Add support for full width/wide alignment options#14679
[TEST] Gutenberg - Add support for full width/wide alignment options#14679
Conversation
Generated by 🚫 dangerJS |
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
@geriux this is looking really solid. Nice work! A few things I am seeing when testing the latest build on WPiOS:
I will be doing another round of review this weekend or on Monday, but I wanted to take it for a quick spin before shutting down for the week 😄 Awesome work thus far, can't wait to get this rolling! |
Hey @iamthomasbishop Thank you for giving it a first review!
A new build is being made now that fixes the above issue =)
The Group block appender will be fixed in the latest build. Thanks for catching that!
These blocks aren't taking up the available space because it's
For this first iteration, we'll go with Group, Cover, and Image while we work adding support for Columns.
Thanks for testing! If you haven't started that second round, could you please do it with the new build? Thanks a lot! |
|
@geriux Thanks for the quick fixes and the updated build!
This is a tiny thing and I should've thought of it when making my proposal, but a side-effect of the 1px negative margins is that the border now gets cut off by the safe area on phone in landscape orientation. Here is a screenshot for reference. The change looks great on portrait orientation and on tablet. 👍
Has been fixed, indeed. Thank you!
Ahh, that's right. Thanks for the clarification. Nesting spacing/sizingThe only other thing that's standing out to me at the moment is how we're spacing nested blocks (the ones that support wide/full-widths, at least). This might be a non-issue that we leave as-is, because I think themes handle this in a similar way, but I'm curious what you think. Ok, so I was curious how a nested block with full/wide alignments would be sized and I was slightly confused by the result. More on that below. As an example, I created a full-width Cover block, then nested an image block (which supports these new alignments) and tried both full and wide alignments. In short, here's what I expected vs. what actually happens:
...whereas on the web, wide and full-width options produce the same exact result, which looks aligned roughly to ~16px.: The way they're aligning the wide option in that scenario makes sense, because it acts exactly as if any other wide block would on portrait/phone, but I'm not sure why a full-width block wouldn't actually be applied as full-width 🤔 . Perhaps I'm missing some context 🤷♂️. Either way, I'm curious to hear what you think about this -- my instinct says we should match what the most common behavior of themes is, which is that wide and full-width produces the same result (the child block's contents align to the 16px margins). Even if it is slightly confusing at first, at least it's a consistent. |
|
Thanks for testing it again @iamthomasbishop !
Oops, missed that case 😅 now it should show correctly on a phone in landscape orientation with a safe area.
The issue here was In the latest build, I removed this for inner blocks (within Cover) that have Do you prefer it like that? Or should we aim to follow what web does for mobile web? Let me know, thank you! |
|
Thanks for the updates @geriux!
Looks better! I was wondering if we should also change the border position on selected media to the outside of the cell as well to achieve a similar effect, but this might not be as much of an eye-sore after we implement this proposal I have open to reduce
Ah, that makes sense re: paddings. While my personal opinion is that I’d expect setting full-width in any case to result in the block spanning edge-to-edge of the container it’s within, it’s probably best in this case to follow the web — especially since this generally produces the same result on the front-end. So we can just roll back to the “normal” approach with inner paddings. One thing we could do is provide a workaround in the form of a switch/toggle on block settings that explicitly removes/ignores the padding from the parent. I’m unsure if it’s worth the effort and hesitant to suggest because I have a feeling in the future Core may provide similar controls via something like Global Styles. However, if this wouldn’t require much effort, perhaps it’d be worth it — what do you think? Here is some additional feedback:
I think that’s all I’ve got besides the issues I mentioned in the previous comment. This is looking and feeling really solid overall, nice work! |
# Conflicts: # Podfile # Podfile.lock
Do you mean something like this (reducing the overlay border as mentioned in the issue)? If it's exactly that I think it'd be best to do it in the issue you opened so this PR doesn't get too big. What do you think?
No problem, I added back the paddings for inner blocks within Cover.
This may be a little tricky and would definitely add more time for this task, I think it would be best to do it after we have the base (this PR) that we can then improve on. What do you think?
I believe this is no longer an issue since we added back the paddings so it won't reach the edges of the parent Cover block. Let me know just in case I'm missing something.
Nice catch! Solved.
Thank you again @iamthomasbishop for the review! I updated everything and made new builds if you want to give it another quick test. 😃 |
|
Awesome stuff, thanks for the update! I think we're in good shape -- only noted one more refinement we might want to make, but not a huge issue by any means.
Yea, that is what I meant -- looks solid, and if you prefer to tackle it in another PR that's totally fine.
Sounds good to me, let's create a separate ticket so it's on our radar for potential future exploration -- I don't think we need to action on it right now.
Looks solved, thank you! 👍 Tiny thing I found as a side-effect of our decision to not force edge-to-edge on full-width child blocks. The dashed border on full-width children looks a bit awkward. I understand this is probably just because the border-style is just inherited from the "normal" full width blocks, but do you think it would make sense to bring the left/right border outward to the same key lines as the wide alignment in this case? Example (using nested Cover blocks): |
Yay! Thanks for testing!
Cool, will do that.
👍
Nice catch! This should be solved in the latest build from this PR. Thanks again @iamthomasbishop for the design / functionality review! 🙌 |
@geriux indeed solved, thank you! I think we are in good shape from the design perspective. I think once code review is complete, it should be ready to 🚢! |





Gutenberg Mobile PR-> wordpress-mobile/gutenberg-mobile#2559Gutenberg PR-> WordPress/gutenberg#24598WordPress Android PR-> wordpress-mobile/WordPress-Android#12720To test check the Gutenberg PR description.
This PR is just for testing.
PR submission checklist:
RELEASE-NOTES.txtif necessary.