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

Shell Relative Routes Documentation Incorrect? #24292

Open BurningLights opened 3 months ago

BurningLights commented 3 months ago

Description

According to the docs at https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/navigation?view=net-maui-8.0#relative-routes, shell routes with different numbers of slashes should do different things. However, reading and stepping through the navigation code, I can't actually identify any general difference between the two types of relative routes and the two types of absolute routes. Routes with no slash and a single leading slash seem to behave the same, and routes with two and three leading slashes seem to behave the same.

The only spot I can identify where no slashes vs one slash or two slashes vs three slashes would make a difference is in this line: https://github.com/dotnet/maui/blob/61e984eb01fa8fa7fd7133a68bd76008865a01a0/src/Controls/src/Core/Shell/ShellUriHandler.cs#L318. It compares the original route request against the registered route strings. However, any arbitrary character would make a difference there. It seems going back to the original Xamarin Forms spec for shell routes, there was a plan for each number of slashes, which is reflected in the docs. But, is it possible that the implementation actually ended up only differentiating between absolute and relative routes, rather than having two types of each?

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.80 SR8

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)

Affected platform versions

All

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

jfversluis commented 3 months ago

@PureWeen @davidbritch ?