Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell Relative Routes Documentation Incorrect? #2668

Open
BurningLights opened this issue Aug 17, 2024 · 3 comments
Open

Shell Relative Routes Documentation Incorrect? #2668

BurningLights opened this issue Aug 17, 2024 · 3 comments
Assignees
Labels

Comments

@BurningLights
Copy link

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

Copy link
Contributor

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
Copy link
Member

@PureWeen @davidbritch ?

@PureWeen PureWeen transferred this issue from dotnet/maui Dec 6, 2024
@dotnetrepoman dotnetrepoman bot added the ⌚ Not Triaged Not triaged label Dec 6, 2024
@PureWeen
Copy link
Member

PureWeen commented Dec 6, 2024

https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/navigation?view=net-maui-8.0#relative-routes

I think we should just replace this entire section with a warning

  • Only Pages defined with RegisterRoute can be pushed onto the navigation stack using relative routing
  • Relative Routing does not work with anything that's defined inside the Shell structure
  • Absolute routing currently does not work with anything registered using RegisterRoute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

4 participants