Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Convert ShellContent transitions to use animators and be smarter about selecting visible content #13046

Merged
merged 4 commits into from
Dec 4, 2020

Conversation

PureWeen
Copy link
Contributor

@PureWeen PureWeen commented Dec 3, 2020

Description of Change

On iOS when transitioning really quickly the animations would start to overlap which would cause all the UIViews to become removed once the animations resolved. I converted over to using a UIViewPropertyAnimator so that I can cancel the animation if the user clicks quickly enough that it has resolved.

Once the animation concludes the code now just figures out who should be visible instead of using messy closures from whoever started the animation.

Issues Resolved

Platforms Affected

  • iOS

Testing Procedure

  • ui test included

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@PureWeen PureWeen removed the request for review from StephaneDelcroix December 3, 2020 22:04
@PureWeen PureWeen added this to To do in vNext+1 (5.0.0) via automation Dec 3, 2020
@PureWeen PureWeen added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Dec 3, 2020
@PureWeen PureWeen added this to the 5.0.0 milestone Dec 3, 2020
@PureWeen PureWeen moved this from To do to In Review in vNext+1 (5.0.0) Dec 3, 2020
Copy link
Contributor

@pictos pictos left a comment

Choose a reason for hiding this comment

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

Works as expected on my end.


currentRenderer.NativeView.Frame = new CGRect(-motionDirection * View.Bounds.Width, 0, View.Bounds.Width, View.Bounds.Height);
UIViewPropertyAnimator CreateContentAnimator(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GiampaoloGabba I'm thinking after this PR is merged we can make this or something close to this virtual for some added animation customizations!!

Copy link
Contributor

Choose a reason for hiding this comment

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

nice! i need to explore the other platforms renderers for the equivalent animation.
For now i jsut played with the NavigationPage (and shell equivalent) animatins, i skipped tabbed because we dont have animations in the TabbedPage for iOS.

For MAUI i will focus more on shell: is more flexibile. As today i dont use much shell because is not well integrated with libraries like PRISM, but from my understating this will change for MAUI, so maybe i will go "full-in" with shell animations

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

fix12642

@rmarinho rmarinho merged commit dddcf66 into 5.0.0 Dec 4, 2020
vNext+1 (5.0.0) automation moved this from In Review to Done Dec 4, 2020
@rmarinho rmarinho deleted the fix_12642 branch December 4, 2020 10:34
pictos pushed a commit to pictos/Xamarin.Forms that referenced this pull request Dec 30, 2020
…t selecting visible content (xamarin#13046) fixes xamarin#12642

* Convert to Property Animators

* - uitests

* Update ShellSectionRootRenderer.cs

* - fix nre
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/navigation a/shell 🐚 blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. partner/cat 😻 t/bug 🐛
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[iOS][Shell][Bug] Rapid ShellContent Navigation Causes Blank Screens
6 participants