Skip to content
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

Merged
merged 15 commits into from
Nov 28, 2024

Conversation

MrFlashAccount
Copy link
Contributor

Pull Request Description

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)

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@MrFlashAccount MrFlashAccount self-assigned this Nov 25, 2024
@MrFlashAccount MrFlashAccount added the CI: No changelog needed Do not require a changelog entry for this PR. label Nov 25, 2024
@@ -532,42 +520,40 @@ function AppRouter(props: AppRouterProps) {

return (
<FeatureFlagsProvider>
<MotionConfig reducedMotion="user" transition={DEFAULT_TRANSITION_OPTIONS}>
Copy link
Contributor Author

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 = {}) {
Copy link
Contributor Author

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

Copy link

github-actions bot commented Nov 25, 2024

🧪 Storybook is successfully deployed!

📊 Dashboard:

@@ -116,23 +116,21 @@ export function run(props: DashboardProps) {
reactDOM.createRoot(root).render(
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<DevtoolsProvider>
Copy link
Contributor Author

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

Copy link
Contributor

@somebody1234 somebody1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR ✅

@MrFlashAccount MrFlashAccount added the CI: Keep up to date Automatically update this PR to the latest develop. label Nov 26, 2024
@jdunkerley jdunkerley removed the CI: Keep up to date Automatically update this PR to the latest develop. label Nov 27, 2024
@MrFlashAccount MrFlashAccount force-pushed the wip/sergeigarin/fix-dialog-resize-animations branch from a36e5f0 to 264f232 Compare November 28, 2024 09:56
@MrFlashAccount MrFlashAccount force-pushed the wip/sergeigarin/fix-dialog-resize-animations branch from 6611f23 to 0e17420 Compare November 28, 2024 12:34
@MrFlashAccount MrFlashAccount added the CI: Ready to merge This PR is eligible for automatic merge label Nov 28, 2024
@mergify mergify bot merged commit 0c7e79c into develop Nov 28, 2024
49 of 51 checks passed
@mergify mergify bot deleted the wip/sergeigarin/fix-dialog-resize-animations branch November 28, 2024 19:15
jdunkerley pushed a commit that referenced this pull request Nov 29, 2024
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge g-dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants