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

fix: handle cases when Animation.persist() does not exist #33282

Merged
merged 7 commits into from
Dec 19, 2024

Conversation

spmonahan
Copy link
Contributor

Previous Behavior

The Animation.persist() API is in our full support matrix but was added after browsers in our partial support matrix. As no polyfill exists for this feature and it cannot be compiled away this commit explicitly handles the case when the API does not exist.

New Behavior

When .persist() is not available we short-circuit the animation, using the existing "is reduced motion" code path to make the animation effectively instant while still firing all animation events, etc.

@spmonahan spmonahan requested a review from a team as a code owner November 16, 2024 01:06
Copy link

github-actions bot commented Nov 16, 2024

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-accordion
Accordion (including children components)
106.859 kB
32.724 kB
107.08 kB
32.786 kB
221 B
62 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
221.474 kB
64.058 kB
221.695 kB
64.135 kB
221 B
77 B
react-components
react-components: entire library
1.165 MB
291.863 kB
1.165 MB
291.952 kB
221 B
89 B
react-dialog
Dialog (including children components)
100.196 kB
30.032 kB
100.417 kB
30.097 kB
221 B
65 B
react-motion
@fluentui/react-motion - createMotionComponent()
4.213 kB
1.846 kB
4.434 kB
1.935 kB
221 B
89 B
react-motion
@fluentui/react-motion - createPresenceComponent()
4.944 kB
2.181 kB
5.165 kB
2.263 kB
221 B
82 B
react-toast
Toast (including Toaster)
101.009 kB
30.355 kB
101.23 kB
30.429 kB
221 B
74 B
react-tree
FlatTree
145.241 kB
41.708 kB
145.462 kB
41.771 kB
221 B
63 B
react-tree
PersonaFlatTree
145.927 kB
41.819 kB
146.15 kB
41.881 kB
223 B
62 B
react-tree
PersonaTree
142.16 kB
40.64 kB
142.381 kB
40.703 kB
221 B
63 B
react-tree
Tree
141.472 kB
40.539 kB
141.693 kB
40.602 kB
221 B
63 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
69.21 kB
20.174 kB
react-components
react-components: FluentProvider & webLightTheme
44.447 kB
14.59 kB
react-motion
@fluentui/react-motion - PresenceGroup
1.714 kB
819 B
react-portal-compat
PortalCompatProvider
8.39 kB
2.64 kB
react-timepicker-compat
TimePicker
107.513 kB
35.791 kB
🤖 This report was generated against 6b775123cced3ca0f58ce8a5779c6df2474f6bff

Copy link

Pull request demo site: URL

The Animation.persist() API is in our full suport matrix but
was added after browsers in our partial support matrix. As no
polyfill exists for this feature and it cannot be compiled away
this commit explicitly handles the case when the API does not exist.

When .persist() is not available we short-circuit the animation, using
the existing "is reduced motion" code path to make the animation
effectively instant while still firing all animation events, etc.
@spmonahan
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@spmonahan spmonahan merged commit 7f1647f into microsoft:master Dec 19, 2024
16 checks passed
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.

3 participants