Skip to content

chore: expand support for custom trees#7817

Open
francinelucca wants to merge 22 commits intomainfrom
chore/expand-actionlist-roles
Open

chore: expand support for custom trees#7817
francinelucca wants to merge 22 commits intomainfrom
chore/expand-actionlist-roles

Conversation

@francinelucca
Copy link
Copy Markdown
Member

@francinelucca francinelucca commented May 7, 2026

Relates to https://github.com/github/primer/issues/6456

Making ActionList compatible with tree-like structures and also exporting useRovingTabIndex for custom usages. Made some modifications to the hook but they're all opt-in so treeview functionality should not be affected.

Changelog

New

  • Expanded the list of selectable roles and list role types in ActionList/Item.tsx to include treeitem and tree, improving accessibility and compatibility with tree-like structures.
  • Enhanced the useRovingTabIndex hook in TreeView to support additional options such as preventScroll, and dependencies, allowing for more customizable and robust keyboard navigation.
  • Exported the useRovingTabIndex hook from the package's main entry point, making it available for external use.
  • Added ActionListContainerContext to the exports and as a static property on the ActionList component, making it easier for consumers to access the context for advanced use cases.
  • Added tests and stories for the new functionalities

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

Merge checklist

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 7, 2026

🦋 Changeset detected

Latest commit: 3efc334

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

@francinelucca francinelucca changed the title chore: expand selectableRoles and listRoleTypes arrays to include 'tr… chore: expand selectableRoles and listRoleTypes arrays to include 'treeitem' and 'tree' May 7, 2026
@francinelucca francinelucca added the Canary Release Apply this label when you want CI to create a canary release of the current PR label May 7, 2026
@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 May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

⚠️ 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.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

@github-actions github-actions Bot requested a deployment to storybook-preview-7817 May 7, 2026 23:35 Abandoned
@github-actions github-actions Bot temporarily deployed to storybook-preview-7817 May 7, 2026 23:45 Inactive
@francinelucca francinelucca changed the title chore: expand selectableRoles and listRoleTypes arrays to include 'treeitem' and 'tree' chore: expand support for custom trees May 8, 2026
@github-actions github-actions Bot requested a deployment to storybook-preview-7817 May 8, 2026 18:26 Abandoned
@github-actions github-actions Bot temporarily deployed to storybook-preview-7817 May 8, 2026 18:34 Inactive
@francinelucca francinelucca marked this pull request as ready for review May 8, 2026 20:31
@francinelucca francinelucca requested a review from a team as a code owner May 8, 2026 20:31
Copilot AI review requested due to automatic review settings May 8, 2026 20:31
Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
@francinelucca francinelucca added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label May 11, 2026
@github-actions github-actions Bot requested a deployment to storybook-preview-7817 May 11, 2026 06:21 Abandoned
@github-actions github-actions Bot temporarily deployed to storybook-preview-7817 May 11, 2026 06:31 Inactive
@github-actions github-actions Bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label May 11, 2026
@github-actions github-actions Bot temporarily deployed to storybook-preview-7817 May 11, 2026 06:43 Inactive
@francinelucca francinelucca added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label May 11, 2026
@github-actions github-actions Bot requested a deployment to storybook-preview-7817 May 11, 2026 06:50 Abandoned
@primer-integration
Copy link
Copy Markdown

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/20336

@primer-integration
Copy link
Copy Markdown

Integration test results from github/github-ui:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

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 staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants