Closed andrewserong closed 1 day ago
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot
label.
If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
Size Change: +8 B (0%)
Total Size: 1.81 MB
Filename | Size | Change |
---|---|---|
build/editor/index.min.js |
106 kB | +8 B (+0.01%) |
Nice one! This fixes it for me:
I'll defer to @ramonjd on the technical nuance. But for me this makes it match editor and frontend.
Now the only next thing I'd love fixed, if we can in 6.7, for making TT5 shine, is this one: #65969, I know there's a wonderful PR underway, and anything we can do to help that land would help. 🙏
Thanks folks! I'll merge this PR in now. I haven't flagged it for backporting to 6.7 — my weakly held opinion is that it can be tricky to make changes to some of these rules surrounding the visual editor, and this PR addresses a fairly particular concern that was flagged, but the issue has been around since prior to 6.7. At the current point in the 6.7 cycle, I think it'd make sense to try this out in the plugin and see if we run into any issues, rather than attempt to get it in during the RC cycle of 6.7.
Do let me know if anyone feels differently, though!
Now the only next thing I'd love fixed, if we can in 6.7, for making TT5 shine, is this one: https://github.com/WordPress/gutenberg/issues/65969, I know there's a wonderful PR underway, and anything we can do to help that land would help.
Thanks for flagging! That PR was looking good to me, too, and I think is less likely to result in unintentional side effects. I'll see what we can do to get it merged 👍
What?
In the abstracted post editor (i.e. editing a post or page with template preview switched off), always output the
has-global-padding
classname for the post content area, irrespective of the layout type in use (but only if the theme supports it).Why?
This is kind of similar to https://github.com/WordPress/gutenberg/pull/66352 in some ways but addresses a slightly different problem.
Something that @jasmussen ran into while testing TT5 theme is that depending on the template, you can be in a situation where the template uses the global padding on a wrapper Group block, and the Content block is set to flow/default alignment. On the site frontend, this will mean that visually, there is some global padding being applied around the content area.
However in the abstracted post editor, there is no such wrapper block, and so the content can render to the very edge of the viewport, unexpectedly.
This PR proposes always applying the
has-global-padding
classname so that if the site uses the global padding it applies in the abstracted post editor. Given that folks can switch on the template preview mode if they want a more WYSIWYG look, the assumption here is that it's better to optimise for things looking good for the writing experience.How?
In the
VisualEditor
, output thehas-global-padding
class name if the theme supports root padding aware alignments, we're in the post only mode, and the entity being edited is not a design one (pattern, template part, etc)Testing Instructions
This could be a little tricky to reproduce! It took me a while before I ran into the issue 😄
trunk
if you use the preview in the top right and select Mobile, you'll likely see that the content unexpectedly goes edge-to-edge in the previewScreenshots or screencast