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

feat(Collapse): create CollapseDelayed variant #33069

Merged
merged 8 commits into from
Oct 21, 2024

Conversation

robertpenner
Copy link
Collaborator

@robertpenner robertpenner commented Oct 17, 2024

Previous Behavior

  • Collapse animates size (height or width) and opacity in sync: they start together and have the same duration.

New Behavior

  • CollapseDelayed is a new variant that animates size and opacity separately:
    • Enter: size expands immediately, while the fade-in starts after a delay.
    • Exit: fade-out first, then size collapses after a delay.

Documentation

  • Added a CollapseDelayed example in Storybook.

Refactoring

  • Extracted Collapse motion atom objects to reusable factory functions and moved them to a separate file.
  • Moved Collapse types to a separate file as well.

Related Issue(s)

@fabricteam
Copy link
Collaborator

fabricteam commented Oct 17, 2024

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-accordion
Accordion (including children components)
105.317 kB
32.37 kB
106.678 kB
32.689 kB
1.361 kB
319 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
219.108 kB
63.51 kB
220.469 kB
63.821 kB
1.361 kB
311 B
react-components
react-components: entire library
1.157 MB
289.896 kB
1.159 MB
290.234 kB
1.361 kB
338 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
69.14 kB
20.137 kB
react-components
react-components: FluentProvider & webLightTheme
44.447 kB
14.59 kB
react-portal-compat
PortalCompatProvider
8.39 kB
2.64 kB
react-timepicker-compat
TimePicker
107.387 kB
35.758 kB
🤖 This report was generated against 54a28ec2c872c9cbcb3a05204568510429cf0031

@fabricteam
Copy link
Collaborator

fabricteam commented Oct 17, 2024

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 664 615 5000
Button mount 300 295 5000
Field mount 1119 1117 5000
FluentProvider mount 719 737 5000
FluentProviderWithTheme mount 88 76 10
FluentProviderWithTheme virtual-rerender 32 38 10
FluentProviderWithTheme virtual-rerender-with-unmount 73 72 10
MakeStyles mount 875 871 50000
Persona mount 1773 1740 5000
SpinButton mount 1378 1376 5000
SwatchPicker mount 1684 1671 5000

@robertpenner robertpenner force-pushed the feat/collapse-delay branch 2 times, most recently from a05a1a7 to ef124fd Compare October 17, 2024 08:53
@robertpenner robertpenner self-assigned this Oct 17, 2024
@robertpenner robertpenner changed the title feat(Collapse): create a delayed variant feat(Collapse): create CollapseDelayed variant Oct 18, 2024
@robertpenner robertpenner marked this pull request as ready for review October 18, 2024 03:35
@robertpenner robertpenner requested a review from a team as a code owner October 18, 2024 03:35
@robertpenner
Copy link
Collaborator Author

/azp run license/cla

Copy link

No pipelines are associated with this pull request.

@robertpenner
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@robertpenner robertpenner enabled auto-merge (squash) October 21, 2024 18:23
@robertpenner robertpenner merged commit ed7c93c into microsoft:master Oct 21, 2024
19 checks passed
@robertpenner robertpenner deleted the feat/collapse-delay branch October 21, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Collapse] add delayed variant
4 participants