Skip to content

Shadow container - #638

Merged
agneszitte merged 34 commits into
mainfrom
dev/jmaf/shadow-container
Aug 3, 2023
Merged

Shadow container#638
agneszitte merged 34 commits into
mainfrom
dev/jmaf/shadow-container

Conversation

@erikvilima

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): #

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@erikvilima
erikvilima force-pushed the dev/jmaf/shadow-container branch from 967585f to e8b2d35 Compare July 10, 2023 15:30
@erikvilima

Copy link
Copy Markdown
Contributor Author

The branch has been rebased from main, I'm getting some restore failures.

2
1

@Xiaoy312

@erikvilima
erikvilima force-pushed the dev/jmaf/shadow-container branch 4 times, most recently from e703a9c to 18441fc Compare July 14, 2023 14:02
Comment thread doc/controls/ShadowContainer.md Outdated
Comment thread doc/controls/ShadowContainer.md Outdated
Comment thread doc/controls/ShadowContainer.md Outdated
Comment thread src/Uno.Toolkit.UI/Controls/Shadows/Shadow.cs Outdated
Comment thread src/Uno.Toolkit.UI/Controls/Shadows/Shadow.cs Outdated
Comment thread src/Uno.Toolkit.UI/Controls/Shadows/ShadowContainer.cs Outdated
Comment thread src/Uno.Toolkit.UI/Controls/Shadows/ShadowContainer.cs Outdated
Comment thread src/Uno.Toolkit.UI/Controls/Shadows/ShadowContainer.cs Outdated
@github-actions

github-actions Bot commented Jul 18, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

@jeromelaban

Copy link
Copy Markdown
Member

The sample app is now available (#638 (comment)), and below is the webassembly render. Is the clipping of the shadow expected ? /cc @eriklimakc @roubachof

image

image

@erikvilima

erikvilima commented Jul 19, 2023

Copy link
Copy Markdown
Contributor Author

@jeromelaban Yes, Jean-Marie has mentioned the clipping on Android and Wasm, I think @carldebilly was the one looking into it.

unoplatform/uno#12877

@github-actions

github-actions Bot commented Jul 19, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

@kazo0

kazo0 commented Jul 19, 2023

Copy link
Copy Markdown
Contributor

The neumorphic textbox looks a little funky when it is focused:

Dark theme:
image

Light theme:
image

Comment thread doc/controls/ShadowContainer.md Outdated
Comment thread doc/controls/ShadowContainer.md Outdated
Comment thread doc/controls/ShadowContainer.md Outdated
Comment thread doc/controls/ShadowContainer.md
Comment thread samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.Shared/App.xaml.cs Outdated
Comment thread src/Uno.Toolkit.UI/Controls/Shadows/ShadowContainer.Properties.cs Outdated
Comment thread src/Uno.Toolkit.UI/Controls/Shadows/ShadowContainer.cs Outdated
}
}

private readonly ConcurrentDictionary<string, CacheBucket> _shadowsCache = new ConcurrentDictionary<string, CacheBucket>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i felt like when the shadows are being modified, the old cache arent being removed properly..?


public void AddOrUpdate(string key, SKImage image)
{
System.Diagnostics.Debug.WriteLine($"[ShadowsCache] AddOrUpdate => key: {key}");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be remove

if (!_shadowPropertyChanged)
{
// If a property has changed dynamically, we don't want to cache the updated shadows
Cache.AddOrUpdate(shadowsKey, surface.Snapshot());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the instance of surface.Snapshot() dont need any lifetime management?

Comment thread samples/Directory.Packages.props Outdated
Comment thread src/Uno.Toolkit.UI/Controls/Shadows/ShadowContainer.cs Outdated
@github-actions

github-actions Bot commented Jul 20, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

@erikvilima

Copy link
Copy Markdown
Contributor Author

About the WASM clipping, on SkiaSharp 2.88.4-preview.84 we get a better result:

image

@jeromelaban @roubachof

@github-actions

github-actions Bot commented Jul 20, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

Comment thread src/Uno.Toolkit.UI/Controls/Shadows/ShadowCollection.cs Outdated
return needsPaint;
}

#if false // ANDROID (see comment in ShadowContainer.cs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created this issue about that: #694

Comment thread src/Uno.Toolkit.UI/Controls/Shadows/ShadowContainer.Properties.cs
@erikvilima

Copy link
Copy Markdown
Contributor Author

Android and iOS control overlap issue: #679

@roubachof

Copy link
Copy Markdown
Contributor

The neumorphic textbox looks a little funky when it is focused:

Dark theme: image

Light theme: image

@kazo0 There is no implementation of neumorphism for visual states. This is just applied on the control itself.

@github-actions

github-actions Bot commented Jul 21, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

@kazo0
kazo0 force-pushed the dev/jmaf/shadow-container branch from dfa25df to d8d9b93 Compare August 1, 2023 16:57
@github-actions

github-actions Bot commented Aug 1, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

@Xiaoy312
Xiaoy312 force-pushed the dev/jmaf/shadow-container branch from 1905ed3 to 562455b Compare August 1, 2023 22:18
@Xiaoy312
Xiaoy312 force-pushed the dev/jmaf/shadow-container branch from 562455b to ee5bf38 Compare August 1, 2023 23:15
@github-actions

github-actions Bot commented Aug 1, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

@github-actions

github-actions Bot commented Aug 2, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

@github-actions

github-actions Bot commented Aug 3, 2023

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-638.eastus2.azurestaticapps.net

@agneszitte
agneszitte merged commit 97bc94f into main Aug 3, 2023
@agneszitte
agneszitte deleted the dev/jmaf/shadow-container branch August 3, 2023 20:00
@agneszitte

Copy link
Copy Markdown
Member

@eriklimakc if you can help to work on the unresolved comments we left open on another PR, please
We will sync with you tomorrow for it

@agneszitte

agneszitte commented Aug 4, 2023

Copy link
Copy Markdown
Member

@eriklimakc if you can help to work on the unresolved comments we left open on another PR, please We will sync with you tomorrow for it

(cc @jeromelaban)

@agneszitte

agneszitte commented Aug 8, 2023

Copy link
Copy Markdown
Member

https://github.com/Mergifyio backport legacy/3x

GitHub
Automate your pull requests. Mergify has 21 repositories available. Follow their code on GitHub.

@mergify

mergify Bot commented Aug 8, 2023

Copy link
Copy Markdown
Contributor

backport legacy/3x

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Aug 8, 2023
Co-authored-by: roubachof <jm.alfonsi@gmail.com>
Co-authored-by: xiaoy312 <xiaoyao312@gmail.com>
Co-authored-by: Jérôme Laban <jlaban@gmail.com>
Co-authored-by: Steve Bilogan <steve.bilogan@gmail.com>
(cherry picked from commit 97bc94f)

# Conflicts:
#	build/workflow/templates/dotnet-workload-install-mac.yml
#	build/workflow/templates/dotnet-workload-install-windows.yml
#	samples/Directory.Packages.props
#	samples/Uno.Toolkit.WinUI.Samples/Uno.Toolkit.WinUI.Samples.Mobile/Uno.Toolkit.WinUI.Samples.Mobile.csproj
#	src/Uno.Toolkit.sln
erikvilima added a commit that referenced this pull request Aug 15, 2023
Co-authored-by: roubachof <jm.alfonsi@gmail.com>
Co-authored-by: xiaoy312 <xiaoyao312@gmail.com>
Co-authored-by: Jérôme Laban <jlaban@gmail.com>
Co-authored-by: Steve Bilogan <steve.bilogan@gmail.com>
(cherry picked from commit 97bc94f)
pictos pushed a commit that referenced this pull request Aug 17, 2023
Co-authored-by: roubachof <jm.alfonsi@gmail.com>
Co-authored-by: xiaoy312 <xiaoyao312@gmail.com>
Co-authored-by: Jérôme Laban <jlaban@gmail.com>
Co-authored-by: Steve Bilogan <steve.bilogan@gmail.com>
(cherry picked from commit 97bc94f)
pictos pushed a commit that referenced this pull request Aug 18, 2023
Co-authored-by: roubachof <jm.alfonsi@gmail.com>
Co-authored-by: xiaoy312 <xiaoyao312@gmail.com>
Co-authored-by: Jérôme Laban <jlaban@gmail.com>
Co-authored-by: Steve Bilogan <steve.bilogan@gmail.com>
(cherry picked from commit 97bc94f)
agneszitte pushed a commit that referenced this pull request Aug 19, 2023
Co-authored-by: roubachof <jm.alfonsi@gmail.com>
Co-authored-by: xiaoy312 <xiaoyao312@gmail.com>
Co-authored-by: Jérôme Laban <jlaban@gmail.com>
Co-authored-by: Steve Bilogan <steve.bilogan@gmail.com>
Co-authored-by: Érik Lima <114886335+eriklimakc@users.noreply.github.com>
Co-authored-by: eriklimakc <erik.lima@knowcode.app>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Specs] ShadowContainer

6 participants