maui icon indicating copy to clipboard operation
maui copied to clipboard

Different behaviours of Shell Flyout on macOS vs WinUI

Open WisJamison opened this issue 2 years ago • 7 comments

Description

Hi, I found some different behaviours of Shell Flyout in Mac catalyst vs WinUI

  1. Hamburger button has different locations: Title bar for WinUI vs below TitleBar for Mac Catalyst. image image
  • So when I setting Shell.NavBarIsVisible="False", on macOS, the Hamburger Button will disappear, while on Windows, it will still there
  1. When I set Shell.FlyoutBehavior="Disabled"
  • If I clicked outside of the Flyout, Flyout will be closed on Windows while still open on macOS
  1. When I set Shell.FlyoutBehavior="Flyout"
  • If I clicked on a layout (stack layout, grid, etc.) within the Flyout, Flyout will be closed on macOS;
  • If I clicked on a button within the Flyout, Flyout still be keep open on macOS;
  • While on Windows, the Flyout will keep open both when clicking on a layout and button image

Steps to Reproduce

  1. Download the sample project;
  2. Give different Value to Shell.NavBarIsVisible and Shell.FlyoutBehavior just as I mentioned in Description Section and see different behaviors in macOS and Windows.

Link to public reproduction project repository

https://github.com/WisJamison/Flyout-Behaviour-Sample

Version with bug

7.0.86

Last version that worked well

Unknown/Other

Affected platforms

I was not able test on other platforms

Affected platform versions

macOS Version 13.3.1, Window 10.0.19044.2965

Did you find any workaround?

No.

Relevant log output

No response

WisJamison avatar Jun 05 '23 10:06 WisJamison

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Jun 05 '23 14:06 ghost

@WisJamison for item one, if you were able to hide the Flyout Button on windows does that give you what you need?

PureWeen avatar Jun 11 '23 00:06 PureWeen

@PureWeen Yes, it's my expectation.

WisJamison avatar Jun 16 '23 06:06 WisJamison

@PureWeen for point 2 what we are looking for is the flyout to close when you click outside of it on Mac, just as it does on Windows. For point 3, the expected behavior is for any click within the flyout to keep the flyout open on Mac, just as it does on Windows. TIA!

faustmet avatar Jun 16 '23 16:06 faustmet

I added workaround code to AppShell.xaml and .cs to the repro. please take a look and let me what is missing

linkaiyu avatar Jun 27 '23 03:06 linkaiyu

There are 2 more piece of functionality we are looking for with the flyout across BOTH windows and Mac OS- 4. When a user has flyout open, they would like to interact with a window (click button, close window) inside the container and have BOTH the flyout dismiss as well as have the action clicked, fire. 5. I would like to have the ability to close the flyout after clicking a button in the flyout. I think this should be a configurable option we may want to give users in the future. The thought is that after initial setup, users most likely only want to open one tool at a time from the flyout. This behavior is consistent with how the windows Start menu behaves, it closes after a tool is selected. I would also like this option to behave consistently across windows and mac OS when turned ON.

faustmet avatar Jul 05 '23 16:07 faustmet

Verified this on Visual Studio Enterprise 17.9.0 Preview 1(8.0.3). Results as below: Repro project: Flyout-Behavior.zip

  1. Issue 1 does not repro on 8.0.3. When setting Shell.NavBarIsVisible="False", the Hamburger Button disappeared on Windows and MacOS. image
  2. Issue 2 still repro on 8.0.3. When setting Shell.FlyoutBehavior="Disabled", clicked outside of the Flyout, Flyout will be closed on Windows while still open on macOS.
  3. Issue 3 still repro on 8.0.3. When setting Shell.FlyoutBehavior="Flyout", clicked on a Layout Item within the Flyout, Flyout will be closed on macOS while throw an exception "System.NotImplementedException" on Windows. Windows: image

XamlTest avatar Nov 23 '23 08:11 XamlTest

Another variation is if you install an iOS app on a M1 Mac or above, not as a Mac catalyst, but as an iOS app. If the user resizes the window when the Flyout is supposed to collapse - it will lock up and crash the app.

You can see this by using TestFlight and install the iOS app on the Mac.

logikonline avatar Aug 09 '24 22:08 logikonline