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

When using a querystring with Blazor apps the the default NavItem is not selected. #31312

Open
PaulSinnema opened this issue Mar 27, 2021 · 10 comments · May be fixed by #59903
Open

When using a querystring with Blazor apps the the default NavItem is not selected. #31312

PaulSinnema opened this issue Mar 27, 2021 · 10 comments · May be fixed by #59903
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-blazor-builtin-components Features related to the built in components we ship or could ship in the future good first issue Good for newcomers. help candidate Indicates that the issues may be a good fit for community to help with. Requires work from eng. team Pillar: Technical Debt Priority:2 Work that is important, but not critical for the release

Comments

@PaulSinnema
Copy link

Describe the bug

This happens in a client side application.
When you use a NavItem in your MailLayout like in the default generated application and you call the application with a querystring f.i. https://localhost:123456/?CourseId=123456 then the first NavItem that normally becomes the selected one is displayed as not selected.

To Reproduce

  • Generate a new Blazor Client side application
  • Run the application
  • In the addressbar of the browser put a querystring behind the url f.i. https://localhost:44381/?CourseId=13333 and press enter
  • Notice how the 'Home' menu no longer is selected.
@mkArtakMSFT mkArtakMSFT added area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. labels Mar 27, 2021
@mkArtakMSFT mkArtakMSFT added this to the Backlog milestone Mar 29, 2021
@ghost
Copy link

ghost commented Mar 29, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mkArtakMSFT mkArtakMSFT added good first issue Good for newcomers. help wanted Up for grabs. We would accept a PR to help resolve this issue labels Mar 29, 2021
@PaulSinnema
Copy link
Author

We worked around this. When we receive the querystring we take the parameters we need and store it in the session objects. After that we redirect to the same page without the querystring. You do get a second load of the page but for a SPA that is not very disturbing and only the first time you reach the page.

@javiercn javiercn added the feature-blazor-builtin-components Features related to the built in components we ship or could ship in the future label Apr 20, 2021
@heidarj
Copy link

heidarj commented Apr 21, 2021

Hey I've taken a look at this and I suspect https://localhost:123456/?CourseId=123456 is not matching because the 'Home' NavLink for new Blazor projects has Match="NavLinkMatch.All" set. Maybe the documentation could be updated to clarify how the Match attribute works with querystrings?

@uabarahona
Copy link
Contributor

This was a monster!

@captainsafia @pranavkm should this be closed already?

@PaulSinnema
Copy link
Author

This a very ugly bug. Don't close it but solve it please.

@ghost
Copy link

ghost commented Nov 11, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@PaulSinnema
Copy link
Author

Very dissapointing

@igotinfected
Copy link

Looking into getting this finished by basing myself on #32168.

@mkArtakMSFT mkArtakMSFT removed the ss-p2 label Nov 22, 2022
@mkArtakMSFT mkArtakMSFT added help candidate Indicates that the issues may be a good fit for community to help with. Requires work from eng. team and removed help wanted Up for grabs. We would accept a PR to help resolve this issue labels Oct 28, 2023
@mkArtakMSFT mkArtakMSFT modified the milestones: Backlog, BlazorPlanning Nov 5, 2023
@mkArtakMSFT mkArtakMSFT removed this from the Planning: WebUI milestone Dec 14, 2023
@mkArtakMSFT mkArtakMSFT added this to the .NET 9 Planning milestone Dec 14, 2023
@ghost
Copy link

ghost commented Dec 14, 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.

@mkArtakMSFT mkArtakMSFT added the Priority:1 Work that is critical for the release, but we could probably ship without label Jan 11, 2024
@vgallegob
Copy link

That sounds confusing for user experience

@danroth27 danroth27 added Priority:2 Work that is important, but not critical for the release and removed Priority:1 Work that is critical for the release, but we could probably ship without labels Jan 13, 2025
@ilonatommy ilonatommy linked a pull request Jan 16, 2025 that will close this issue
@ilonatommy ilonatommy self-assigned this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-blazor-builtin-components Features related to the built in components we ship or could ship in the future good first issue Good for newcomers. help candidate Indicates that the issues may be a good fit for community to help with. Requires work from eng. team Pillar: Technical Debt Priority:2 Work that is important, but not critical for the release
Projects
None yet
11 participants