uno
uno copied to clipboard
Initial support for `ThemeShadow`
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:
- [ ] Docs have been added/updated which fit documentation template (for bug fixes / features)
- [x] Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
- [x] Validated PR
Screenshots Compare Test Runresults. - [x] Contains NO breaking changes
- [x] Associated with an issue (GitHub or internal) and uses the automatic close keywords.
- [x] Commits must be following the Conventional Commits specification.
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 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 👍 .
@DierkDroth Support for
ThemeShadowwill 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 theShadowReceviers, so the shadow is a simpler drop shadow. WinUI/WASDK support is handled directly by Microsoft, and I thinkThemeShadowshould 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 oh, that's actually good news, as Receivers were something that was kind of impossible to emulate 😀
@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 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 👍
Excellent! Thanks for follow up @MartinZikmund
@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?
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 is there a chance that this would be closed off?
@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
Hope to see this implemented soon
@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...
@jeromelaban the merge is blocked by the conventional commits validation, can you force merge?