Skip to content

feat(lib): Add Filter chip expand - #3794

Draft
louismaximepiton wants to merge 5 commits into
main-lmp-add-dropdown-draftfrom
main-lmp-add-expand-filter-chip
Draft

louismaximepiton wants to merge 5 commits into
main-lmp-add-dropdown-draftfrom
main-lmp-add-expand-filter-chip

Conversation

@louismaximepiton

@louismaximepiton louismaximepiton commented Sep 8, 2026

Copy link
Copy Markdown
Member

Types of change

  • Non-breaking change
  • Breaking change (fix or feature that would change existing functionality and usage)

Related issues

NA

Context & Motivation

Add Filter chip expand to our library

Description

NA

Checklists

  • I have read the contributing guidelines
  • My change follows the developer guide
  • My change pass all tests
  • My change is compatible with a responsive display
  • I have added tests (Javascript unit test or visual) to cover my changes
  • My change introduces changes to the documentation that I have updated accordingly
    • Title and DOM structure is correct
    • Links have been updated (title changes impact links)
    • CSS for the documentation
  • I have checked all states and combinations of the component with my change
  • I have checked all the impacts for the other components and core behavior (grid, reboot, utilities)

Checklist (for Core Team only)

  • The changes need to be in the migration guide
  • The changes are well displayed in Storybook (be careful if example order has changed for DSM)
  • The changes are compatible with RTL
  • Manually test browser compatibility with BrowserStack (Chrome 120, Firefox 121, Edge 120, Safari 15.6, iOS Safari, Chrome & Firefox on Android)

Progression (for Core Team only)

Live previews

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 docs and live-example code introduce verified accessibility/correctness issues (screen-reader text being removed and hardcoded brand/version sprite paths) that should be fixed before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR introduces the Filter chip expand variant to OUDS Web by adding the required chip styling, brand token plumbing for the expand/collapse icons, a docs live example snippet, and documentation/migration updates so consumers can adopt the new pattern.

Changes:

  • Document a new “Filter chip expand” chip type (including examples and migration notes) and cross-link it from Dropdown docs.
  • Extend chip SCSS to support the dropdown chevron affordance and additional “selected” triggers.
  • Add brand token aliases for chip expanded icons and update CSS snapshots accordingly.
File summaries
File Description
site/src/content/docs/getting-started/migration.mdx Adds migration note announcing Filter chip expand.
site/src/content/docs/getting-started/migration-from-boosted.mdx Clarifies .dropdown-toggle replacement guidance, including chip usage.
site/src/content/docs/components/dropdown.mdx Links dropdown usage to the new Filter chip expand docs section.
site/src/content/docs/components/chips.mdx Adds Filter chip expand type, docs section, and multiple examples (including live example).
site/src/assets/partials/snippets.js Adds JS snippet powering the docs live example behavior.
site/data/components-details.ts Adds Filter chip expand to the components catalog/cards list.
scss/tests/snapshot-tests/snapshots/ouds-web.css Updates CSS snapshot for chip selected states and dropdown chevron styling.
scss/tests/snapshot-tests/snapshots/ouds-web-bootstrap.css Updates Bootstrap CSS snapshot in sync with chip changes.
scss/_chips.scss Implements chip selected-state triggers and dropdown chevron styling for filter chips.
packages/sosh/scss/tokens/_composite.scss Adds chip expanded icon aliases (via existing btn expanded icon CSS vars).
packages/orange/scss/tokens/_composite.scss Adds chip expanded icon aliases (via existing btn expanded icon CSS vars).
packages/orange-compact/scss/tokens/_composite.scss Adds chip expanded icon aliases (via existing btn expanded icon CSS vars).
Review details

Files not reviewed (2)

  • scss/tests/snapshot-tests/snapshots/ouds-web-bootstrap.css: Generated file
  • scss/tests/snapshot-tests/snapshots/ouds-web.css: Generated file

Suppressed comments (6)

scss/_chips.scss:178

  • Same issue as the base selected selector: this focus-visible variant matches any visible .badge. Narrow it to .badge-count to align with the documented selection trigger and avoid false positives.
  .chip-interactive:has(.badge:not(.d-none)):focus-visible,

scss/_chips.scss:190

  • Same issue as the base selected selector: this disabled variant matches any visible .badge. Narrow it to .badge-count so only the badge-count visibility controls the selected styling.
  .chip-interactive:has(.badge:not(.d-none)):disabled,

site/src/content/docs/components/chips.mdx:395

  • This example hardcodes an Orange + versioned docs path (/orange/docs/1.4/...), which will break in other brand docs and future versions. Use getVersionedDocsPath like the other sprite references in this file.
        <button class="dropdown-item" aria-pressed="true" type="button">Apple <svg class="ms-auto" width="16" height="16" aria-hidden="true"><use xlink:href="/orange/docs/1.4/assets/img/ouds-web-sprite.svg#check2"></use></svg></button>

site/src/content/docs/components/chips.mdx:425

  • This example hardcodes an Orange + versioned docs path (/orange/docs/1.4/...), which will break in other brand docs and future versions. Use getVersionedDocsPath like the other sprite references in this file.
          <button class="dropdown-item" aria-pressed="true" type="button">Apple <svg class="ms-auto" width="16" height="16" aria-hidden="true"><use xlink:href="/orange/docs/1.4/assets/img/ouds-web-sprite.svg#check2"></use></svg></button>

site/src/content/docs/components/chips.mdx:452

  • These live-example items hardcode an Orange + versioned docs path (/orange/docs/1.4/...), which will break in other brand docs and future versions. Use getVersionedDocsPath like the other sprite references in this file.
        <button class="dropdown-item" data-bs-toggle="button" aria-pressed="false" type="button">Apple <svg class="d-none" width="16" height="16" aria-hidden="true"><use xlink:href="/orange/docs/1.4/assets/img/ouds-web-sprite.svg#check2"></use></svg></button>
        <button class="dropdown-item" data-bs-toggle="button" aria-pressed="false" type="button">Samsung <svg class="d-none" width="16" height="16" aria-hidden="true"><use xlink:href="/orange/docs/1.4/assets/img/ouds-web-sprite.svg#check2"></use></svg></button>

site/src/content/docs/components/chips.mdx:814

  • This example hardcodes an Orange + versioned docs path (/orange/docs/1.4/...), which will break in other brand docs and future versions. Use getVersionedDocsPath like the other sprite references in this file.
      <button class="dropdown-item" aria-pressed="true" type="button">Label <svg class="ms-auto" width="16" height="16" aria-hidden="true"><use xlink:href="/orange/docs/1.4/assets/img/ouds-web-sprite.svg#check2"></use></svg></button>
  • Files reviewed: 10/12 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scss/_chips.scss
.chip-interactive[aria-selected="true"],
.chip-interactive:has(input:checked) {
.chip-interactive:has(input:checked),
.chip-interactive:has(.badge:not(.d-none)),

if (count > 0) {
badgeCount.classList.remove('d-none')
badgeCount.textContent = count
Comment on lines +315 to +317
if (mutation.type === 'attributes' && mutation.attributeName === 'aria-pressed') {
mutation.target.querySelector('svg')?.classList.toggle('d-none')
}
</div>
</button>
<div class="dropdown-menu">
<button class="dropdown-item" aria-pressed="true" type="button">Apple <svg class="ms-auto" width="16" height="16" aria-hidden="true"><use xlink:href="/orange/docs/1.4/assets/img/ouds-web-sprite.svg#check2"></use></svg></button>
@vprothais vprothais self-assigned this Sep 15, 2026
Base automatically changed from main-lmp-add-expand-button to main-lmp-add-dropdown-draft September 16, 2026 10:32
@louismaximepiton

Copy link
Copy Markdown
Member Author

Agreed to keep it on hold for now because it can cause accessibility issues with the dropdown menu provided. Will probably recheck about this when we'll tackle the real dropdown menu, setting it on draft in the mean time, can probably be closed or reopened when we'll be there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Need Dev Review

Development

Successfully merging this pull request may close these issues.

4 participants