maui icon indicating copy to clipboard operation
maui copied to clipboard

Fix Shell Flyout Menu Visibility Issue When Navigating Between TabBar and Flyout Items

Open vishnumenon2684 opened this issue 1 year ago • 3 comments

Issue:

In the sample, if there are both flyout items and tab bar items in the Shell, navigating to a TabBar item causes the flyout menu icon to disappear. However, when navigating back to a flyout item, the flyout menu is not visible.

Root Cause:

When navigating to a TabBar item, the flyout behavior is set to Disabled. Upon returning to a flyout item, the flyout behavior is not restored. This issue was previously working fine but regressed due to PR-23863. In that PR, navigating using services clears the previous sections content cache, so when navigating back to the flyout page, the page is unavailable, preventing the flyout behavior from being reset.

Fix:

When updating the flyout behavior, the visible page check is not required. Instead, it's necessary to verify whether the parent is a Shell section. Therefore, I replaced the check for the visible page with a check to ensure the CurrentItem is a ShellSectionController.

Fixes #25436

vishnumenon2684 avatar Oct 24 '24 17:10 vishnumenon2684

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

/backport to main

PureWeen avatar Oct 24 '24 17:10 PureWeen

Started backporting to main: https://github.com/dotnet/maui/actions/runs/11504316344

github-actions[bot] avatar Oct 24 '24 17:10 github-actions[bot]

The FlyoutBehavior value takes into account if the FlyoutBehavior is set on the Page itself which I think might cause this to miscalculate if the user has set FlyoutBehavior on the realized ContentPage

@PureWeen, based on the suggestion I'm looking for an alternate fix.

karthikraja-arumugam avatar Oct 29 '24 09:10 karthikraja-arumugam

rebase this for main please

Hi @PureWeen , I have rebased the PR to main.

vishnumenon2684 avatar Nov 01 '24 12:11 vishnumenon2684

/rebase

jfversluis avatar Nov 01 '24 12:11 jfversluis

/azp run

jfversluis avatar Nov 01 '24 12:11 jfversluis

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Nov 01 '24 12:11 azure-pipelines[bot]

Can you add a test?

I have added test cases @PureWeen

Ahamed-Ali avatar Nov 07 '24 08:11 Ahamed-Ali

/rebase

jsuarezruiz avatar Nov 08 '24 09:11 jsuarezruiz

/azp run

jsuarezruiz avatar Nov 12 '24 11:11 jsuarezruiz

/azp run

rmarinho avatar Nov 18 '24 00:11 rmarinho