-
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: Deprecate constrained width style #43230
Conversation
There are no CustomSelectControls being used in here anymore
1e2ba84
to
2d9bbae
Compare
.components-custom-select-control__button { | ||
width: 100%; | ||
} | ||
|
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.
Removed unneeded hack.
.components-custom-select-control, | ||
.components-custom-select-control__button { | ||
width: 100%; | ||
} |
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 package does not use the CustomSelectControl component anymore.
Size Change: -39.1 kB (-3%) Total Size: 1.24 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.
LGTM 🚀
- ✅ Component looks good in Storybook
- ✅ DateFormatPicker looks good in the editor
- ✅ All components using
CustomSelectControl
(including parent components forwarding props to it) have the prop set correctly - ✅ Couldn't find any additional CSS style overrides that were "hacking" the width
Couple of additional things that I noticed while reviewing this PR:
- It looks like this classname isn't used anymore, maybe we could remove it?
- Since
FontAppearanceControl
sets the prop internally, should we remove this unnecessary prop setting in the typography panel ?
Thanks for the review!
Given the guidelines that were pointed out yesterday, I'm inclined to reduce the number of Dev Notes we have to publish. So like, keep the classname if it's easy to keep, and when it's time to remove the classnames in a component (e.g. full Emotion refactor), remove them all in one go so we only have to publish one Dev Note for it. What do you think?
Fixed 👍 833a131 |
Sounds good, feel free to merge when CI is ✅ |
Hi, noob question: what is this |
@draganescu Good question! This is a convention we've started using in the Components package to deal with style deprecations, as documented here in our package contributing guide. |
What?
Formally deprecate the 130px min-width style on CustomSelectControl.
All in-repo usage has been migrated, and style hacks have been removed.
Why?
For easier hack-free styling, and consistency across components.
Testing Instructions
CustomSelectControl
__nextUnconstrainedWidth
prop set to true.DateFormatPicker
✍️ Dev Note
To improve consistency with
SelectControl
, the CSS styles forCustomSelectControl
will be changed to take up the full width available, regardless of how short the option strings are. To start opting into these new unconstrained width styles, set the__nextUnconstrainedWidth
prop totrue
. These styles will become the default in 6.4.To keep your
CustomSelectControl
similar to the previous styling, add width constraints to a wrapper div.