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

Closed
BurningLights opened this issue Aug 17, 2024 · 3 comments · Fixed by #2731
Closed

Shell Relative Routes Documentation Incorrect? #2668

BurningLights opened this issue Aug 17, 2024 · 3 comments · Fixed by #2731
Assignees
Labels
doc-enhancement Improve the current content [org] dotnet-mobile/svc Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@BurningLights
Copy link

BurningLights commented Aug 17, 2024

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


Associated WorkItem - 359141

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

@davidbritch davidbritch added doc-enhancement Improve the current content [org] Pri1 High priority, do before Pri2 and Pri3 and removed Pri3 ⌚ Not Triaged Not triaged labels Dec 20, 2024
@dotnetrepoman dotnetrepoman bot added ⌚ Not Triaged Not triaged labels Dec 20, 2024
@davidbritch davidbritch removed the ⌚ Not Triaged Not triaged label Dec 20, 2024
@dotnetrepoman dotnetrepoman bot added the ⌚ Not Triaged Not triaged label Dec 20, 2024
@dotnetrepoman dotnetrepoman bot removed the ⌚ Not Triaged Not triaged label Dec 20, 2024
@davidbritch davidbritch added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Jan 2, 2025
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org] dotnet-mobile/svc Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants