-
Notifications
You must be signed in to change notification settings - Fork 616
(reverted) SelectPanel: Prepare for non-anchored variants #5230
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: f0be480 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 depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
🔴 golden-jobs completed with status |
@broccolinisoup Verified everything works well, ready for review |
@@ -56,11 +57,6 @@ function isMultiSelectVariant( | |||
return Array.isArray(selected) | |||
} | |||
|
|||
const focusZoneSettings: Partial<FocusZoneHookSettings> = { | |||
// Let FilteredActionList handle focus zone | |||
disabled: true, |
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.
Note fore reviewer: We no longer need this block, we simply don't add a focusZone now. (we still add focusTrap)
@@ -172,10 +219,13 @@ export function SelectPanel({ | |||
}) | |||
}, [onClose, onSelectedChange, items, selected]) | |||
|
|||
const inputRef = React.useRef<HTMLInputElement>(null) |
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.
Note for reviewer: inputRef still exists, it's just declared sooner
const inputRef = React.useRef<HTMLInputElement>(null) | ||
const focusTrapSettings = { | ||
/** Focus trap */ | ||
useFocusTrap({ |
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.
Note fore reviewer: Adding missing focus trap from AnchoredOverlay. The new keys are passed on what AnchoredOverlay used to do
While it's not possible to Tab out of the filter input to outside the panel, it is possible to Tab to a footer button and then out of the panel, that's why we still need focus trap
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.
Looks great! 🎉
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/350602 |
This reverts commit dce754b.
Replace AnchoredOverlay with Overlay + useAnchoredPosition to prepare for variants that would skip anchored position
need to check
Rollout strategy
Testing & Reviewing
Merge checklist