Skip to content

chore: Adds internal style api v2 to multiselect - #5242

Merged
vvaliyev merged 1 commit into
mainfrom
style-v2-multiselect
Nov 4, 2026
Merged

vvaliyev merged 1 commit into
mainfrom
style-v2-multiselect

Conversation

@vvaliyev

@vvaliyev vvaliyev commented Nov 3, 2026

Copy link
Copy Markdown
Member

Description

Adds the internal Style API v2 to Multiselect: trigger and inlineLabel (the same elements and rows as Select), filter forwards to Input, dropdown forwards to Dropdown.container, token forwards to Token and applies to the tokens below the trigger and to the inline tokens (inlineTokens). Options have no slot; renderOption covers them.

Changes outside the component:

  • select/parts/trigger.tsx: inline tokens receive the forwarded Token classes. Select passes none; unchanged there.
  • token-group/internal.tsx: internal pass-through of the Token classes to each token.

Token.root has no font rows, so a font set on the trigger does not reach the inline token text.

The style-docs snapshot and the VR registration of the dev page follow in one PR for all components.

Tracker section: P3d34KdbCd6o.

Related links, issue #, if available: n/a

How has this been tested?

Unit tests for every slot and forward, dev page multiselect/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

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The examples keep selection state in local useState rather than AppContext URL parameters, preventing selected states from being shared or directly targeted by integration tests.

1 open issue
What changed in this PR

Adds internal Style API v2 support to Multiselect, reusing existing Select, Input, Dropdown, and Token styling infrastructure without expanding the public props interface.

Changes:

  • Adds trigger and inline-label styling, plus forwarding for filter, dropdown, and token styles.
  • Applies token classes to both inline tokens and tokens below the trigger.
  • Adds slot-forwarding unit tests and a styled demo page.
File Description
src/​token-group/​internal.tsx Forwards style classes to each token.
src/​select/​parts/​trigger.tsx Passes token classes to inline tokens.
src/​multiselect/​styles.scss Declares styling slots and forwarding documentation.
src/​multiselect/​internal.tsx Defines and routes internal style classes.
src/​multiselect/​index.tsx Passes internal styling through the component wrapper.
src/​multiselect/​__tests__/​style-api.test.tsx Tests class forwarding and DOM prop isolation.
pages/​multiselect/​style-api-v2.scss Defines demo styles for slots and states.
pages/​multiselect/​style-api-v2.page.tsx Demonstrates styled Multiselect variants.

Review effort: Balanced

inlineTokens,
...rest
}: StyledMultiselectProps) {
const [selectedOptions, setSelectedOptions] = useState(initialSelectedOptions);
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.82%. Comparing base (d8d3fa2) to head (998acd3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5242   +/-   ##
=======================================
  Coverage   97.82%   97.82%           
=======================================
  Files        1006     1006           
  Lines       32608    32616    +8     
  Branches    12106    12114    +8     
=======================================
+ Hits        31900    31908    +8     
  Misses        702      702           
  Partials        6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vvaliyev
vvaliyev marked this pull request as ready for review November 3, 2026 16:30
@vvaliyev
vvaliyev requested a review from a team as a code owner November 3, 2026 16:30
@vvaliyev
vvaliyev requested review from NathanZlion and pan-kot and removed request for a team November 3, 2026 16:30
@vvaliyev
vvaliyev added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 92ef62f Nov 4, 2026
70 checks passed
@vvaliyev
vvaliyev deleted the style-v2-multiselect branch November 4, 2026 09:00

This branch was successfully deployed

3 active deployments
dev-pages-react16 — 998acd37 Deployed Nov 3, 2026 by vvaliyev via deploy (React 16) / deploy #3148
dev-pages-react18 — 998acd37 Deployed Nov 3, 2026 by vvaliyev via deploy (React 18) / deploy #3148
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants