-
Notifications
You must be signed in to change notification settings - Fork 2.9k
chore(react-tree): stop unnecessary re-rendering when no actions are available #29694
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
Merged
bsunderhus
merged 1 commit into
microsoft:master
from
bsunderhus:react-tree/chore--stop-unnecessary-re-rendering-when-no-actions-available
Nov 1, 2023
Merged
chore(react-tree): stop unnecessary re-rendering when no actions are available #29694
bsunderhus
merged 1 commit into
microsoft:master
from
bsunderhus:react-tree/chore--stop-unnecessary-re-rendering-when-no-actions-available
Nov 1, 2023
Conversation
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
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 620 | 648 | 5000 | |
| Button | mount | 313 | 323 | 5000 | |
| Field | mount | 1126 | 1134 | 5000 | |
| FluentProvider | mount | 722 | 756 | 5000 | |
| FluentProviderWithTheme | mount | 81 | 89 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 59 | 62 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 74 | 67 | 10 | |
| MakeStyles | mount | 880 | 861 | 50000 | |
| Persona | mount | 1809 | 1718 | 5000 | |
| SpinButton | mount | 1406 | 1391 | 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 e83bfe3:
|
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 838b05367dbdddb17732b9e0c807090e0a4445d5 (build) |
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
88be011 to
33e8c64
Compare
layershifter
reviewed
Nov 1, 2023
packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx
Outdated
Show resolved
Hide resolved
33e8c64 to
e83bfe3
Compare
layershifter
approved these changes
Nov 1, 2023
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Nov 2, 2023
* master: breaking(react-drawer): open now only accepts a boolean instead of MotionShorthand (microsoft#29736) fix (breadcrumb): Overflow examples refactoring (microsoft#29723) refactor(tools): replace deprecated apis (microsoft#29624) [Part 3] Update documentation content for all charts (microsoft#29727) chore: throws if FlatTree is used as a subtree (microsoft#29729) feat(react-storybook-addon-export-to-sandbox): make addon generic so it can be published and use by others (microsoft#29674) chore(TimePicker-compat): add bundle size fixture (microsoft#29717) applying package updates Move CredScanSuppression file to root so 1ESPT output task picks it up (microsoft#29722) fix(CI): increase pipeline agent timeout threshold to 90 minutes (microsoft#29710) fix(breadcrumb): examples and styles (microsoft#29679) chore(react-tree): stop unnecessary re-rendering when no actions are available (microsoft#29694) applying package updates
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.
Previous Behavior
TreeItemseems to be causing re-renders unnecessarily when there are no actions elements available, to ensure actions might be visibleNew Behavior
actionselement on the DOM, in that case re-renders might be in placeRelated Issue(s)