Skip to content

Prototype experimental element trigger composition - #8749

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

adierkens wants to merge 9 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. 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

Latest suppression fix: npm run build, npm run type-check, npm exec --offline -- vitest run --project @primer/react packages/react/src/experimental/TriggerComposition/TriggerComposition.test.tsx packages/react/src/TooltipV2/__tests__/Tooltip.test.tsx (64 passed, 2 skipped), targeted npm exec --offline -- eslint on the four changed TSX files, npm run format:diff, and git diff --check passed. The updated menu story was exercised in Chromium: suppression closes/blocks the bubble, preserves the enabled trigger and accessible description, and permits fresh-hover reopening after menu dismissal without a second visibility state.

Prior full checks at 515add0d0: npm test (164 files, 3,128 passed), npm run lint, npm run lint:css, and npm run lint:npm --workspace @primer/react passed; three stories and MDX rendered, and GitHub axe including contrast passed four states. Unchanged broad checks were not repeated for the wrapper-only suppression fix. 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>

This branch was successfully deployed

2 active 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