unoplatform / Uno.Themes

This library is designed to help you use the Material, Fluent or Cupertino design system with the Uno Platform
https://platform.uno
Apache License 2.0
167 stars 28 forks source link

AppBarButton and Button behave differently when interacting with them. #1368

Open Suriman opened 1 month ago

Suriman commented 1 month ago

Current behavior

There are some differences in the behavior of both controls. For instance, when hovering the AppBarButton does not react as it is the case with the regular Button. There is also no difference in the appearance of the AppBarButton when it is enabled or disabled. This makes it difficult for the user to know if the associated command is available or not. There are other visual states, like 'Pressed' and 'Focused' where no effects can be applied.

Expected behavior

The AppBarButton should react to user interaction and changes on the enabled state.

How to reproduce it (as minimally and precisely as possible)

ButtonAndAppBarButtonBehaveDifferently.zip

  1. Open the attached solution and compile it.
  2. Execute it in any head given.
  3. Hover the AppBarButton and the Button to see the difference.
  4. Check and uncheck the CheckBox to see the different behaviors of both controls.

Environment

Nuget Package:

NuGet package(s): Uno.WinUI NuGet package version(s): Uno.WinUI 5.1.80

Package Version(s):

Affected platform(s):

Anything else we need to know?

kazo0 commented 1 month ago

The Material AppBarButton styles were mostly there for the native NavigationBar commands but I agree that if we are going to set them as the implicit style for AppBarButton then they should really be a complete style. Right now the template is extreme barebones.

Would be good to bring the visual states and structure from the original Fluent style and use the Material resources.

Thanks for the report @Suriman!