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(motion): improve Web Animations API detection in tests #32029

Merged

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Jul 17, 2024

Previous Behavior

useAnimateAtoms() checks for win.Element.prototype.animate. This might cause issues as it's not the same as element.animate().

New Behavior

useAnimateAtoms() checks for element.animate().

Related Issue(s)

Fixes #32025.

@github-actions github-actions bot added this to the July Project Cycle Q3 2024 milestone Jul 17, 2024
@layershifter layershifter force-pushed the fix/motion-more-robust-check branch from fccbf2a to ce999b6 Compare July 17, 2024 09:52
@fabricteam
Copy link
Collaborator

fabricteam commented Jul 17, 2024

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.095 MB
271.031 kB
1.095 MB
271.004 kB
-67 B
-27 B
react-dialog
Dialog (including children components)
99.095 kB
29.865 kB
99.017 kB
29.845 kB
-78 B
-20 B
react-motion
@fluentui/react-motion - createMotionComponent()
4.173 kB
1.847 kB
4.108 kB
1.844 kB
-65 B
-3 B
react-motion
@fluentui/react-motion - createPresenceComponent()
4.934 kB
2.177 kB
4.869 kB
2.169 kB
-65 B
-8 B
react-toast
Toast (including Toaster)
97.701 kB
29.409 kB
97.634 kB
29.387 kB
-67 B
-22 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
69.141 kB
20.157 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
211.781 kB
60.963 kB
react-components
react-components: FluentProvider & webLightTheme
44.442 kB
14.607 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
106.611 kB
35.546 kB
🤖 This report was generated against c0008087097d546736069565b6c61a640b320362

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 17, 2024

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
FluentProviderWithTheme virtual-rerender 36 41 10 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 622 641 5000
Button mount 303 300 5000
Field mount 1139 1141 5000
FluentProvider mount 713 699 5000
FluentProviderWithTheme mount 88 90 10
FluentProviderWithTheme virtual-rerender 36 41 10 Possible regression
FluentProviderWithTheme virtual-rerender-with-unmount 80 80 10
MakeStyles mount 866 875 50000
Persona mount 1762 1776 5000
SpinButton mount 1427 1316 5000
SwatchPicker mount 1649 1659 5000

@layershifter layershifter marked this pull request as ready for review July 17, 2024 12:06
@layershifter layershifter requested a review from a team as a code owner July 17, 2024 12:06
@layershifter layershifter merged commit ace4b73 into microsoft:master Jul 23, 2024
19 checks passed
@layershifter layershifter deleted the fix/motion-more-robust-check branch July 23, 2024 10:29
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Jul 25, 2024
* master: (77 commits)
  chore(react-examples): replace storybook deprecated api with static stories (microsoft#32074)
  [chore]: create base class for accordion item and remove style and layout specific api (microsoft#32102)
  release: applying package updates - web-components
  chore(web-components): add test for complex focus management (microsoft#32009)
  [chore]: create base class for avatar and remove style and layout specific api (microsoft#32083)
  [chore]: create base class for text input and remove style and layout specific api (microsoft#32080)
  release: applying package updates - web-components
  chore:(react-nav-preview) Scaffold AppItem (microsoft#32088)
  docs(`react-teaching-popover`): Adding subcomponents' API to `TeachingPopover` documentation page (microsoft#32084)
  feat(web-components): relax setTheme() argument type to allow custom tokens (microsoft#32087)
  release: applying package updates - react-components
  [Chore]: Create Spinner base class to abstract out style and layout specific api. (microsoft#32067)
  [Chore]: Create Progress Bar base class to abstract out style and layout specific api. (microsoft#32066)
  fix(react-storybook-addon): transform decorator to function in withAriaLive() (microsoft#32011)
  fix(motion): improve Web Animations API detection in tests (microsoft#32029)
  chore(eslint-plugin): removes type dependency on @fluentui/react-utilities internals in ban-instanceof-html-element rule (microsoft#32072)
  release: applying package updates - react v8
  release: applying package updates - web-components
  Chore: Create Divider base class to abstract out style and layout specific api (microsoft#32065)
  fix(TimePicker): Clear text when date value changes to null (microsoft#31626)
  ...
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.

[Bug]: test environment not correctly detected in Jest for animations
3 participants