fix(react-skeleton): update wave animation#32077
Merged
dmytrokirpa merged 3 commits intomicrosoft:masterfrom Aug 5, 2024
Merged
fix(react-skeleton): update wave animation#32077dmytrokirpa merged 3 commits intomicrosoft:masterfrom
dmytrokirpa merged 3 commits intomicrosoft:masterfrom
Conversation
Collaborator
📊 Bundle size report
Unchanged fixtures
|
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| FluentProviderWithTheme | virtual-rerender | 40 | 30 | 10 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 648 | 617 | 5000 | |
| Button | mount | 304 | 332 | 5000 | |
| Field | mount | 1168 | 1108 | 5000 | |
| FluentProvider | mount | 704 | 720 | 5000 | |
| FluentProviderWithTheme | mount | 87 | 88 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 40 | 30 | 10 | Possible regression |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 78 | 83 | 10 | |
| MakeStyles | mount | 895 | 987 | 50000 | |
| Persona | mount | 1816 | 1719 | 5000 | |
| SpinButton | mount | 1408 | 1506 | 5000 | |
| SwatchPicker | mount | 1659 | 1648 | 5000 |
fabricteam
reviewed
Jul 23, 2024
change/@fluentui-react-skeleton-2297a865-9a11-49df-a53b-7ae13309e3d7.json
Show resolved
Hide resolved
...omponents/react-skeleton/library/src/components/SkeletonItem/useSkeletonItemStyles.styles.ts
Outdated
Show resolved
Hide resolved
marcosmoura
approved these changes
Jul 25, 2024
Contributor
spmonahan
reviewed
Jul 25, 2024
...omponents/react-skeleton/library/src/components/SkeletonItem/useSkeletonItemStyles.styles.ts
Outdated
Show resolved
Hide resolved
...omponents/react-skeleton/library/src/components/SkeletonItem/useSkeletonItemStyles.styles.ts
Outdated
Show resolved
Hide resolved
...omponents/react-skeleton/library/src/components/SkeletonItem/useSkeletonItemStyles.styles.ts
Outdated
Show resolved
Hide resolved
...omponents/react-skeleton/library/src/components/SkeletonItem/useSkeletonItemStyles.styles.ts
Outdated
Show resolved
Hide resolved
...omponents/react-skeleton/library/src/components/SkeletonItem/useSkeletonItemStyles.styles.ts
Outdated
Show resolved
Hide resolved
bee7017 to
c68ef6c
Compare
Contributor
Author
|
@spmonahan The design specification does not provide specific values for the |
spmonahan
approved these changes
Aug 5, 2024
layershifter
approved these changes
Aug 5, 2024
tomi-msft
approved these changes
Aug 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Previous Behavior
Under CPU load, the spinning animation produces jank and frames are dropped because the animation relies on the main thread to update.
This can be observed by the fact that the animation is painting every frame. In Edge DevTools, press Ctrl+Shift+P to show green rectangles on paint.

New Behavior
The main idea is to utilize
transform: translateXinstead of thebackgroundPositionXfor "wave" animations. This approach delegates the animation to the compositor thread, enhancing performance regardless of the CPU load.Related Issue(s)