Skip to content

Conversation

@kelsey-myers
Copy link
Contributor

@kelsey-myers kelsey-myers commented Jan 6, 2026

Part of https://github.com/github/primer/issues/6299

This PR adds support for the focusPrependedElements option through the component chain, in preparation for its upcoming release in @primer/behaviors. This allows SelectPanel consumers to enable focus navigation to elements that are dynamically prepended to the list container

Changelog

New

  • Added focusPrependedElements prop to useFocusZone hook
  • Added focusPrependedElements prop to FilteredActionList component
  • Added focusPrependedElements prop to SelectPanel component

Changed

  • Bumped @primer/behaviors to v1.9.1

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

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

@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

🦋 Changeset detected

Latest commit: 635cc18

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 Patch

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 Jan 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

👋 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 integration-tests: skipped manually label to skip these checks.

Add focusPrependedElements prop to useFocusZone, FilteredActionList, and SelectPanel
Copy link
Member

@TylerJDev TylerJDev left a 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 😄

@kelsey-myers kelsey-myers marked this pull request as ready for review January 6, 2026 17:29
@kelsey-myers kelsey-myers requested a review from a team as a code owner January 6, 2026 17:29
@kelsey-myers
Copy link
Contributor Author

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

Copy link
Contributor

Copilot AI left a 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 focusPrependedElements prop 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>
@kelsey-myers kelsey-myers force-pushed the km/pass-focus-prepend-setting branch from a87da05 to 635cc18 Compare January 6, 2026 17:41
@github-actions github-actions bot requested a deployment to storybook-preview-7426 January 6, 2026 17:45 Abandoned
@primer-integration
Copy link

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

@primer-integration
Copy link

🔬 github-ui Integration Test Results

Check Status Details
CI ✅ Passed View run
Projects (Memex) ✅ Passed View run
VRT ✅ Passed View run

All checks passed! Your integration PR is ready for review.

@TylerJDev TylerJDev added this pull request to the merge queue Jan 6, 2026
Merged via the queue into main with commit 094be60 Jan 6, 2026
52 checks passed
@TylerJDev TylerJDev deleted the km/pass-focus-prepend-setting branch January 6, 2026 18:33
@primer primer bot mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants