From bb450b8f0b1695a52e31ded8c9ce6b6869c4c88c Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Sat, 26 Aug 2023 01:35:57 +0200 Subject: [PATCH 1/5] fix: remove duplicated code due to a merge conflict --- .github/CODEOWNERS | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 49296d735b7ff..5c5328309c079 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -241,7 +241,6 @@ packages/react-components/react-search-preview @microsoft/cxe-coastal packages/react-components/react-colorpicker-compat @microsoft/cxe-red @sopranopillow packages/react-components/react-motion-preview @microsoft/cxe-prg @marcosmoura packages/react-components/react-nav-preview @microsoft/cxe-red @mltejera -packages/react-components/react-motion-preview @microsoft/cxe-prg @marcosmoura # <%= NX-CODEOWNER-PLACEHOLDER %> ## Components From e13508455084aafa12d6da32049d8aa488b2ce92 Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Sat, 26 Aug 2023 01:38:30 +0200 Subject: [PATCH 2/5] fix: revert changes to CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5c5328309c079..cb7af7f60a7e0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -239,8 +239,8 @@ packages/react-components/react-jsx-runtime @microsoft/teams-prg packages/react-components/react-toast @microsoft/teams-prg packages/react-components/react-search-preview @microsoft/cxe-coastal packages/react-components/react-colorpicker-compat @microsoft/cxe-red @sopranopillow -packages/react-components/react-motion-preview @microsoft/cxe-prg @marcosmoura packages/react-components/react-nav-preview @microsoft/cxe-red @mltejera +packages/react-components/react-motion-preview @microsoft/cxe-prg @marcosmoura # <%= NX-CODEOWNER-PLACEHOLDER %> ## Components From 55aee81e0a51bd2e8989ab4150a96be50420f153 Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Sat, 26 Aug 2023 03:00:32 +0200 Subject: [PATCH 3/5] fix: generate new API documentation --- .../react-motion-preview/etc/react-motion-preview.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/react-motion-preview/etc/react-motion-preview.api.md b/packages/react-components/react-motion-preview/etc/react-motion-preview.api.md index 208840c392ac1..0361130acce4c 100644 --- a/packages/react-components/react-motion-preview/etc/react-motion-preview.api.md +++ b/packages/react-components/react-motion-preview/etc/react-motion-preview.api.md @@ -29,7 +29,7 @@ export type MotionState = { }; // @public (undocumented) -export type MotionType = 'unmounted' | 'entering' | 'entered' | 'idle' | 'exiting' | 'exited'; +export type MotionType = 'entering' | 'entered' | 'idle' | 'exiting' | 'exited' | 'unmounted'; // @public export function useMotion(shorthand: MotionShorthand, options?: MotionOptions): MotionState; From c5e204d2437d6db2bd701001e5f9751bef50557b Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Mon, 28 Aug 2023 14:14:47 +0200 Subject: [PATCH 4/5] fix: remove ref from dependencies Co-authored-by: Bernardo Sunderhus --- .../react-motion-preview/src/hooks/useMotion.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-components/react-motion-preview/src/hooks/useMotion.ts b/packages/react-components/react-motion-preview/src/hooks/useMotion.ts index 120e4d459b492..d0857fdcd5354 100644 --- a/packages/react-components/react-motion-preview/src/hooks/useMotion.ts +++ b/packages/react-components/react-motion-preview/src/hooks/useMotion.ts @@ -180,9 +180,9 @@ function useMotionPresence( ref, type, active, - canRender: type !== 'unmounted', - }), - [active, ref, type], + // No need to add ref to the deps array as it is stable + // eslint-disable-next-line react-hooks/exhaustive-deps + [active, type], ); } From 83ef7e14ef6073e4fbc0e79adbe82048b5387c1c Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Mon, 28 Aug 2023 14:32:20 +0200 Subject: [PATCH 5/5] fix: wrong merge --- .../react-motion-preview/src/hooks/useMotion.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-components/react-motion-preview/src/hooks/useMotion.ts b/packages/react-components/react-motion-preview/src/hooks/useMotion.ts index d0857fdcd5354..49237bfa9f9ac 100644 --- a/packages/react-components/react-motion-preview/src/hooks/useMotion.ts +++ b/packages/react-components/react-motion-preview/src/hooks/useMotion.ts @@ -180,6 +180,8 @@ function useMotionPresence( ref, type, active, + canRender: type !== 'unmounted', + }), // No need to add ref to the deps array as it is stable // eslint-disable-next-line react-hooks/exhaustive-deps [active, type],