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(react-accordion): ensures controlled state works properly #28665

Conversation

bsunderhus
Copy link
Contributor

@bsunderhus bsunderhus commented Jul 28, 2023

Previous Behavior

New Behavior

  1. ensures controlled state works properly
  2. makes AccordionItemValue generic to ensure better usage for controlled cases
  3. adds story for controlled state
  4. simplifies access to requestToggle by context by removing intermediaries (onHeaderClick)
  5. reorganizes contexts into a separate folder

Related Issue(s)

@github-actions github-actions bot added this to the July Project Cycle Q3 2023 milestone Jul 28, 2023
@bsunderhus bsunderhus self-assigned this Jul 28, 2023
@bsunderhus bsunderhus changed the title bugfix: ensures controlled state works properly + bugfix: ensures controlled state works properly Jul 28, 2023
@bsunderhus bsunderhus changed the title bugfix: ensures controlled state works properly bugfix(react-accordion): ensures controlled state works properly Jul 28, 2023
@fabricteam
Copy link
Collaborator

fabricteam commented Jul 28, 2023

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
InfoButton mount 16 11 5000 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 623 643 5000
Button mount 314 282 5000
Field mount 1055 1051 5000
FluentProvider mount 629 627 5000
FluentProviderWithTheme mount 70 80 10
FluentProviderWithTheme virtual-rerender 73 67 10
FluentProviderWithTheme virtual-rerender-with-unmount 73 76 10
InfoButton mount 16 11 5000 Possible regression
MakeStyles mount 861 851 50000
Persona mount 1656 1606 5000
SpinButton mount 1315 1371 5000

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 28, 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 dfbb463:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration
blissful-wiles-ghj8fs Issue #27718

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 28, 2023

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-accordion
Accordion (including children components)
88.547 kB
26.801 kB
88.574 kB
26.835 kB
27 B
34 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
208.091 kB
57.972 kB
208.119 kB
57.994 kB
28 B
22 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
67.544 kB
18.216 kB
react-components
react-components: FluentProvider & webLightTheme
36.409 kB
12.01 kB
react-portal-compat
PortalCompatProvider
6.48 kB
2.203 kB
🤖 This report was generated against 262900bd47ddaa279b97f229b213f8a0ad796535

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 28, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@size-auditor
Copy link

size-auditor bot commented Jul 28, 2023

Asset size changes

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

Baseline commit: 262900bd47ddaa279b97f229b213f8a0ad796535 (build)

@bsunderhus bsunderhus marked this pull request as ready for review July 28, 2023 10:59
@bsunderhus bsunderhus requested a review from a team as a code owner July 28, 2023 10:59
makes AccordionItemValue generic +
adds story for controlled state +
simplifies access to requestToggle by context +
reorganizes context into a separate folder
@bsunderhus bsunderhus force-pushed the reaact-accordion/bugfix--ensures-controlled-state branch from 8850a7f to dfbb463 Compare August 2, 2023 10:19
@bsunderhus bsunderhus merged commit 192666b into microsoft:master Aug 3, 2023
21 checks passed
@bsunderhus bsunderhus deleted the reaact-accordion/bugfix--ensures-controlled-state branch August 3, 2023 19:36
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Aug 7, 2023
* master:
  chore(cxe-prg): migrate to new slot API (microsoft#28752)
  chore(teams-prg): migrate to new slot API (microsoft#28751)
  chore: re-export slot and assertSlots methods (microsoft#28755)
  Docs(react-tree): Improve docs and stories (microsoft#28741)
  feat: implements nested tree selection (microsoft#28668)
  applying package updates
  applying package updates
  feature(react-utilities): implements new slot methods (`slot` and `assertSlots`) (microsoft#28373)
  fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format (microsoft#28469)
  bugfix: ensures controlled state works properly + (microsoft#28665)
  feat(tokens): Add status color tokens (microsoft#28006)
  feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2 (microsoft#28638)
  Made BreadcrumbButton consistent with Item and Link (microsoft#28672)
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Aug 7, 2023
* master:
  chore(cxe-prg): migrate to new slot API (microsoft#28752)
  chore(teams-prg): migrate to new slot API (microsoft#28751)
  chore: re-export slot and assertSlots methods (microsoft#28755)
  Docs(react-tree): Improve docs and stories (microsoft#28741)
  feat: implements nested tree selection (microsoft#28668)
  applying package updates
  applying package updates
  feature(react-utilities): implements new slot methods (`slot` and `assertSlots`) (microsoft#28373)
  fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format (microsoft#28469)
  bugfix: ensures controlled state works properly + (microsoft#28665)
  feat(tokens): Add status color tokens (microsoft#28006)
  feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2 (microsoft#28638)
  Made BreadcrumbButton consistent with Item and Link (microsoft#28672)
  fix(EventListener): do not use `defaultProps` (microsoft#28725)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment