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

bugfix: converts value to be a string instead of a generic value #28257

Conversation

bsunderhus
Copy link
Contributor

@bsunderhus bsunderhus commented Jun 19, 2023

Previous Behavior

  1. createFlatTreeItems would return a non shallow equivalent value due to the presence of a reference object
  2. no tests to ensure consistency upon multiple invocations of createFlatTreeItems

New Behavior

  1. rollback from [Feature]: Use arbitrary data type to identify a TreeItem in Tree #27485 going back to using value: string | number to simplify internals mechanisms, ensuring same accessibility behaviours with a less convoluted code base.
  2. Adds tests to ensure equivalency of values returner by createFlatTreeItems

Related Issue(s)

Fixes issues introduced by #27642, where a reference for each parent tree item was kept.

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 19, 2023

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
FluentProviderWithTheme virtual-rerender-with-unmount 69 77 10 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 598 588 5000
Button mount 296 297 5000
Field mount 1090 1117 5000
FluentProvider mount 664 665 5000
FluentProviderWithTheme mount 77 80 10
FluentProviderWithTheme virtual-rerender 65 62 10
FluentProviderWithTheme virtual-rerender-with-unmount 69 77 10 Possible regression
InfoButton mount 13 14 5000
MakeStyles mount 840 843 50000
Persona mount 1691 1588 5000
SpinButton mount 1321 1319 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 19, 2023

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
65.162 kB
17.952 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
210.395 kB
58.717 kB
react-components
react-components: FluentProvider & webLightTheme
36.395 kB
11.996 kB
react-portal-compat
PortalCompatProvider
6.473 kB
2.196 kB
🤖 This report was generated against df30429eb72b85251e03c5123625820cc8a8b147

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 19, 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 db3084d:

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

@size-auditor
Copy link

size-auditor bot commented Jun 19, 2023

Asset size changes

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

Baseline commit: df30429eb72b85251e03c5123625820cc8a8b147 (build)

@bsunderhus bsunderhus marked this pull request as ready for review June 19, 2023 20:37
@bsunderhus bsunderhus requested a review from a team as a code owner June 19, 2023 20:37
@bsunderhus bsunderhus marked this pull request as draft June 20, 2023 08:45
@bsunderhus bsunderhus force-pushed the react-tree/bugfix--ensures-createFlatTreeItems-consistency branch 2 times, most recently from bcd206c to a8bf1df Compare June 20, 2023 09:38
@bsunderhus bsunderhus changed the title react-tree(bugfix): createFlatTreeItems props should be consistent upon re-render bugfix: rollback from value property to using id as a reference Jun 20, 2023
@bsunderhus bsunderhus marked this pull request as ready for review June 20, 2023 09:48
@bsunderhus bsunderhus force-pushed the react-tree/bugfix--ensures-createFlatTreeItems-consistency branch from a8bf1df to b06d661 Compare June 20, 2023 10:11
@bsunderhus bsunderhus marked this pull request as draft June 20, 2023 10:45
@bsunderhus bsunderhus force-pushed the react-tree/bugfix--ensures-createFlatTreeItems-consistency branch 4 times, most recently from 850b419 to b0037f3 Compare June 22, 2023 11:53
@bsunderhus bsunderhus force-pushed the react-tree/bugfix--ensures-createFlatTreeItems-consistency branch from b0037f3 to 5c206f2 Compare June 23, 2023 11:44
@bsunderhus bsunderhus marked this pull request as ready for review June 23, 2023 18:44
@bsunderhus bsunderhus changed the title bugfix: rollback from value property to using id as a reference bugfix: converts value to be a string instead of a generic value Jun 24, 2023
@bsunderhus bsunderhus enabled auto-merge (squash) June 26, 2023 10:33
@bsunderhus bsunderhus merged commit 90acd97 into microsoft:master Jun 26, 2023
@bsunderhus bsunderhus deleted the react-tree/bugfix--ensures-createFlatTreeItems-consistency branch June 26, 2023 11:01
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

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.

4 participants