Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for ThemeShadow #6362

Merged

Conversation

MartinZikmund
Copy link
Member

@MartinZikmund MartinZikmund commented Jun 28, 2021

GitHub Issue (If applicable): part of #11115

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:

@gitpod-io
Copy link

gitpod-io bot commented Jun 28, 2021

@MartinZikmund MartinZikmund self-assigned this Jun 28, 2021
@MartinZikmund MartinZikmund force-pushed the dev/mazi/themeshadow-wasm branch 2 times, most recently from 85b8ef5 to 4168514 Compare July 14, 2021 10:41
@MartinZikmund MartinZikmund mentioned this pull request Aug 13, 2021
12 tasks
@MartinZikmund MartinZikmund mentioned this pull request Sep 27, 2021
9 tasks
@MartinZikmund MartinZikmund force-pushed the dev/mazi/themeshadow-wasm branch 2 times, most recently from 34a2052 to 449f2fc Compare November 2, 2021 11:37
@MartinZikmund MartinZikmund marked this pull request as ready for review November 9, 2021 13:35
@MartinZikmund MartinZikmund requested a review from a team November 9, 2021 13:35
src/Uno.UI/UI/Xaml/Media/ThemeShadowManager.iOSmacOS.cs Outdated Show resolved Hide resolved
src/Uno.UI/UI/Xaml/UIElement.cs Outdated Show resolved Hide resolved
src/Uno.UI/UI/Xaml/UIElement.wasm.cs Outdated Show resolved Hide resolved
src/Uno.UI/UI/Xaml/UIElementWeakCollection.cs Outdated Show resolved Hide resolved
@DierkDroth
Copy link

DierkDroth commented Jan 1, 2022

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?

@MartinZikmund
Copy link
Member Author

@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
Copy link

DierkDroth commented Jan 1, 2022

@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.

@MartinZikmund
Copy link
Member Author

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

@DierkDroth
Copy link

DierkDroth commented Mar 8, 2022

@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
Copy link

@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...

@MartinZikmund MartinZikmund marked this pull request as ready for review February 5, 2023 21:46
@MartinZikmund
Copy link
Member Author

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

@MartinZikmund MartinZikmund merged commit caceba6 into unoplatform:master Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/automation Categorizes an issue or PR as relevant to project automation area/skia ✏️ Categorizes an issue or PR as relevant to Skia platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants