Skip to content

Fixed Query parameters not passed on Shell navigation #30034

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Vignesh-SF3580
Copy link
Contributor

@Vignesh-SF3580 Vignesh-SF3580 commented Jun 17, 2025

Issue Detail

When navigating to a page using Shell with query parameters (e.g., via [QueryProperty]), the expected query value was not available during navigation.

Root Cause

In Shell navigation with query parameters, the query attributes were being set on the page after it was assigned to the Content property. As a result, the query value was not available when the navigation occurred.

Description of Change

The query parameters (QueryAttributesProperty) are now assigned to the page before it is set to ContentCache in ShellContent. This ensures the query value is available to the page before the Navigated event is triggered.

Tested the behavior in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #10509
Fixes #11113
Fixes #29645

Screenshots

Before Issue Fix After Issue Fix
10509BeforeFix.mov
10509AfterFix.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jun 17, 2025
Copy link
Contributor

Hey there @@Vignesh-SF3580! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 17, 2025
@jsuarezruiz jsuarezruiz added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label Jun 18, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Vignesh-SF3580 Vignesh-SF3580 marked this pull request as ready for review June 18, 2025 12:11
@Copilot Copilot AI review requested due to automatic review settings June 18, 2025 12:11
@Vignesh-SF3580 Vignesh-SF3580 requested a review from a team as a code owner June 18, 2025 12:11
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures Shell query parameters are applied to pages before they’re cached, making them available during navigation. It also includes a UI test and sample pages to verify the fix.

  • Assigns QueryAttributes to the created page before setting ContentCache in ShellContent.
  • Removes redundant query-parameter assignment block.
  • Adds a HostApp sample and a Shared UI test for Issue 10509.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Controls/src/Core/Shell/ShellContent.cs Apply QueryAttributesProperty before populating ContentCache
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue10509.cs Add UI test to verify query parameter is passed on Shell navigation
src/Controls/tests/TestCases.HostApp/Issues/Issue10509.cs Add a Shell sample with two pages demonstrating query navigation
Comments suppressed due to low confidence (1)

src/Controls/tests/TestCases.HostApp/Issues/Issue10509.cs:3

  • The [Issue] attribute only lists PlatformAffected.Android, but the fix was validated on Android, Windows, iOS, and Mac. Consider updating the attribute to include all affected platforms for clarity.
[Issue(IssueTracker.Github, 10509, "Query parameter is missing after navigation", PlatformAffected.Android)]

@Vignesh-SF3580 Vignesh-SF3580 changed the title [Android, iOS, Mac] Fixed Query parameters not passed on Shell navigation Fixed Query parameters not passed on Shell navigation Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
2 participants