chore(Drawer): migrate to stable motion APIs#31668
chore(Drawer): migrate to stable motion APIs#31668layershifter merged 8 commits intomicrosoft:masterfrom
Conversation
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 643 | 653 | 5000 | |
| Button | mount | 299 | 306 | 5000 | |
| Field | mount | 1144 | 1120 | 5000 | |
| FluentProvider | mount | 724 | 713 | 5000 | |
| FluentProviderWithTheme | mount | 79 | 92 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 34 | 36 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 82 | 77 | 10 | |
| MakeStyles | mount | 862 | 848 | 50000 | |
| Persona | mount | 1818 | 1731 | 5000 | |
| SpinButton | mount | 1433 | 1393 | 5000 | |
| SwatchPicker | mount | 1628 | 1677 | 5000 |
📊 Bundle size report
🤖 This report was generated against ceacd96379e6d7268d1807a318a9b6f7c48f519b |
cfe6efc to
3119a3f
Compare
|
@marcosmoura can you please help with reviewing this PR? 🙏 |
...omponents/react-drawer/library/src/components/OverlayDrawer/useOverlayDrawerStyles.styles.ts
Show resolved
Hide resolved
...ges/react-components/react-drawer/library/src/components/InlineDrawer/renderInlineDrawer.tsx
Outdated
Show resolved
Hide resolved
|
@layershifter There is also a Motion Disabled stories example that is not working anymore. How can we implement a way to disable animations on the user side? |
Good catch 👍 This should be supported with #30700. Considering that there are at least three items related to #30700 in this PR, IMO it makes sense to implement first it. @marcosmoura I will put this PR on hold and will work on #30700. Thanks for feedback ❤️ |
|
@layershifter Might be for another PR, but another thing is the Multiple Levels example. Since we are moving the whole Drawer package to not use the hooks anymore, we should start thinking of a way to achieve a similar experience using the new Motion API. |
3119a3f to
3078741
Compare
ad1d868 to
5aae06d
Compare
...ry/src/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.ts
Show resolved
Hide resolved
02ddca6 to
4022110
Compare
@marcosmoura updated it, it's just <Drawer
backdropMotion={null}
surfaceMotion={null}
/> |
I updated that story, too 🐱 |
packages/react-components/react-drawer/stories/src/Drawer/DrawerMultipleLevels.stories.tsx
Show resolved
Hide resolved
6ecfb88 to
1691a31
Compare
4c714eb to
591dcd5
Compare
packages/react-components/react-drawer/library/src/components/InlineDrawer/useInlineDrawer.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-drawer/library/src/components/InlineDrawer/useInlineDrawer.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-drawer/stories/src/Drawer/DrawerMultipleLevels.stories.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-drawer/stories/src/Drawer/DrawerMultipleLevels.stories.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-drawer/stories/src/Drawer/DrawerMultipleLevels.stories.tsx
Show resolved
Hide resolved
63f4acf to
5cc2a2e
Compare
Previous Behavior
@fluentui/react-draweruses@fluentui/react-motion-preview.New Behavior
@fluentui/react-draweruses@fluentui/react-motion💪OverlayDrawergetsbackdropMotion&surfaceMotionslots,InlineDrawergetssurfaceMotionfor customizing motionsRelated Issue(s)
Fixes #30696.
Note on VR regressions
Visual regression tool reports visual regressions in
Drawer:All of them related to a missing
box-shadowwhich should betokens.shadow64. To confirm it, I went to a PR deployment & real docsite and changed value of--shadow64token torgb(85, 91, 255) 0px 0px 0px 3px, rgb(31, 193, 27) 0px 0px 0px 6px, rgb(255, 217, 19) 0px 0px 0px 9px, rgb(255, 156, 85) 0px 0px 0px 12px, rgb(255, 85, 85) 0px 0px 0px 15px:And the result matches:
Seems to be a glitch with VR tool 💥