fix: don't apply modalizer attributes when focus trap isn't configured#29110
Merged
Conversation
Follow up from microsoft#28613. Not applying any of the `useModalAttributes()` resulted in focus restoration not working for popovers that don't trap focus. Now the modalizer attributes are handled from the `useModalAttributes()` hook. This way the popover will still apply the focus restoration attributes if there is no focus trap configured.
YuanboXue-Amber
approved these changes
Sep 8, 2023
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| InfoButton | mount | 13 | 15 | 5000 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 602 | 650 | 5000 | |
| Button | mount | 319 | 290 | 5000 | |
| Field | mount | 1122 | 1139 | 5000 | |
| FluentProvider | mount | 696 | 690 | 5000 | |
| FluentProviderWithTheme | mount | 76 | 83 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 74 | 62 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 85 | 73 | 10 | |
| InfoButton | mount | 13 | 15 | 5000 | Possible regression |
| MakeStyles | mount | 863 | 861 | 50000 | |
| Persona | mount | 1723 | 1714 | 5000 | |
| SpinButton | mount | 1326 | 1394 | 5000 |
|
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 2ac1012:
|
Collaborator
📊 Bundle size reportUnchanged fixtures
|
layershifter
approved these changes
Sep 8, 2023
ling1726
enabled auto-merge (squash)
September 8, 2023 11:53
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 1cc078ada94cfe929c0aa8d60ea100cea370795d (build) |
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Follow up from #28613. Not applying any of the
useModalAttributes()resulted in focus restoration not working for popovers that don't trap focus.Now the modalizer attributes are handled from the
useModalAttributes()hook. This way the popover will still apply the focus restoration attributes if there is no focus trap configured.