Skip to content

Conversation

@bsunderhus
Copy link
Contributor

@bsunderhus bsunderhus commented Oct 30, 2023

Previous Behavior

TreeItem seems to be causing re-renders unnecessarily when there are no actions elements available, to ensure actions might be visible

New Behavior

  1. Adds verification of the presence of actions element on the DOM, in that case re-renders might be in place

Related Issue(s)

  • Fixes #

@bsunderhus bsunderhus self-assigned this Oct 30, 2023
@fabricteam
Copy link
Collaborator

fabricteam commented Oct 30, 2023

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 30, 2023

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:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Oct 30, 2023

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
70.007 kB
20.164 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
207.417 kB
59.289 kB
react-components
react-components: FluentProvider & webLightTheme
42.291 kB
14.005 kB
react-portal-compat
PortalCompatProvider
6.651 kB
2.252 kB
🤖 This report was generated against 838b05367dbdddb17732b9e0c807090e0a4445d5

@size-auditor
Copy link

size-auditor bot commented Oct 30, 2023

Asset size changes

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

Baseline commit: 838b05367dbdddb17732b9e0c807090e0a4445d5 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Oct 30, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@bsunderhus bsunderhus force-pushed the react-tree/chore--stop-unnecessary-re-rendering-when-no-actions-available branch 3 times, most recently from 88be011 to 33e8c64 Compare October 31, 2023 14:22
@bsunderhus bsunderhus marked this pull request as ready for review October 31, 2023 14:49
@bsunderhus bsunderhus requested a review from a team as a code owner October 31, 2023 14:49
@bsunderhus bsunderhus force-pushed the react-tree/chore--stop-unnecessary-re-rendering-when-no-actions-available branch from 33e8c64 to e83bfe3 Compare November 1, 2023 12:33
@bsunderhus bsunderhus merged commit 88574cc into microsoft:master Nov 1, 2023
@bsunderhus bsunderhus deleted the react-tree/chore--stop-unnecessary-re-rendering-when-no-actions-available branch November 1, 2023 13:24
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants