Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5205 +/- ##
==========================================
+ Coverage 97.74% 97.76% +0.01%
==========================================
Files 1000 1003 +3
Lines 32346 32581 +235
Branches 11965 12118 +153
==========================================
+ Hits 31616 31852 +236
- Misses 685 723 +38
+ Partials 45 6 -39 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The disabled option-style select trigger does not pass its custom foreground color to the selected-value label, and this state/variant combination needs coverage.
1 open issue
What changed in this PR
Adds internal Style API v2 support to Select and Autosuggest, extending the library’s slot-based styling without adding public props.
Changes:
- Adds Select trigger and inline-label styling, plus Input and Dropdown forwards for both components.
- Adds placeholder-color support and font inheritance for selected options rendered inside triggers.
- Adds forwarding tests and styled demo pages; documentation snapshots and visual regression registration remain deferred.
| File | Description |
|---|---|
src/select/styles.scss |
Declares Select styling slots and placeholder token. |
src/select/parts/trigger.tsx |
Applies trigger and inline-label classes. |
src/select/parts/styles.scss |
Carries custom placeholder color to its span. |
src/select/internal.tsx |
Defines and forwards Select style classes. |
src/select/index.tsx |
Passes internal styling through the component entry point. |
src/select/__tests__/style-api.test.tsx |
Tests class forwarding and DOM isolation. |
src/internal/components/option/styles.scss |
Enables font inheritance inside triggers. |
src/internal/components/option/index.tsx |
Marks trigger-rendered options for styling. |
src/internal/components/autosuggest-input/index.tsx |
Forwards Input and Dropdown style classes. |
src/autosuggest/styles.scss |
Declares forwarded styling slots. |
src/autosuggest/internal.tsx |
Defines and forwards Autosuggest style classes. |
src/autosuggest/index.tsx |
Passes internal styling through the component entry point. |
src/autosuggest/__tests__/style-api.test.tsx |
Tests forwarded slots and DOM isolation. |
pages/select/style-api-v2.scss |
Styles Select examples using generated mixins. |
pages/select/style-api-v2.page.tsx |
Demonstrates Select slots and states. |
pages/autosuggest/style-api-v2.scss |
Styles Autosuggest examples using generated mixins. |
pages/autosuggest/style-api-v2.page.tsx |
Demonstrates Autosuggest slots and states. |
Review effort: Balanced
| @include style-api.docs( | ||
| 'trigger', | ||
| $trigger-tokens, | ||
| $properties: (color, background, border, border-radius, box-shadow, padding, font-family, font-size, font-weight), |
5916142 to
e21d961
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The select and autosuggest examples keep changed values only in local state instead of AppContext URL parameters, violating the demo-state convention and preventing reproduction through shared links, reloads, or test URLs.
3 open issues
Review effort: Balanced
e21d961 to
98b1932
Compare

Description
Adds the internal Style API v2 to Select (
trigger,inlineLabel,filterforwards to Input,dropdownforwards to Dropdown) and Autosuggest (inputforwards to Input,dropdownforwards to Dropdown). Options have no slot;renderOptioncovers them.Changes outside the two components:
select/parts/styles.scss: the placeholder colour token is carried on the trigger button, which Multiselect shares; a no-op there until Multiselect passes classes.internal/components/option: Options rendered withtriggerVariant(the Select trigger withtriggerVariant="option", and inline Tokens) get anin-triggerclass that inheritsfont-family,font-size,font-weightandcolorfrom the host. Visual refresh is unchanged. In the classic theme, light mode, the label of a disabled Select withtriggerVariant="option"now renders in the trigger's disabled text colour (#879596) instead of the option's (#aab7b8).Known gap: with
tokenson Autosuggest the visible field box is the token field, which has no slot yet; theinputforward reaches only the native input inside it.The style-docs snapshot and the VR registration of the dev pages follow in one PR for all components.
Tracker sections: P3d34KdbCd6o.
Related links, issue #, if available: n/a
How has this been tested?
Unit tests for every slot and forward, dev pages
select/style-api-v2andautosuggest/style-api-v2, build and lint green.Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.