-
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
CustomSelectControl: Hard deprecate constrained width #58974
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. |
Size Change: -281 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
Flaky tests detected in 9f2d011. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7902241151
|
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.
Looks good and tests well 👍 Thanks!
@@ -114,14 +112,6 @@ Can be used to externally control the value of the control, like in the `MyContr | |||
- Type: `Object` | |||
- Required: No | |||
|
|||
#### __nextUnconstrainedWidth |
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.
Should we also remove the corresponding prop from the legacy types:
__nextUnconstrainedWidth?: boolean; |
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.
Based on our discussion in #55401, we're going to keep it in the types indefinitely so consumer code can continue to compile, and to prevent future prop name collisions.
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.
Sounds good 👍
What?
Promotes
__nextUnconstrainedWidth
on CustomSelectControl to the default behavior.Why?
The deprecation grace period has elapsed.
Testing Instructions
Unfortunately, this compatibility mode had broken at some point, so you won't even be able to see this width switching behavior on Storybook trunk 😱
If you build Storybook on this PR branch, you should be able to see that:
__nextUnconstrainedWidth
prop is removed from the docs.✍️ Dev Note
CustomSelectControl
used to have a hard-coded width, which was inconsistent with our other form components. In WordPress 6.1, we deprecated this unconstrained width, and introduced the transitional__nextUnconstrainedWidth
prop so consumers could opt into these new styles before they become the default.In WordPress 6.5, these unconstrained width styles have become the default. Any use of the
__nextUnconstrainedWidth
prop can be safely removed.