Skip to content

Prototype experimental element trigger composition - #8749

Draft
adierkens wants to merge 10 commits into
mainfrom
adierkens-primer-trigger-composition
Draft

adierkens wants to merge 10 commits into
mainfrom
adierkens-primer-trigger-composition

Conversation

@adierkens

@adierkens adierkens commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Relates to github/core-ux#4233

Prototype element renderAnchor composition and explicit Tooltip routing/visibility through @primer/react/experimental, without separate Root/Trigger components. Stable APIs remain unchanged.

Changelog

New

  • Experimental ActionMenu, AnchoredOverlay, and Tooltip merge element refs, handlers, styles/classes, and ARIA ID lists onto one trigger; callbacks remain escape hatches.
  • Experimental Tooltip adds popupProps, tooltip-only disabled, and open/defaultOpen/onOpenChange(next, details). Suppression overrides visibility without disabling the trigger; the private alias remains compatible.

Changed

HTML props configure the experimental Tooltip trigger in both children and render modes; move bubble attributes into popupProps. Open experimental tooltips stay aligned during ancestor/page scrolling and viewport or popup resizing. Primer retains preventDefault() cancellation and ARIA ID merging rather than Base UI's exact merging semantics. Configured anchors and the original overlay object-ref callback are preserved; SelectPanel remains out of scope.

Removed

None from the stable API.

Rollout strategy

Testing & Reviewing

Passed: npm run build; npm test (164 files, 3,134 passed, 4 skipped, 10 todo); npm run type-check; npm run lint; npm run lint:css; npm run test:classname-coverage; npm run format:diff; npm run lint:npm --workspace @primer/react; git diff --check.

The new Scrolling container story was exercised in Chromium: container/page scrolling, viewport resize, keyboard scrolling, Escape/reopening, retained accessible description, and 320px collision handling passed; GitHub axe including contrast passed the open state. Focused stable/experimental Tooltip and positioning-hook suites also passed with console enforcement (72 passed, 2 skipped). Manual screen-reader, canonical AVT/VRT, and complete atomic accessibility review remain outstanding; configured Storybook MCP is unavailable. React 19 ref-cleanup coverage is conditional under the React 18 runner.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6e415ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another 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 Nov 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 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. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@adierkens adierkens added the Canary Release Apply this label when you want CI to create a canary release of the current PR label Nov 13, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8749 November 13, 2026 16:32 Inactive
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8749 November 13, 2026 16:45 Inactive
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@adierkens adierkens changed the title Add composable trigger rendering and anchor ref context Prototype experimental element trigger composition Nov 13, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8749 November 13, 2026 17:20 Inactive
@adierkens adierkens mentioned this pull request Nov 13, 2026
1 of 5 tasks
@adierkens
adierkens added this pull request to stack #8755 November 13, 2026 20:58
adierkens and others added 3 commits November 13, 2026 16:00
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch was successfully deployed

2 active (outdated) deployments
storybook-preview-8749 — 6e415ac7 Deployed Nov 13, 2026 by github-actions[bot]
github-pages — 6e415ac7 Deployed Nov 13, 2026 by adierkens via deploy-preview #34299
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: 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