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
22.28k stars 1.76k forks source link

[WinUI] shell doesn't navigate to bottom tabs from subpage #18135

Open sasharp opened 1 year ago

sasharp commented 1 year ago

Description

If you navigate from a bottom tab to a subpage, you can't navigate to another bottom tabs over shell tabs.

The navigation Bottom Tab: MainPage -> SubPage -> Bottom Tab: Page2 fails

It looks like you stay on subpage, but if you click back button, you will see Page2. image

Steps to Reproduce

  1. Go to MainPage
  2. Go to SubPage
  3. Navigate over shell tabs to Page2
  4. Optionaly click back button

Link to public reproduction project repository

https://github.com/sasharp/MAUI8Bugs

Version with bug

8.0.0-rc.2.9373

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

ghost commented 1 year 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.

sasharp commented 1 month ago

Here is a possible cause of the problem. First of all: Navigating event doesn't fire by navigation between (bottom) tabs.

  1. navigate to SubPage (//tabbar/tab1/mainpage/subpage)
  2. navigate to Page2 (//tabbar/tab1/page2/) Image

After 2. fires Navigated event, which shows wrong current location (//tabbar/tab1/page2/subpage) Image

It looks like navigation replaces routes of (bottom) tabs, but not pathes after them. It brings to wrong route, but the app doesn't crash as expected and stays on the same page.

It makes tabbed shell unusable in WinUI. Any fixes for this?