-
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
Block Support: Separate opt in for font style and weight options #26844
Block Support: Separate opt in for font style and weight options #26844
Conversation
Tested and confirmed this is working as expected in the instructions. 👍 |
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.
From the functional point view everything is working as expected 👍
packages/block-editor/src/components/font-appearance-control/index.js
Outdated
Show resolved
Hide resolved
( { slug } ) => slug === newStyles.fontWeight | ||
); | ||
const newFontWeight = presetWeight | ||
? `var:preset|font-weight|${ presetWeight.slug }` |
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.
Not directly related to this PR but I left a comment regarding the current preset usage on fontStyle and fontWeight PR's.
These things are breaking change and may affect block markup so I guess it is something we should look at and decide as soon as possible
#26444 (review).
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.
This has been updated to have a separate value property in the presets.
Updates the recently added font appearance block support to separate the style and weight aspects in terms of opting in via block.json. This required: * Updating the detection of support opt in within typography tools * Updating the UI control to handle the situation when only one option is opted into This change also includes adding translation for the combined UI option labels and extracting concerns of how the selections are stored within style attributes from the UI control.
384528a
to
6a4248e
Compare
This has now been rebased and updated to be compatible with recent introduction of |
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 ran through the testing instructions again after the recent changes, and can confirm everything worked as expected. 👍
Description
Updates the recently added font appearance block support to separate the style and weight aspects in terms of opting in via block.json.
This includes:
How has this been tested?
Manually.
Testing Instructions
packages/block-library/src/navigation/block.json
toggling__experimentalFontStyle
off in the supports arrayblock.json
again toggling on__experimentalFontStyle
and toggling off__experimentalFontWeight
Screenshots
Types of changes
Breaking change.
This changes the block support flags for the font style/weight feature that was recently merged but not yet part of a release.
Checklist: