-
Notifications
You must be signed in to change notification settings - Fork 645
FilteredActionList: Remove usingRemoveActiveDescendant logic
#7196
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: b44a0bc 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 |
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/6873 |
usingRemoveActiveDescendant logic
|
🟢 ci completed with status |
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 removes the primer_react_select_panel_remove_active_descendant feature flag from FilteredActionList and replaces it with a private prop _PrivateFocusManagement that allows internal configuration of focus management strategies (roving tabindex vs. active-descendant).
Key changes:
- Feature flag logic replaced with a private prop-based approach
- Test infrastructure updated to use prop-based configuration instead of feature flags
- Simplified variable naming from
usingRemoveActiveDescendanttousingRovingTabindex
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/react/src/SelectPanel/SelectPanel.test.tsx | Updated test infrastructure to use renderWithProp helper instead of feature flag wrapper |
| packages/react/src/FilteredActionList/useAnnouncements.tsx | Replaced feature flag with focus management parameter |
| packages/react/src/FilteredActionList/FilteredActionList.tsx | Added _PrivateFocusManagement private prop and removed feature flag dependency |
| .changeset/rotten-goats-stare.md | Added changelog entry for minor release |
| describe('SelectPanel', () => { | ||
| it('should render an anchor to open the select panel using `placeholder`', () => { | ||
| renderWithFlag(<BasicSelectPanel />, usingRemoveActiveDescendant) | ||
| renderWithProp(<BasicSelectPanel />) |
Copilot
AI
Nov 14, 2025
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.
Missing usingRemoveActiveDescendant parameter in renderWithProp call. All other test calls in the loop pass this parameter, so this call should pass it as well to ensure consistent testing of both focus management modes.
| renderWithProp(<BasicSelectPanel />) | |
| renderWithProp(<BasicSelectPanel />, usingRemoveActiveDescendant) |
| renderWithProp( | ||
| <> | ||
| <button type="button">outer button</button> | ||
| <BasicSelectPanel /> |
Copilot
AI
Nov 14, 2025
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.
Missing usingRemoveActiveDescendant parameter in renderWithProp call. This test case is inside the loop that iterates over both true and false values but doesn't pass the parameter to test both modes.
| <BasicSelectPanel /> | |
| <BasicSelectPanel usingRemoveActiveDescendant={usingRemoveActiveDescendant} /> |
| renderWithProp( | ||
| <SelectPanel | ||
| onOpenChange={() => {}} | ||
| onFilterChange={() => {}} |
Copilot
AI
Nov 14, 2025
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.
Missing usingRemoveActiveDescendant parameter in renderWithProp call. This test is inside the loop that tests both focus management modes, but the parameter isn't being passed.
Part of https://github.com/github/primer/issues/5900
usingRemoveActiveDescendantinFilteredActionList.primer_react_select_panel_remove_active_descendantonce this is merged.FilteredActionListthat allows configuration of focus management.Changelog
New
FilteredActionListRemoved
usingRemoveActiveDescendantlogic removed fromFilteredActionListRollout strategy
Testing & Reviewing
Merge checklist