-
Notifications
You must be signed in to change notification settings - Fork 143
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
fix(NotificationsPanel): remove focus trap #6829
fix(NotificationsPanel): remove focus trap #6829
Conversation
✅ Deploy Preview for ibm-products-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6829 +/- ##
==========================================
- Coverage 81.31% 81.29% -0.02%
==========================================
Files 397 397
Lines 12959 12945 -14
Branches 4261 4255 -6
==========================================
- Hits 10537 10524 -13
+ Misses 2422 2421 -1
|
packages/ibm-products-styles/src/components/NotificationsPanel/_notifications-panel.scss
Show resolved
Hide resolved
packages/ibm-products/src/components/NotificationsPanel/NotificationsPanel.tsx
Show resolved
Hide resolved
packages/ibm-products-styles/src/components/NotificationsPanel/_notifications-panel.scss
Show resolved
Hide resolved
{/* <HeaderContainer | ||
render={() => ( */} |
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.
Temp fix for draft review.
Removing the HeaderContainer
:
- Solves the problem of re-rendering all children every time there's a state change.
- Solves the problem of tabbing order by allowing the Panel to be rendered inline with the Shell's notification icon button.
Keeping the HeaderContainer
:
- Requires the Panel to be rendered outside the Shell, but it will lose the expected tabbing order.
packages/ibm-products/src/components/NotificationsPanel/NotificationsPanel_data.js
Show resolved
Hide resolved
packages/ibm-products/src/components/NotificationsPanel/NotificationsPanel.stories.jsx
Show resolved
Hide resolved
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.
Just a few questions for you, I noticed that the exit animation of the panel is gone. Is that something you can check out? Also, triggerButtonRef
isn't used at all anymore. Thoughts on this? This is used across modals, panels in Carbon, but since we removed focus trap, suppose we might be able to deprecate it?
Oops. That was probably part of my aggressive "delete one thing at a time until I see a change in behavior" tactic; and then forgot to put them back in. (All for nothing, it was the UI Shell that was the source of the issues.)
If you mean Thanks, @matthewgallo. |
The actual exit animation of the panel is missing now. This is what is currently looks like with the latest changes from Screen.Recording.2025-02-06.at.9.17.38.AM.mov |
Fixed with latest commit. |
Removed tests that confirmed focus trapping.
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.
Thank you, @paul-balchin-ibm! Those alignment fixes you snuck in and Storybook cleanup have long overdue. 🚀
ccd0926
hi @paul-balchin-ibm, but looks like it got resurrected from the grave after moving them to useIsomorphicEffect as part of fixing csp violations by removing inline css. #6340 ![]() |
Closes #6432
For accessibility reasons: remove the built-in focus trap.
After detailed discussions (see also the refinement comment), the following changes were approved:
What did you change?
How did you test and verify your work?