Skip to content

[WIP] Composable SelectPanel - #7287

Draft
TylerJDev wants to merge 14 commits into
mainfrom
tylerjdev/selectpanel-experiments
Draft

TylerJDev wants to merge 14 commits into
mainfrom
tylerjdev/selectpanel-experiments

Conversation

@TylerJDev

@TylerJDev TylerJDev commented Dec 8, 2025 •

Copy link
Copy Markdown
Member

Warning

Very much a WIP. This PR explores a composable SelectPanel API, not a finalized proposal or implementation.

Roughly 80% of the added lines are tests and Storybook stories. The component implementation and styling account for only about around 3.2k added lines.

What if SelectPanel exposed its building blocks instead of requiring a new prop or escape hatch for each variation?

This experiment lets consumers compose their own layout while reusing Primer’s selection, keyboard navigation, and focus management:

<SelectPanel.Root selectionMode="single" closeOnSelect>
  <SelectPanel.Trigger>Choose a label</SelectPanel.Trigger>
  <SelectPanel.Overlay>
    <SelectPanel.Content>
      <SelectPanel.Header>
        <SelectPanel.Title>Labels</SelectPanel.Title>
      </SelectPanel.Header>
      <SelectPanel.List aria-label="Labels">
        <SelectPanel.Item value="bug">Bug</SelectPanel.Item>
        <SelectPanel.Item value="enhancement">Enhancement</SelectPanel.Item>
      </SelectPanel.List>
    </SelectPanel.Content>
  </SelectPanel.Overlay>
</SelectPanel.Root>

Root coordinates state and behavior; the parts define the UI. Consumers can add search, groups, header actions, messages, and footers, or leave them out. Filtering remains consumer-owned, and searchable compositions default to active-descendant focus with roving focus available.

Changelog

New

  • Composable SelectPanel parts and shared behavior hooks.
  • Composition, virtualization, and playground examples.
  • Experimental native <dialog> and Invoker support.

Changed

  • An opt-in adapter lets the existing props-based SelectPanel reuse the new implementation while retaining its current API.

Removed

  • No existing SelectPanel API intentionally removed.

Rollout strategy

  • Ships with feature flag(s)

The configured adapter and native experiments are default-off:

  • primer_react_select_panel_composable_adapter
  • primer_react_select_panel_native_dialog
  • primer_react_select_panel_native_invokers

Testing & Reviewing

Feedback is especially welcome on the API boundaries, accessibility, and whether the parts offer useful flexibility without making common cases cumbersome.

@changeset-bot

changeset-bot Bot commented Dec 8, 2025 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1cfa586

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Dec 8, 2025
@github-actions

github-actions Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the integration-tests: skipped manually label to skip these checks.

@github-actions
github-actions Bot temporarily deployed to storybook-preview-7287 December 8, 2025 16:46 Inactive
@TylerJDev TylerJDev changed the title test SelectPanel experiments Dec 18, 2025
@github-actions

Copy link
Copy Markdown
Contributor

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Feb 16, 2026
@github-actions github-actions Bot closed this Feb 23, 2026
@github-actions
github-actions Bot deleted the tylerjdev/selectpanel-experiments branch February 23, 2026 19:26
@TylerJDev
TylerJDev restored the tylerjdev/selectpanel-experiments branch November 12, 2026 16:50
@TylerJDev TylerJDev reopened this Nov 12, 2026
@github-actions github-actions Bot removed the Stale label Nov 12, 2026
TylerJDev and others added 4 commits November 16, 2026 16:22
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the composable SelectPanel integration while adopting graduated merged refs. Stabilize the virtualized example scroll-container ref to prevent ref-detach update loops.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
github-actions Bot temporarily deployed to storybook-preview-7287 November 17, 2026 15:52 Inactive
@github-actions github-actions Bot added the integration-tests: failing Changes in this PR cause breaking changes in gh/gh label Nov 17, 2026
@TylerJDev TylerJDev changed the title SelectPanel experiments [WIP] Composable SelectPanel Nov 17, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use top-layer popovers for anchored panels while retaining native modality for modal, bottom-sheet, and fullscreen variants. Preserve invoker reconciliation and background-control focus, and harden transparent backdrops against application cascade layers.

Keep non-default positioning strategies on the compatibility host. Legacy Dialog nesting remains a known follow-up.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TylerJDev TylerJDev added the Canary Release Apply this label when you want CI to create a canary release of the current PR label Nov 19, 2026
@primer-integration

primer-integration Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Waiting  Changes   Waiting
Running  CI   Running
Running  VRT   Running
Waiting  Projects   Waiting

This branch was successfully deployed

2 active deployments
storybook-preview-7287 — 1cfa586e Deployed Nov 19, 2026 by github-actions[bot]
github-pages — 1cfa586e Deployed Nov 19, 2026 by TylerJDev via deploy-preview #34442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Canary Release Apply this label when you want CI to create a canary release of the current PR integration-tests: failing Changes in this PR cause breaking changes in gh/gh integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant