-
Notifications
You must be signed in to change notification settings - Fork 320
Update Drawers to do a proper focus trap #1290
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
base: main
Are you sure you want to change the base?
Changes from all commits
24ae3c1
23d8d26
a5083cf
023ebb1
71a061d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@hyperdx/app": patch | ||
| --- | ||
|
|
||
| improve drawer a11y |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,12 +15,14 @@ export interface DBRowTableFieldWithPopoverProps { | |
| cellValue: unknown; | ||
| wrapLinesEnabled: boolean; | ||
| columnName?: string; | ||
| tableContainerRef?: React.RefObject<HTMLDivElement>; | ||
| isChart?: boolean; | ||
| } | ||
|
|
||
| export const DBRowTableFieldWithPopover = ({ | ||
| children, | ||
| cellValue, | ||
| tableContainerRef, | ||
| wrapLinesEnabled, | ||
| columnName, | ||
| isChart = false, | ||
|
|
@@ -151,7 +153,7 @@ export const DBRowTableFieldWithPopover = ({ | |
| position="top-start" | ||
| offset={5} | ||
| opened={opened} | ||
| zIndex={1} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is great because I can see the popovers now, but I'm also seeing that the add / exclude filter buttons are not having an effect when in the side drawer other than closing the side drawer: Screen.Recording.2025-10-25.at.11.36.27.AM.movThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for testing it! I tested so many things to ensure the zindex worked, but didn't click it 😆 . The issue was the tooltips were rendering in a portal and now with the accessibility improvements, the drawer was auto-closing due to a click outside the modal. I fixed this by ensuring the tooltips render in the same container as the table, thus avoiding the portal click outside logic |
||
| portalProps={{ target: tableContainerRef?.current ?? undefined }} | ||
| > | ||
| <Popover.Target> | ||
| <span | ||
|
|
||
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.
🤠