feat(react-tree): adds useFlatTreeItems hook to introduce flattening#26856
Merged
bsunderhus merged 11 commits intomicrosoft:masterfrom Feb 27, 2023
Merged
Conversation
Collaborator
📊 Bundle size report🤖 This report was generated against 7bf995b3b64f3ffb07291fc6f7efedb00611f2de |
|
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 7098af7:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 7bf995b3b64f3ffb07291fc6f7efedb00611f2de (build) |
8d6d89c to
5244cd4
Compare
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1267 | 1277 | 5000 | |
| Button | mount | 910 | 913 | 5000 | |
| Field | mount | 1955 | 1948 | 5000 | |
| FluentProvider | mount | 1526 | 1534 | 5000 | |
| FluentProviderWithTheme | mount | 577 | 588 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 538 | 548 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 578 | 565 | 10 | |
| InfoButton | mount | 521 | 528 | 5000 | |
| MakeStyles | mount | 1981 | 1961 | 50000 | |
| Persona | mount | 2860 | 2804 | 5000 | |
| SpinButton | mount | 2291 | 2271 | 5000 |
Collaborator
Perf Analysis (
|
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
Collaborator
🕵 FluentUI-v0 No visual regressions between this PR and main |
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 1477 | 1476 | 5000 | |
| Breadcrumb | mount | 3623 | 3635 | 1000 | |
| Checkbox | mount | 3309 | 3248 | 5000 | |
| CheckboxBase | mount | 2884 | 2965 | 5000 | |
| ChoiceGroup | mount | 5534 | 5551 | 5000 | |
| ComboBox | mount | 1569 | 1537 | 1000 | |
| CommandBar | mount | 11882 | 11938 | 1000 | |
| ContextualMenu | mount | 16911 | 16992 | 1000 | |
| DefaultButton | mount | 1767 | 1738 | 5000 | |
| DetailsRow | mount | 4299 | 4310 | 5000 | |
| DetailsRowFast | mount | 4391 | 4430 | 5000 | |
| DetailsRowNoStyles | mount | 4165 | 4104 | 5000 | |
| Dialog | mount | 3794 | 3827 | 1000 | |
| DocumentCardTitle | mount | 727 | 713 | 1000 | |
| Dropdown | mount | 4031 | 4011 | 5000 | |
| FocusTrapZone | mount | 2471 | 2533 | 5000 | |
| FocusZone | mount | 2469 | 2493 | 5000 | |
| GroupedList | mount | 63870 | 70233 | 2 | |
| GroupedList | virtual-rerender | 29973 | 29800 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 112664 | 111706 | 2 | |
| GroupedListV2 | mount | 722 | 707 | 2 | |
| GroupedListV2 | virtual-rerender | 678 | 670 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 697 | 708 | 2 | |
| IconButton | mount | 2451 | 2457 | 5000 | |
| Label | mount | 910 | 914 | 5000 | |
| Layer | mount | 5494 | 5458 | 5000 | |
| Link | mount | 999 | 1026 | 5000 | |
| MenuButton | mount | 2124 | 2084 | 5000 | |
| MessageBar | mount | 2931 | 2893 | 5000 | |
| Nav | mount | 4028 | 4118 | 1000 | |
| OverflowSet | mount | 1701 | 1673 | 5000 | |
| Panel | mount | 3152 | 3164 | 1000 | |
| Persona | mount | 1663 | 1649 | 1000 | |
| Pivot | mount | 2047 | 2040 | 1000 | |
| PrimaryButton | mount | 1912 | 1979 | 5000 | |
| Rating | mount | 8723 | 8857 | 5000 | |
| SearchBox | mount | 1855 | 1854 | 5000 | |
| Shimmer | mount | 3600 | 3517 | 5000 | |
| Slider | mount | 2706 | 2658 | 5000 | |
| SpinButton | mount | 5765 | 5815 | 5000 | |
| Spinner | mount | 1006 | 986 | 5000 | |
| SplitButton | mount | 3875 | 3910 | 5000 | |
| Stack | mount | 1012 | 1039 | 5000 | |
| StackWithIntrinsicChildren | mount | 2899 | 2830 | 5000 | |
| StackWithTextChildren | mount | 6054 | 6014 | 5000 | |
| SwatchColorPicker | mount | 12932 | 13022 | 5000 | |
| TagPicker | mount | 3278 | 3182 | 5000 | |
| TeachingBubble | mount | 109797 | 111292 | 5000 | |
| Text | mount | 987 | 1015 | 5000 | |
| TextField | mount | 1991 | 2035 | 5000 | |
| ThemeProvider | mount | 1940 | 1930 | 5000 | |
| ThemeProvider | virtual-rerender | 1350 | 1375 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 2726 | 2738 | 5000 | |
| Toggle | mount | 1423 | 1405 | 5000 | |
| buttonNative | mount | 695 | 677 | 5000 |
36a55d0 to
784735c
Compare
fabricteam
reviewed
Feb 24, 2023
3fba050 to
1c49e6e
Compare
48219fb to
ebec91e
Compare
ling1726
reviewed
Feb 27, 2023
packages/react-components/react-tree/src/components/Tree/useTree.ts
Outdated
Show resolved
Hide resolved
ling1726
reviewed
Feb 27, 2023
ling1726
reviewed
Feb 27, 2023
ling1726
reviewed
Feb 27, 2023
packages/react-components/react-tree/stories/Tree/Virtualization.stories.tsx
Outdated
Show resolved
Hide resolved
ling1726
reviewed
Feb 27, 2023
packages/react-components/react-tree/stories/Tree/flattenTreeFromElements.stories.tsx
Outdated
Show resolved
Hide resolved
ling1726
reviewed
Feb 27, 2023
packages/react-components/react-tree/src/hooks/useFlatTreeItems.ts
Outdated
Show resolved
Hide resolved
ling1726
approved these changes
Feb 27, 2023
ead0739 to
4893db4
Compare
4893db4 to
7098af7
Compare
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.
New Behavior
useFlatTreeItemshook to allow the usage of a flat tree structure in theTreecomponent.flattenTreemethod to allow the usage of a nested tree structure for the consumption of theuseFlatTreeItemshook.flattenTreeFromElementsmethod to allow the usage of a nested tree structure that derives fromTreeandTreeItemelements for the consumption of theuseFlatTreeItemshook.