SelectControl: Move classnames to root#70643
Conversation
|
Size Change: -141 B (-0.01%) Total Size: 1.89 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 9520ec8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/16143552352
|
|
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. |
mirka
left a comment
There was a problem hiding this comment.
This was the most puzzling one. Various styles are applied with this class name as the root, but none of the selectors match any elements. Perhaps this was necessary to align the components initially (#16791) and is no longer necessary now.
This explains why it looks kind of broken right now with an icon 😅 I agree that it's ok to remove to stylesheet.
* SelectControl: Move classnames to root * Add changelog * Update snapshots * Move changelog entry into the Bug Fixes section Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
|
AFAIK, there are no other dev notes regarding components in the 6.9 release. I've written a developer note, but I'm wondering if it's a bit much to release just this one 😅 I'd appreciate your feedback. SelectControl: Moved class names to the component rootThe While this update does not alter the component’s behavior or visual design, custom CSS that previously depended on the inner structure may need to be updated. Before: <div class="components-base-control">
<div class="components-base-control__field">
<div class="components-flex components-input-base components-select-control my-custom-classname">
<div class="components-flex-item">
<label class="components-truncate components-text components-input-control__label">Label</label>
</div>
<div class="components-input-control__container">
<select class="components-select-control__input"></select>
<div aria-hidden="true" class="components-input-control__backdrop"></div>
</div>
</div>
</div>
</div>After: <div class="components-base-control components-select-control my-custom-classname">
<div class="components-base-control__field">
<div class="components-flex components-input-base">
<div class="components-flex-item">
<label class="components-truncate components-text components-input-control__label">Label</label>
</div>
<div class="components-input-control__container">
<select class="components-select-control__input"></select>
<div aria-hidden="true" class="components-input-control__backdrop"></div>
</div>
</div>
</div>
</div> |
|
@t-hamano, should we combine it with the other miscellaneous notes? |
Yes, this is a small dev note, so I think that's fine. |
Closes #70621
What?
In the
SelectControlcomponent, move the base class name and the custom class name to the root element.Why?
How?
I have investigated and addressed some potential backward compatibility issues caused by this PR.
Video Block: the "Kind" dropdown in the Text Tracks Editor
gutenberg/packages/block-library/src/video/tracks-editor.js
Lines 144 to 147 in 309338a
gutenberg/packages/block-library/src/video/editor.scss
Lines 36 to 38 in 317f0a1
No CSS updates were required.
CustomGradientPicker component
gutenberg/packages/components/src/custom-gradient-picker/index.tsx
Lines 106 to 108 in 309338a
This custom class name is not used anywhere in Gutenberg.
TimePicker component
gutenberg/packages/components/src/date-time/time/index.tsx
Lines 162 to 163 in 309338a
This custom class name is not used anywhere in Gutenberg.
DataViews: Conditions filter
gutenberg/packages/dataviews/src/components/dataviews-filters/filter.tsx
Lines 402 to 403 in 309338a
gutenberg/packages/dataviews/src/components/dataviews-filters/style.scss
Lines 57 to 61 in 6d20ad7
No CSS updates were required.
DataViews: Datetime unit
gutenberg/packages/dataviews/src/dataform-controls/datetime.tsx
Lines 87 to 88 in 309338a
gutenberg/packages/dataviews/src/dataform-controls/style.scss
Lines 7 to 9 in 6d20ad7
No CSS updates were required.
Editor: Post Author selector
gutenberg/packages/editor/src/components/post-author/select.js
Lines 24 to 27 in 309338a
This custom class name is not used anywhere in Gutenberg.
DimensionControl (deprecated)
gutenberg/packages/components/src/dimension-control/index.tsx
Lines 114 to 120 in 6d20ad7
This was the most puzzling one. Various styles are applied with this class name as the root, but none of the selectors match any elements. Perhaps this was necessary to align the components initially (#16791) and is no longer necessary now.