-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat: Configurable shortcut to focus most recent toast #28289
feat: Configurable shortcut to focus most recent toast #28289
Conversation
Implements a default shortcut `CTRL+M` that will focus on the most recent toast. While focus is inside the toaster, all timeouts of active toasts will be paused. The toaster also attemps to restore focus on blur.
📊 Bundle size report🤖 This report was generated against cbfa9a3717782183ebc86149abcde6468f97afa8 |
Asset size changes
Baseline commit: cbfa9a3717782183ebc86149abcde6468f97afa8 (build) |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 34a4abe:
|
...react-components/react-toast/src/components/ToastContainer/useToastContainerStyles.styles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-toast/src/state/vanilla/createToaster.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-toast/stories/Toast/FocusKeyboardShortcut.stories.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-toast/src/components/ToastContainer/useToastContainer.ts
Outdated
Show resolved
Hide resolved
...ponents/react-toast/src/components/ToastContainer/__snapshots__/ToastContainer.test.tsx.snap
Outdated
Show resolved
Hide resolved
packages/react-components/react-toast/src/state/vanilla/createToaster.ts
Outdated
Show resolved
Hide resolved
🕵 fluentuiv9 No visual regressions between this PR and main |
The following a11y related features were added:
Escape
- focus is also reverted