Skip to content

fix: don't apply modalizer attributes when focus trap isn't configured#29110

Merged
ling1726 merged 3 commits into
microsoft:masterfrom
ling1726:fix/modalizer-trap-focus
Sep 8, 2023
Merged

fix: don't apply modalizer attributes when focus trap isn't configured#29110
ling1726 merged 3 commits into
microsoft:masterfrom
ling1726:fix/modalizer-trap-focus

Conversation

@ling1726

@ling1726 ling1726 commented Sep 8, 2023

Copy link
Copy Markdown
Contributor

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.

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.
@ling1726
ling1726 marked this pull request as ready for review September 8, 2023 11:38
@ling1726
ling1726 requested a review from a team as a code owner September 8, 2023 11:38
@fabricteam

fabricteam commented Sep 8, 2023

Copy link
Copy Markdown
Collaborator

Perf Analysis (@fluentui/react-components)

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

@codesandbox-ci

codesandbox-ci Bot commented Sep 8, 2023

Copy link
Copy Markdown

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:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam

fabricteam commented Sep 8, 2023

Copy link
Copy Markdown
Collaborator

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
208.327 kB
59.386 kB
208.33 kB
59.385 kB
3 B
-1 B
react-datepicker-compat
DatePicker Compat
211.433 kB
58.785 kB
211.441 kB
58.79 kB
8 B
5 B
react-dialog
Dialog (including children components)
89.917 kB
27.447 kB
89.925 kB
27.453 kB
8 B
6 B
react-infobutton
InfoButton
129.444 kB
40.699 kB
129.447 kB
40.7 kB
3 B
1 B
react-infobutton
InfoLabel
133.169 kB
41.891 kB
133.172 kB
41.894 kB
3 B
3 B
react-popover
Popover
118.698 kB
37.359 kB
118.701 kB
37.361 kB
3 B
2 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-accordion
Accordion (including children components)
91.384 kB
27.926 kB
react-alert
Alert
84.549 kB
23.128 kB
react-avatar
Avatar
49.738 kB
15.631 kB
react-avatar
AvatarGroup
18.584 kB
7.448 kB
react-avatar
AvatarGroupItem
64.39 kB
19.977 kB
react-button
Button
39.658 kB
10.79 kB
react-button
CompoundButton
47.013 kB
12.284 kB
react-button
MenuButton
44.085 kB
12.041 kB
react-button
SplitButton
52.111 kB
13.612 kB
react-button
ToggleButton
56.746 kB
12.698 kB
react-card
Card - All
91.249 kB
26.409 kB
react-card
Card
86.038 kB
24.868 kB
react-card
CardFooter
11.951 kB
5.031 kB
react-card
CardHeader
14.237 kB
5.798 kB
react-card
CardPreview
12.903 kB
5.408 kB
react-checkbox
Checkbox
35.614 kB
11.771 kB
react-combobox
Combobox (including child components)
90.383 kB
29.52 kB
react-combobox
Dropdown (including child components)
88.738 kB
29.167 kB
react-components
react-components: Button, FluentProvider & webLightTheme
69.517 kB
19.64 kB
react-components
react-components: FluentProvider & webLightTheme
40.713 kB
13.509 kB
react-link
Link
15.902 kB
6.506 kB
react-menu
Menu (including children components)
139.629 kB
43.01 kB
react-menu
Menu (including selectable components)
142.365 kB
43.541 kB
react-persona
Persona
56.629 kB
17.505 kB
react-portal
Portal
12.362 kB
4.543 kB
react-portal-compat
PortalCompatProvider
6.541 kB
2.227 kB
react-provider
FluentProvider
21.258 kB
7.937 kB
react-radio
Radio
29.318 kB
9.699 kB
react-radio
RadioGroup
14.344 kB
5.942 kB
react-slider
Slider
36.849 kB
12.171 kB
react-switch
Switch
31.885 kB
10.356 kB
react-table
DataGrid
156.416 kB
43.567 kB
react-table
Table (Primitives only)
42.463 kB
13.255 kB
react-table
Table as DataGrid
129.276 kB
34.739 kB
react-table
Table (Selection only)
74.56 kB
20.053 kB
react-table
Table (Sort only)
73.191 kB
19.649 kB
react-tags-preview
InteractionTag
13.85 kB
5.626 kB
react-tags-preview
Tag
29.604 kB
9.567 kB
react-tags-preview
TagGroup
72.493 kB
21.628 kB
react-toast
Toast (including Toaster)
91.601 kB
27.394 kB
react-tooltip
Tooltip
51.154 kB
18.06 kB
🤖 This report was generated against 1cc078ada94cfe929c0aa8d60ea100cea370795d

@ling1726
ling1726 enabled auto-merge (squash) September 8, 2023 11:53
@size-auditor

size-auditor Bot commented Sep 8, 2023

Copy link
Copy Markdown

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 1cc078ada94cfe929c0aa8d60ea100cea370795d (build)

@fabricteam

fabricteam commented Sep 8, 2023

Copy link
Copy Markdown
Collaborator

🕵 fluentuiv9 No visual regressions between this PR and main

@ling1726
ling1726 merged commit bb8a191 into microsoft:master Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants