Skip to content

Conversation

@rohanprasadofficial
Copy link
Contributor

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

This PR targets to make work animation on switch using Animated API instead of Layout Animations.
Layout Animations are very heaving and have effect on parent as well which using the Switch , there were some known bug like controlled switch was not working with Layout Animations.

Note :
This is only target Android for now but it will work on iOS , I have tested the animation on iOS as well.

Verification

Visual Verification.

Added the screenshot on both Android and iOS.

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

@rohanprasadofficial rohanprasadofficial force-pushed the switch-animation branch 2 times, most recently from 65683b6 to d63358b Compare December 23, 2022 10:59
@rohanprasadofficial
Copy link
Contributor Author

Animation work with Animated API as well on iOS.
I tested it on iOS tester app with some broken tokens but animation looks good. When iOS tokens are in , seems it should look fine , maybe some small changes required.

Screen.Recording.2022-12-23.at.2.47.42.PM.mov

@rohanprasadofficial
Copy link
Contributor Author

Screen recording for Android - Switch Animation

Screen.Recording.2022-12-23.at.4.45.55.PM.mov

@rohanprasadofficial rohanprasadofficial changed the title [Switch] Animation using Animated API , Removing LayoutAnimation [Not ready for review ][Switch] Animation using Animated API , Removing LayoutAnimation Dec 23, 2022
@rohanprasadofficial rohanprasadofficial marked this pull request as ready for review December 27, 2022 13:50
@rohanprasadofficial rohanprasadofficial requested a review from a team as a code owner December 27, 2022 13:50
@rohanprasadofficial rohanprasadofficial changed the title [Not ready for review ][Switch] Animation using Animated API , Removing LayoutAnimation [Switch] Animation using Animated API , Removing LayoutAnimation Dec 28, 2022
@rohanprasadofficial
Copy link
Contributor Author

Latest screenshot with correct token values :

Light Mode Dark Mode
Screenshot_1672204526 Screenshot_1672204567

@rohanprasadofficial
Copy link
Contributor Author

Latest screenshot with correct token values :

Dark Mode Light Mode
Screenshot_1672827239 Screenshot_1672827232

IPhone/iOS screenshot with incorrect token :

Screenshot 2023-01-04 at 4 45 30 PM

@rohanprasadofficial
Copy link
Contributor Author

IPhone/iOS screen current behaviour with incorrect tokens.

Screen.Recording.2023-01-04.at.4.45.35.PM.mov

Android screen current behaviour with correct tokens.

Screen.Recording.2023-01-04.at.3.44.27.PM.mov

@rurikoaraki
Copy link
Collaborator

Tested on win32, behavior looks good

@rohanprasadofficial
Copy link
Contributor Author

Tested on win32, behavior looks good

Thanks for testing it @rurikoaraki , really appreciate your time 😃

@rohanprasadofficial rohanprasadofficial merged commit 8257914 into microsoft:main Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants