dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22k stars 1.72k forks source link

Shell's back behavior using GoToAsync("..") triggers no page transition for first detail page on iOS #19074

Open christianrr opened 9 months ago

christianrr commented 9 months ago

Description

When navigating back from a detail page in Shell to the root page by using GoToAsync(".."), there is no page transition visible on iOS (=slide transition). The root page appears instantly.

The navbar's back button behaves correctly and shows the back transition on both platforms. Also calling Shell.Current.Navigation.PopAsync() shows the correct behavior on both platforms.

The page transition on iOS does not work only if navigating back to the root page on the navigation stack. If there are multiple pages on the stack it works as expected.

Steps to Reproduce

--> no page slide transition is visible on iOS (Android works as expected)

Link to public reproduction project repository

https://github.com/christianrr/Maui_Shell_NavIssue

Version with bug

8.0.3

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

Calling await Shell.Current.Navigation.PopAsync(); instead of GoToAsync("..")

Relevant log output

No response

ghost commented 9 months ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

mattleibow commented 9 months ago

@PureWeen thoughts?

XamlTest commented 8 months ago

Verified this on Visual Studio Enterprise 17.9.0 Preview 2(8.0.3). Repro on iOS 17.0 with below Project: Maui_Shell_NavIssue.zip iOS:

https://github.com/dotnet/maui/assets/97647558/3e1b01f2-30ec-4c61-8732-bbbde04f22f4

Android 13.0-API33 emulator: Also repro on my side. Android

kubaflo commented 7 months ago

@christianrr @mattleibow I believe it is not a bug. Both iOS and Android apps behave in the same way. Unless you explicitly set that the navigation should be animated like await Shell.Current.GoToAsync("..", animate: true); you won't observe the animation

https://github.com/dotnet/maui/assets/42434498/e46fec8d-eb31-4749-a15a-2a4828049318