Skip to content
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(Tree): Roving tabindexes should be refreshed if current element is unmounted #31918

Merged

Conversation

ling1726
Copy link
Member

@ling1726 ling1726 commented Jul 4, 2024

Follow up from #31595

The current tree item with tabindex 0 can be unmounted but kept as a reference in side the navigation state. This causes the update to be skipped even when in reality there is no tabbable item.

Adds an extra check that the current item is in DOM to fix for this case and improves the test to handle this case

unmounted

Follow up from microsoft#31595

The current tree item with tabindex 0 can be unmounted but kept as a
reference in side the navigation state. This causes the update to be
skipped even when in reality there is no tabbable item.

Adds an extra check that the current item is in DOM to fix for this case
@ling1726 ling1726 marked this pull request as ready for review July 4, 2024 07:15
@ling1726 ling1726 requested a review from a team as a code owner July 4, 2024 07:15
@github-actions github-actions bot added this to the July Project Cycle Q3 2024 milestone Jul 4, 2024
@ling1726 ling1726 changed the title fix(Tree): Roving tabindexes should be refreshed if current element is fix(Tree): Roving tabindexes should be refreshed if current element is unmounted Jul 4, 2024
@fabricteam
Copy link
Collaborator

fabricteam commented Jul 4, 2024

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
FluentProviderWithTheme mount 78 81 10 Possible regression
FluentProviderWithTheme virtual-rerender 31 39 10 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 636 658 5000
Button mount 290 306 5000
Field mount 1193 1132 5000
FluentProvider mount 727 710 5000
FluentProviderWithTheme mount 78 81 10 Possible regression
FluentProviderWithTheme virtual-rerender 31 39 10 Possible regression
FluentProviderWithTheme virtual-rerender-with-unmount 84 76 10
MakeStyles mount 870 867 50000
Persona mount 1744 1704 5000
SpinButton mount 1412 1369 5000
SwatchPicker mount 1666 1729 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 4, 2024

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.095 MB
270.816 kB
1.095 MB
270.834 kB
70 B
18 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
69.141 kB
20.157 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
211.741 kB
60.957 kB
react-components
react-components: FluentProvider & webLightTheme
44.442 kB
14.607 kB
react-portal-compat
PortalCompatProvider
8.39 kB
2.64 kB
react-timepicker-compat
TimePicker
106.559 kB
35.517 kB
🤖 This report was generated against 385ad908f11f5669580b9b1fec6e5e76be30f770

@ling1726 ling1726 merged commit f5aad26 into microsoft:master Jul 4, 2024
19 checks passed
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.

3 participants