uno icon indicating copy to clipboard operation
uno copied to clipboard

Initial support for `ThemeShadow`

Open MartinZikmund opened this issue 4 years ago • 11 comments

GitHub Issue (If applicable): #

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

ThemeShadow not supported

What is the new behavior?

Basic support for WASM and Android

PR Checklist

Please check if your PR fulfills the following requirements:

MartinZikmund avatar Jun 28 '21 11:06 MartinZikmund

gitpod-io[bot] avatar Jun 28 '21 11:06 gitpod-io[bot]

Happy New Year!

Curious, if this PR is merged: will ThemeShadow then be fully supported

  • works on all target platforms (which ones?)
  • in dark and light mode?
  • works on WinUI/WindowsAppSdk as well?

DierkDroth avatar Jan 01 '22 09:01 DierkDroth

@DierkDroth Support for ThemeShadow will be on all platforms, with slight appearance differences at first (this will be improved further) and it will work in both dark and light mode (although in dark mode it will be only slightly visible, similarly to UWP). The difference from UWP is that we can't (due to target platform's limitations) consider the ShadowReceviers, so the shadow is a simpler drop shadow. WinUI/WASDK support is handled directly by Microsoft, and I think ThemeShadow should be supported there already 👍 .

MartinZikmund avatar Jan 01 '22 12:01 MartinZikmund

@DierkDroth Support for ThemeShadow will be on all platforms, with slight appearance differences at first (this will be improved further) and it will work in both dark and light mode (although in dark mode it will be only slightly visible, similarly to UWP). The difference from UWP is that we can't (due to target platform's limitations) consider the ShadowReceviers, so the shadow is a simpler drop shadow. WinUI/WASDK support is handled directly by Microsoft, and I think ThemeShadow should be supported there already 👍 .

Thanks for your feedback @MartinZikmund FYI I just read that DropShadow and the .Receivers property would soon be legacy anyway https://docs.microsoft.com/en-us/windows/apps/design/layout/depth-shadow

Z-depth, or relative depth, and shadow are two ways to incorporate depth into your app to help users focus naturally and efficiently.

DierkDroth avatar Jan 01 '22 13:01 DierkDroth

@DierkDroth oh, that's actually good news, as Receivers were something that was kind of impossible to emulate 😀

MartinZikmund avatar Jan 01 '22 13:01 MartinZikmund

@MartinZikmund is ThemeShadow still being worked on? Is there an ETA available?

Also: when working it could be assigned e.g. to Border.Shadow and Border.Translation could be set to define the elevation, correct?

DierkDroth avatar Mar 08 '22 19:03 DierkDroth

@DierkDroth Yes, indeed, long overdue. I will try to finalize this asap.

could be assigned e.g. to Border.Shadow and Border.Translation could be set to define the elevation, correct?

Yes, indeed, that is how it is supposed to work 👍

MartinZikmund avatar Mar 08 '22 21:03 MartinZikmund

Excellent! Thanks for follow up @MartinZikmund

DierkDroth avatar Mar 09 '22 06:03 DierkDroth

@MartinZikmund BTW: Would you know if there is a way to get a 'white' ThemeColor (or any random color for that matter) in DARK scheme?

DierkDroth avatar Mar 10 '22 11:03 DierkDroth

Current TODOs:

  • Switch from drop shadow to CSS shadow filter on WASM
  • Create interop methods for WASM shadow set/unset
  • Find a way to use theme shadow with rounded corners on iOS, macOS and WASM (shaders?)

MartinZikmund avatar Mar 24 '22 12:03 MartinZikmund

@MartinZikmund is there a chance that this would be closed off?

DierkDroth avatar Jul 21 '22 15:07 DierkDroth

@jeromelaban @MartinZikmund

Sorry for poking, but what is the plan for ThemeShadow support (on WASM)? Would you mind sharing some insights on how you're looking at this feature and what priority you would consider?

Thanks in advance

DierkDroth avatar Nov 19 '22 05:11 DierkDroth

Hope to see this implemented soon

FrozDark avatar Nov 19 '22 06:11 FrozDark

@MartinZikmund FYI

I took the plunge and applied ElevatedView on WASM in theme XAML and code whereever shadow was missing. So, ThemeShadow on WASM no longer is of priority to me. Nevertheless, it would be great to see ThemeShadow support in UNO...

BTW I also tried to use ElevatedView on WindowsAppSDK (using latest Uno.WinUI bits) - since I actually find it nicer than the Windows default - but experienced a funny problem: after a few seconds and when moving the mouse around the shadow effect from ElevatedView vanishes and I 'only' saw the default shadow effect from WindowsAppSDK. Not sure if I did something wrong or if there really is an issue with ElevatedView on Windows...

DierkDroth avatar Feb 05 '23 08:02 DierkDroth

@jeromelaban the merge is blocked by the conventional commits validation, can you force merge?

MartinZikmund avatar Feb 06 '23 11:02 MartinZikmund