Skip to content

Add additional Tooltip support to ActionList and NavList - #8303

Merged
TylerJDev merged 5 commits into
mainfrom
tylerjdev/add-native-tooltip-actionlist-navlist
Aug 13, 2026
Merged

Add additional Tooltip support to ActionList and NavList#8303
TylerJDev merged 5 commits into
mainfrom
tylerjdev/add-native-tooltip-actionlist-navlist

Conversation

@TylerJDev

@TylerJDev TylerJDev commented Aug 12, 2026

Copy link
Copy Markdown
Member

Part of https://github.com/github/core-ux/issues/3279

Extends current Tooltip support in ActionList to be prop-based. Previously, tooltips would only be rendered if content within the ActionList was truncated. This allows private usage of the tooltip via prop (_PrivateTooltipText)

Why is this needed?

There isn't an accessible path to utilizing a custom tooltip with ActionList / NavList. This is because wrapping an ActionList item or NavList item in a tooltip will break the permitted parent/child structure of a list, as the tooltip <span> is rendered directly within the list (<ul>) as a direct child.

Since we already support tooltips in some capacity (truncated content), this makes internal usage with tooltips easier. We should consider if we want to keep this prop "private", or if we wanted to allow it publicly. I implemented it as private as tooltips should generally be used sparingly.

Changelog

New

  • Added prop-based tooltip support to ActionList / NavList

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 33bb6a7

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 staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Aug 12, 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.

@github-actions
github-actions Bot requested a deployment to storybook-preview-8303 August 12, 2026 22:40 Abandoned
@primer

primer Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

🤖 Lint and formatting issues have been automatically fixed and committed to this PR.

@github-actions
github-actions Bot requested a deployment to storybook-preview-8303 August 12, 2026 22:46 Abandoned
@TylerJDev TylerJDev added the Canary Release Apply this label when you want CI to create a canary release of the current PR label Aug 12, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8303 August 12, 2026 22:57 Inactive
@TylerJDev
TylerJDev marked this pull request as ready for review August 12, 2026 23:05
@TylerJDev
TylerJDev requested a review from a team as a code owner August 12, 2026 23:05
@TylerJDev
TylerJDev requested review from francinelucca and a lite review from Copilot August 12, 2026 23:05

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.

Pull request overview

This PR expands existing Tooltip behavior in ActionList/NavList by allowing tooltips to be triggered via an explicit prop (instead of only via truncation), enabling tooltips to render inside list items without breaking list structure.

Changes:

  • Added tooltipText support to NavList.Item, wiring it into the underlying ActionList item/link implementations.
  • Introduced a private _PrivateTooltipText pathway in ActionList to drive tooltip rendering for both ActionList.Item (button-semantics) and ActionList.LinkItem.
  • Added unit tests covering tooltip rendering/association for NavList.Item in both link and expandable (subnav) variants.
Show a summary per file
File Description
packages/react/src/NavList/NavList.tsx Adds tooltipText prop to NavList.Item and forwards it into underlying ActionList items.
packages/react/src/NavList/NavList.test.tsx Adds tests ensuring tooltips render inside the correct list item and are associated via aria-describedby.
packages/react/src/ActionList/shared.ts Adds private _PrivateTooltipText to ActionListItemProps.
packages/react/src/ActionList/LinkItem.tsx Wraps link trigger in Tooltip when _PrivateTooltipText is provided.
packages/react/src/ActionList/Item.tsx Allows private tooltip text to override truncation tooltip text for button-semantic items.
.changeset/warm-tools-smile.md Declares a minor release for the new NavList tooltip prop.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread packages/react/src/ActionList/LinkItem.tsx
Comment thread packages/react/src/NavList/NavList.tsx
@primer-integration

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

@TylerJDev
TylerJDev added this pull request to the merge queue Aug 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 13, 2026
@TylerJDev
TylerJDev added this pull request to the merge queue Aug 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 13, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8303 August 13, 2026 14:19 Inactive
@TylerJDev TylerJDev added the integration-tests: skipped manually Changes in this PR do not require an integration test label Aug 13, 2026
@TylerJDev
TylerJDev added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit a88cc69 Aug 13, 2026
61 checks passed
@TylerJDev
TylerJDev deleted the tylerjdev/add-native-tooltip-actionlist-navlist branch August 13, 2026 14:33
@primer primer Bot mentioned this pull request Aug 13, 2026
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 integration-tests: skipped manually Changes in this PR do not require an integration test staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants