Skip to content

TreeView: Add TreeView.TrailingAction subcomponent #6156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TylerJDev
Copy link
Member

@TylerJDev TylerJDev commented Jun 2, 2025

Closes #

Adds new sub-component TreeView.TrailingAction, which allows you to add supplemental actions that are visually appended to the end of TreeView.Item.

Changelog

New

  • Added new sub component TreeView.TrailingAction

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

Copy link

changeset-bot bot commented Jun 2, 2025

🦋 Changeset detected

Latest commit: 1284602

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 Jun 2, 2025
Copy link
Contributor

github-actions bot commented Jun 2, 2025

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

Copy link
Contributor

github-actions bot commented Jun 2, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.15 KB (+0.14% 🔺)
packages/react/dist/browser.umd.js 90.38 KB (+0.29% 🔺)

Comment on lines +714 to +717
<div id={trailingActionId} className={clsx('PRIVATE_VisuallyHidden', classes.TreeViewVisuallyHidden)}>
; {TRAILING_ACTION_SHORTCUT_TEXT}
</div>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used when linking the main TreeView.Item with TrailingAction via aria-labelledby. The semicolon (;) is used to help break the 2 sentences (the content within TreeView.Item, and the text to indicate how to activate the trailing action).

I'm wondering if there's a more elegant way to handle this. Ideally we'd use a period, but there will always be spacing between the item's text content and the shortcut text.

@primer-integration
Copy link

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

@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Aug 4, 2025
@TylerJDev TylerJDev force-pushed the tylerjdev/trailing-action branch from 8e6c66f to b18032a Compare August 4, 2025 19:35
@github-actions github-actions bot requested a deployment to storybook-preview-6156 August 4, 2025 19:39 Abandoned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant