feat: Add context to configure motion behaviour#32316
Merged
ling1726 merged 11 commits intomicrosoft:masterfrom Aug 16, 2024
Merged
feat: Add context to configure motion behaviour#32316ling1726 merged 11 commits intomicrosoft:masterfrom
ling1726 merged 11 commits intomicrosoft:masterfrom
Conversation
Adds a context that will disable motions by calling `finish` on animations which will apply finished animation styles directly to motion children
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| FluentProviderWithTheme | virtual-rerender | 36 | 32 | 10 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 628 | 640 | 5000 | |
| Button | mount | 297 | 309 | 5000 | |
| Field | mount | 1131 | 1150 | 5000 | |
| FluentProvider | mount | 699 | 722 | 5000 | |
| FluentProviderWithTheme | mount | 75 | 84 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 36 | 32 | 10 | Possible regression |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 86 | 78 | 10 | |
| MakeStyles | mount | 877 | 856 | 50000 | |
| Persona | mount | 1779 | 1720 | 5000 | |
| SpinButton | mount | 1423 | 1447 | 5000 | |
| SwatchPicker | mount | 1609 | 1642 | 5000 |
packages/react-components/react-motion/library/src/factories/createPresenceComponent.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createPresenceComponent.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createPresenceComponent.ts
Outdated
Show resolved
Hide resolved
fabricteam
reviewed
Aug 15, 2024
packages/react-components/react-motion/library/src/factories/createMotionComponent.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createMotionComponent.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/contexts/MotionBehaviourContext.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createMotionComponent.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createPresenceComponent.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createPresenceComponent.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createPresenceComponent.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createPresenceComponent.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createPresenceComponent.ts
Show resolved
Hide resolved
ling1726
commented
Aug 15, 2024
change/@fluentui-react-motion-051564b3-04af-45b4-b634-c0494efb621b.json
Outdated
Show resolved
Hide resolved
packages/react-components/react-motion/library/src/factories/createMotionComponent.ts
Show resolved
Hide resolved
layershifter
approved these changes
Aug 16, 2024
1 task
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.

Adds a context with a new
skipbehaviour for motions. This behaviour will immediately complete the motion and apply final motion styles.Fixes #32046