-
Notifications
You must be signed in to change notification settings - Fork 650
Add focusPrependedElements prop to useFocusZone, FilteredActionList, and SelectPanel #7426
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
Conversation
🦋 Changeset detectedLatest commit: 635cc18 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
👋 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. Or, apply the |
Add focusPrependedElements prop to useFocusZone, FilteredActionList, and SelectPanel
TylerJDev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the PRs!
We could bump @primer/behaviors to v1.9.1 here too if you wanted, though I'm more than happy to make a separate PR for this 😄
Done, thanks! 1e52623 |
There was a problem hiding this comment.
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 adds support for the focusPrependedElements option throughout the component chain to support an upcoming feature in @primer/behaviors v1.9.1. This enables SelectPanel consumers to allow focus navigation to elements that are dynamically prepended to list containers.
Key changes:
- Added
focusPrependedElementsprop to useFocusZone hook interface - Threaded the prop through FilteredActionList and SelectPanel components
- Updated @primer/behaviors dependency from v1.9.0 to v1.9.1
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/hooks/useFocusZone.ts | Added focusPrependedElements boolean prop to FocusZoneHookSettings interface |
| packages/react/src/FilteredActionList/FilteredActionList.tsx | Added focusPrependedElements prop to component interface and passed it to useFocusZone |
| packages/react/src/SelectPanel/SelectPanel.tsx | Added focusPrependedElements prop to component interface and forwarded it to FilteredActionList |
| packages/react/package.json | Bumped @primer/behaviors from ^1.9.0 to ^1.9.1 |
| package-lock.json | Updated lockfile with new @primer/behaviors version and integrity hash |
| .changeset/green-dryers-flow.md | Added changeset entry documenting the new feature as a patch release |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
a87da05 to
635cc18
Compare
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/9825 |
Part of https://github.com/github/primer/issues/6299
This PR adds support for the
focusPrependedElementsoption through the component chain, in preparation for its upcoming release in @primer/behaviors. This allowsSelectPanelconsumers to enable focus navigation to elements that are dynamically prepended to the list containerChangelog
New
focusPrependedElementsprop to useFocusZone hookfocusPrependedElementsprop to FilteredActionList componentfocusPrependedElementsprop to SelectPanel componentChanged
Rollout strategy
Testing & Reviewing
This PR adds optional props that pass through to @primer/behaviors focusZone(). The new focusPrependedElements option in @primer/behaviors is not yet released, so this will be tested once that PR is merged
Merge checklist