Repository navigation
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%; | ||
| } | ||
|
|
| .components-custom-select-control, | ||
| .components-custom-select-control__button { | ||
| width: 100%; | ||
| } |
There was a problem hiding this comment.
This package does not use the CustomSelectControl component anymore.
|
Size Change: -39.1 kB (-3%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
ciampo
left a comment
There was a problem hiding this comment.
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
FontAppearanceControlsets 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
__nextUnconstrainedWidthprop set to true.DateFormatPicker
✍️ Dev Note
To improve consistency with
SelectControl, the CSS styles forCustomSelectControlwill 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__nextUnconstrainedWidthprop totrue. These styles will become the default in 6.4.To keep your
CustomSelectControlsimilar to the previous styling, add width constraints to a wrapper div.