-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure post content always has correct layout. #51431
Conversation
Size Change: +9 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this up!
✅ Allows the default
layout to be applied to fix the reported bug
✅ Classic themes appear to be unaffected as they still use their rules from classic.css
✅ left/center/right constrained alignments still work as expected
✅ Previous fixes for wide
alignment of the post content block still work as expected
LGTM! ✨
Thanks for the reviews folks! |
Heya @ndiego |
Sure thing, I'll prepare RC5 in an hour or so. 💪 |
Thank you very much Nick! |
I just cherry-picked this PR to the release/16.0 branch to get it included in the next release: 54a807f |
layoutDefinitions={ | ||
globalLayoutSettings?.definitions | ||
} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have this component than render "blockListLayout" styles and just a few lines down here the following code
<LayoutStyle
layout={ postContentLayout }
css={ postContentLayoutStyles }
/>
that use the CSS prop to render some styles. Are these styles different? They feel like the same layout styles. What is the purpose of each one of these calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no longer sure because this code has gone through a few changes 😅 but I think the first instance adds the initial computed layout for classic and block themes, and the second one only applies to block themes and adds any changes to Post Content if the template is edited.
What?
Fixes #51371 by separating out the default styles for Post Content and Post Title in the post editor. Post Title doesn't have layout attributes, so it should be provided with a fallback style. Post Content does have layout, so it should always respect its layout settings.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast