-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update post author block functionality and visual parity #22877
Update post author block functionality and visual parity #22877
Conversation
Size Change: +4.38 kB (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
It's a new way of doing font sizes. Perhaps the secondary text should be sized relative to the "master" font size? Otherwise, it sounds like they should be their own child blocks. |
Ah gotcha. Im not familiar with it atm, but can take a look tomorrow. This would require breaking the 3 sections up into child blocks and using this file?
The |
The Heading block is an example of how to use it. We need |
Interesting! Thanks for pointing me in the right direction. I have updated this to use the Im still a bit uncertain regarding global styles: would this then inherit what is set for global styles by default, and once we specifically save a font size on the block it will use that instead? |
Yes |
}, | ||
], | ||
colorDetector: { targetRef: ref }, | ||
colorPanelProps: { | ||
initialOpen: true, | ||
}, | ||
}, | ||
[ fontSize.size ] | ||
[ contrastCheckFontSize ] |
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.
We need to change this to __experimentalUseColors
.
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.
(In a different PR.)
withoutInteractiveFormatting | ||
allowedFormats={ [ | ||
'core/bold', | ||
'core/italic', | ||
'core/strikethrough', | ||
] } |
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.
What's the reasoning behind this change?
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 figured that if the goal was to have parity with paragraph block's functionalities, that the editable text should be able to have links and the remaining text formatting options. Removing these removes the restrictions and enables them.
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 think these specific restrictions were put in place because other formatting options don't make sense in the context of a byline.
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 restrict it thought? If a user wants a word in their byline to be a link, then all of a sudden a link makes sense in the context of a byline for them. A similar argument for subscript/superscript, etc.
I'm still not super happy about the byline and bio being a fixed ratio. I'm thinking it would make sense to update this to allow those ratios to be adjusted and saved as well. |
Description
Update the post author block functionality as issued in #21087.
This introduces:
Author font sizeByline font sizeBio font sizeThis also fixes issues with:
A note on front-end parity:
Preset font sizes ( 'Normal', 'Large', etc. ) run on class names that may have styles added by themes. For example, TwentyTwenty adds styles such as:
This overwrites the standard definition for large text on the front end and causes it to be a different size than the expected 36px as is shown in the editor. Im not sure what we can/should do about this, as if we force parity on this we disable the themes ability to have control over preset sizing.
How has this been tested?
Tested on local docker environment.
Test various settings, save, and verify visual parity between site editor, post editor, and front end.
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Checklist: