Skip to content

Align InfiniteSelect Option rows and ContextMenu with the dropdown standard - #761

Open
JulienVannier66 wants to merge 6 commits into
feature/select-dropdown-component-alignmentfrom
jv/vel-8817/oss-components-infiniteselect-option-and-contextmenu-foundations
Open

JulienVannier66 wants to merge 6 commits into
feature/select-dropdown-component-alignmentfrom
jv/vel-8817/oss-components-infiniteselect-option-and-contextmenu-foundations

Conversation

@JulienVannier66

@JulienVannier66 JulienVannier66 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

First step of aligning the Search dropdowns with the dropdown design system. It fixes the shared foundations in OSS::InfiniteSelect, OSS::InfiniteSelect::Option and OSS::ContextMenu, so that consumers no longer need their own CSS to use Option rows, and adds what the action menus need.

  • Option rows inside InfiniteSelect no longer get the legacy item padding and hover: the <li> becomes a neutral wrapper and the keyboard focus is drawn on the Option. The 4 copied overrides (CountrySelector, CurrencyInput, Smart::Immersive::CurrencyInput, PhoneNumberInput) are removed. Rows that are not an Option look exactly as before.
  • The scroll gradient now shows: the list is always the element that scrolls, and {{scroll-shadow followScroll=true}} shows a white gradient at the top and / or bottom only when there is more content to scroll. The other {{scroll-shadow}} usages are unchanged.
  • Option gets @tooltip (on the whole row, also when it is disabled) and @skin="danger".
  • ContextMenu gets @hideArrow, forwards tooltip and skin from its items, uses a white scroll gradient and supports the keyboard: the arrows move the focus, Enter runs the action (not on a disabled item or an item with a sub-menu), Escape closes.
  • Fixes: the keyboard focus was invisible in lists with a search field, and Enter selected the wrong item in grouped lists whose groups are not contiguous.

Note for consumers: a click on a rowRenderer row now goes through the list selection, so its action no longer receives the click event.

How it works

Option rows in InfiniteSelect. Each item is still wrapped in an <li>. When the <li> directly holds a real Option (detected with :has(> .oss-infinite-select-option--single, > .oss-infinite-select-option--multiple), classes only the component sets), the <li> gets no padding and no background, and its keyboard focus is drawn on the Option (hover look, error colors for the danger skin). Rows that only copy the Option classes, like DeleteOptionRow in Workflow, keep the legacy style. Consumers no longer need any CSS:

<OSS::InfiniteSelect @items={{this.currencies}} @onSelect={{this.select}} @onSearch={{this.search}}>
  <:option as |currency|>
    <OSS::InfiniteSelect::Option @title={{currency.code}} @selected={{eq currency this.current}} @onSelect={{fn this.select currency}} />
  </:option>
</OSS::InfiniteSelect>

Scroll gradient. The gradient pseudo-elements are positioned against .upf-infinite-select__container, so the modifier has to sit on the element that scrolls. The container is now a non-scrolling flex column and the list (ul) always scrolls, as it already did when a consumer set its max-height. With followScroll=true, the modifier tracks the scroll position (scroll, resize and DOM changes) and toggles scroll-shadow--top / scroll-shadow--bottom. Side effect: @onBottomReached now also fires in lists without a search field, where the list used not to scroll.

Option tooltip and danger skin.

<OSS::InfiniteSelect::Option @title="Remove from list" @skin="danger" @prefixIcon={{hash icon="fa-trash"}} @onSelect={{this.remove}} />
<OSS::InfiniteSelect::Option @title="Export" @disabled={{true}} @tooltip={{hash title="Select at least one creator" placement="right"}} @onSelect={{this.export}} />

ContextMenu. Items forward disabled, tooltip and skin to their Option. The panel now turns on the InfiniteSelect keyboard: Enter runs the item action unless the item is disabled or opens a sub-menu (sub-menus stay mouse-only), Escape and Tab close the menu.

items = [
  { title: 'Contact', prefixIcon: { icon: 'fa-envelope' }, action: this.contact },
  { title: 'Export', disabled: !this.count, tooltip: { title: 'No selected creator' }, action: this.export },
  { title: 'Remove from list', groupKey: 'danger', skin: 'danger', prefixIcon: { icon: 'fa-trash' }, action: this.remove }
];
<OSS::ContextMenu @icon="far fa-ellipsis-h" @square={{true}} @hideArrow={{true}} @items={{this.items}} />

Related to: https://linear.app/upfluence/issue/VEL-8817/oss-components-infiniteselect-option-and-contextmenu-foundations

What are the observable changes?

In Storybook:

  • OSS::InfiniteSelect::Option → Danger and Disabled With Tooltip.
  • OSS::ContextMenu → Basic Usage (disabled item with a tooltip, danger item, keyboard navigation) and Icon Trigger Without Arrow.
  • OSS::CountrySelector, OSS::CurrencyInput, OSS::PhoneNumberInput: 36px rows with a single padding, a visible keyboard highlight, and the gradient at the top / bottom while scrolling.

In the apps, once bumped:

  • Currency selector (Workflow → campaign → Setup → Compensation), country selector (creator side panel → Profile → Shipping address) and phone number (creator side panel → Settings): same as above.
  • Search → More filters → Country / Language: the keyboard highlight is now visible.
  • Workflow → campaign sourcing → select creators → bulk actions menu: same look as before, now usable with the keyboard.
Screencast.from.2026-12-03.11-23-45.webm
Screencast.from.2026-12-03.11-22-24.webm
Screencast.from.2026-12-03.11-20-34.webm

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation with Figma design link. Don't forget to replace "design" by "file" in the URL. For example https://www.figma.com/file/example
  • Migrated touched components to Glimmer Components
  • Properly labeled

@linear-code

linear-code Bot commented Dec 2, 2026

Copy link
Copy Markdown

VEL-8817

@JulienVannier66
JulienVannier66 changed the base branch from master to feature/select-dropdown-component-alignment December 3, 2026 10:28

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant