-
Notifications
You must be signed in to change notification settings - Fork 323
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 resize animations in Dialog #11643
Fix resize animations in Dialog #11643
Conversation
@@ -532,42 +520,40 @@ function AppRouter(props: AppRouterProps) { | |||
|
|||
return ( | |||
<FeatureFlagsProvider> | |||
<MotionConfig reducedMotion="user" transition={DEFAULT_TRANSITION_OPTIONS}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we only move the MotionConfig from <App />
to <UIProvider />
to reuse it in Storybook
/** | ||
* Helper hook that uses motion primitive to optimize renders, works best with motion components | ||
*/ | ||
export function useMeasureSignal(options: Options = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work yet with layout
prop, see: motiondivision/motion#2907
🧪 Storybook is successfully deployed!📊 Dashboard:
|
@@ -116,23 +116,21 @@ export function run(props: DashboardProps) { | |||
reactDOM.createRoot(root).render( | |||
<React.StrictMode> | |||
<QueryClientProvider client={queryClient}> | |||
<DevtoolsProvider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devtools provider no longer needed due to using the zustand
app/gui/src/dashboard/components/AriaComponents/Dialog/Modal.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR ✅
a36e5f0
to
264f232
Compare
6611f23
to
0e17420
Compare
This PR fixes the Resize animations in Dialog component: 1. Removes resize for initial mount / fullscreen dialogs 2. Fixes measuring the content size 3. Fixes bugs in `useMeasure` hook 4. Adds memoization for Text and Loader components (because of react-compiler and because this components accept only primitive values) (cherry picked from commit 0c7e79c)
Pull Request Description
This PR fixes the Resize animations in Dialog component:
useMeasure
hookImportant Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.