Skip to content

Conversation

@ASalavei
Copy link

@ASalavei ASalavei commented Nov 26, 2025

  • Implement Enter and Exit animation for Dialog
  • Exit animation performed using dedicated GraphicsLayer with content snapshot for fade-out animation
  • Add animateTransition parameter to the DialogProperties

Fixes https://youtrack.jetbrains.com/issue/CMP-4365/iOS-iOS-Dialog-has-no-enter-and-exit-animation

Animation
iOS:

Simulator.Screen.Recording.-.iPhone.16.-.2025-10-23.at.16.01.19.mp4

Desktop:

Screen.Recording.2025-10-23.at.15.50.47.mov

Comparing with Android:

Screen.Recording.2025-09-01.at.16.03.32.mov

Release Notes

Features - Multiple Platforms

  • Add enter end exit animation for Dialog. It might have disabled via DialogProperties.animateTransition or via global feature flag ComposeUiFlags.isDialogAnimationEnabled

@ASalavei ASalavei changed the title Andrei.salavei/dialog animation Implement enter end exit animation for Dialog Nov 26, 2025
ASalavei added a commit that referenced this pull request Dec 4, 2025
Required due to the introduction of a new API (#2596) that needs to be
consumed in material3

## Release Notes
N/A
@ASalavei ASalavei requested review from m-sasha and svastven December 4, 2025 12:10
@ASalavei ASalavei marked this pull request as ready for review December 4, 2025 12:11
@ASalavei ASalavei requested a review from MatkovIvan December 4, 2025 12:12
Copy link
Member

@MatkovIvan MatkovIvan left a comment

Choose a reason for hiding this comment

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

LGTM in general, just a few minor things

Copy link

@m-sasha m-sasha left a comment

Choose a reason for hiding this comment

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

Can we add a test that validates the crash we had with the previous solution (due to reparenting the content) doesn't happen?

@ASalavei ASalavei requested a review from MatkovIvan December 4, 2025 14:00
@ASalavei
Copy link
Author

ASalavei commented Dec 4, 2025

Can we add a test that validates the crash we had with the previous solution (due to reparenting the content) doesn't happen?

Done

@ASalavei ASalavei requested a review from m-sasha December 4, 2025 17:00
Copy link
Member

@MatkovIvan MatkovIvan left a comment

Choose a reason for hiding this comment

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

LGTM, just styling nitpicks

PS can't wait for adoption of automated formatter check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants