KEMBAR78
[iOS][Shell]Tab becomes blank after specific navigation pattern - fix by kubaflo · Pull Request #29825 · dotnet/maui · GitHub
Skip to content

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Jun 4, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Issues Fixed

Fixes #29798
Fixes #30280

Before After
Screen.Recording.2025-06-05.at.16.02.20.mov
Screen.Recording.2025-06-05.at.16.03.15.mov

@Copilot Copilot AI review requested due to automatic review settings June 4, 2025 15:42
@kubaflo kubaflo self-assigned this Jun 4, 2025
@kubaflo kubaflo requested a review from a team as a code owner June 4, 2025 15:42
@kubaflo kubaflo requested review from PureWeen and tj-devel709 June 4, 2025 15:42
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jun 4, 2025
Copy link
Contributor

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 fixes an issue where navigating back in the iOS Shell sometimes results in a blank tab by ensuring that the pop navigation request flag is properly set.

  • Renames the flag from a private "_popRequested" to an internal "popRequested" to allow external access from related renderers.
  • Modifies various navigation methods to use the new flag.
  • Introduces back navigation detection in ShellItemRenderer to set the flag appropriately.

Reviewed Changes

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

File Description
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs Replaces _popRequested with an internal popRequested field and updates its usage in navigation-related methods.
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellItemRenderer.cs Adds detection for back navigation by setting the popRequested flag from the associated ShellSectionRenderer.
Comments suppressed due to low confidence (2)

src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs:73

  • [nitpick] Changing the field from a private _popRequested to an internal popRequested may impact encapsulation. Please ensure that this change is intentional and documented to clarify why external access is now required.
internal bool popRequested;

src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellItemRenderer.cs:124

  • [nitpick] Directly setting the popRequested flag on ShellSectionRenderer in response to back navigation may tightly couple these components. Please verify that this design does not introduce unintended side effects or dependencies.
sectionRenderer.popRequested = true;

@kubaflo kubaflo added platform/ios area-controls-shell Shell Navigation, Routes, Tabs, Flyout area-controls-tabbedpage TabbedPage labels Jun 4, 2025
@kubaflo kubaflo marked this pull request as draft June 4, 2025 15:44
@kubaflo kubaflo marked this pull request as ready for review June 5, 2025 15:41
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Jul 1, 2025

/rebase

@PureWeen
Copy link
Member

PureWeen commented Jul 1, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Jul 2, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Jul 8, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Jul 8, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@github-project-automation github-project-automation bot moved this from Ready To Review to Changes Requested in MAUI SDK Ongoing Jul 8, 2025
Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

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

Just small questions and updates

PureWeen and others added 3 commits July 8, 2025 06:27
…ctionRenderer.cs

Co-authored-by: Rui Marinho <me@ruimarinho.net>
Co-authored-by: Rui Marinho <me@ruimarinho.net>
@PureWeen
Copy link
Member

PureWeen commented Jul 8, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen requested a review from jsuarezruiz July 8, 2025 13:05
@PureWeen PureWeen merged commit 1f6228c into dotnet:main Jul 9, 2025
126 of 129 checks passed
@github-project-automation github-project-automation bot moved this from Changes Requested to Done in MAUI SDK Ongoing Jul 9, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout area-controls-tabbedpage TabbedPage community ✨ Community Contribution p/0 Work that we can't release without platform/ios

Projects

Status: Done

4 participants