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

Provide a more intelligent routing fallback for Blazor apps that only falls back if the route matches a routable component #42003

Closed
danroth27 opened this issue Jun 2, 2022 · 5 comments
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-routing Features related to routing in Blazor applications Priority:2 Work that is important, but not critical for the release

Comments

@danroth27
Copy link
Member

The Blazor fallback logic always falls back to the specified route even if the original route doesn't match any routable components. This can be problematic in some cases, like in ASP.NET to ASP.NET Core app migration scenarios where you want to allow any unhandled requests to be proxied elsewhere. The Cocoon project currently uses some custom logic to identify all of the routable components and then only falls back for the component routes. We'll need something similar to support migrating to Blazor in our own incremental migration support based on YARP. We could provide some helpers that make this logic easier.

@TanayParikh TanayParikh added area-blazor Includes: Blazor, Razor Components feature-blazor-routing Features related to routing in Blazor applications labels Jun 2, 2022
@SteveSandersonMS
Copy link
Member

Sounds fine.

Implementation note: this would need to be an option, not a new default fallback behavior, because in general developers aren't required to use the built-in routing system and they might have a custom one of their own. We wouldn't be able to detect which URLs are matched by a custom router.

@javiercn javiercn added this to the .NET 7 Planning milestone Jun 6, 2022
@ghost
Copy link

ghost commented Jun 6, 2022

Thanks for contacting us.

We're moving this issue to the .NET 7 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Oct 12, 2022
@mkArtakMSFT mkArtakMSFT added the Priority:2 Work that is important, but not critical for the release label Nov 15, 2022
@SteveSandersonMS
Copy link
Member

We have this now.

@javiercn Do you feel the current implementation is sufficient for this to count as "done"? If so we can close it.

@ghost
Copy link

ghost commented Oct 6, 2023

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@javiercn
Copy link
Member

@danroth27 I am going to close this one as this is the way Blazor Web works.

@mkArtakMSFT mkArtakMSFT removed this from the .NET 9 Planning milestone Oct 24, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-routing Features related to routing in Blazor applications Priority:2 Work that is important, but not critical for the release
Projects
None yet
Development

No branches or pull requests

6 participants