-
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
LetteringSpacingControl: Deprecate 36px default size #67429
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -12,13 +12,14 @@ This component is used for blocks that display text, commonly inside a | |||
Renders a letter spacing control. | |||
|
|||
```jsx | |||
import { LetterSpacingControl } from '@wordpress/block-editor'; | |||
import { __experimentalLetterSpacingControl as LetterSpacingControl } from '@wordpress/block-editor'; |
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.
Import statement in the code snippet was wrong.
if ( | ||
! __next40pxDefaultSize && | ||
( otherProps.size === undefined || otherProps.size === 'default' ) | ||
) { |
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 are only four places in this package where we need this logic, so I think we can just copy paste this without abstracting to a utility function.
Size Change: +84 B (0%) Total Size: 1.83 MB
ℹ️ View Unchanged
|
Flaky tests detected in 7f9351a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12087342482
|
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.
LGTM and tests as expected 👍
Part of #65751
What?
Deprecates the 36px default size on
LetterSpacingControl
.Testing Instructions
Add a Paragraph block in the block editor and add a Letter Spacing control from the Typography section in the block inspector.
Changing the props on here should log a warning (e.g. removing the
size
prop):gutenberg/packages/block-editor/src/components/global-styles/typography-panel.js
Lines 493 to 498 in edd6328