uno icon indicating copy to clipboard operation
uno copied to clipboard

Animation not picking up the current set/animated value

Open eriklimakc opened this issue 1 year ago • 7 comments

Current behavior

This happens in all platforms except Windows.

Skia_vs_Win_issue

Apparently when the animation code is executed, the Text, Header, and Placeholder are quickly set to their default state and after that they are animated.

Expected behavior

No response

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

Checkout this branch on Uno.Themes and launch on non-windows platform.

For the FilledTextBoxStyle the animation is defined in: TextBox.xaml#L420.

Workaround

In order to test I replaced the animation for Setters like below and we don't have that behavior.

<Setter Target="HeaderElement_CompositeTransform.TranslateY"
	Value="-11" />
<Setter Target="ContentElement_CompositeTransform.TranslateY"
	Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EmptyToFocusedContentCompositeTransformTranslateY}, TargetNullValue=0, FallbackValue=0}" />
<Setter Target="PlaceholderElement_CompositeTransform.TranslateY"
	Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EmptyToFocusedContentCompositeTransformTranslateY}, TargetNullValue=0, FallbackValue=0}" />
<Setter Target="HeaderElement_CompositeTransform.ScaleX"
	Value="0.7" />
<Setter Target="HeaderElement_CompositeTransform.ScaleY"
	Value="0.7" />

Environment

Works on UWP/WinUI: YES NuGet package version(s): [email protected] Affected platforms: This happens in all platforms except Windows.

Anything else we need to know?

Comment left by @Xiaoy312:

"At a glance, this seems like an issue with the animation not picking up the current set/animated value as the starting point for the (start...end) animation. This is not probably not something we will fix here, but in uno."

eriklimakc avatar Nov 03 '23 16:11 eriklimakc

cc @MartinZikmund / @dr1rrb / @Xiaoy312

agneszitte avatar Nov 03 '23 17:11 agneszitte

@jeromelaban / @MartinZikmund this issue is kind of blocking @eriklimakc's PR here https://github.com/unoplatform/Uno.Themes/pull/1014 (cc @kazo0, @Xiaoy312)

agneszitte avatar Nov 20 '23 23:11 agneszitte

Since this will cause a regression in the animation for all Uno platforms, I'd say it's definitely blocking us from merging https://github.com/unoplatform/Uno.Themes/pull/1014

kazo0 avatar Dec 13 '23 03:12 kazo0

@dr1rrb does this happen to look familiar at all? Currently blocking this https://github.com/unoplatform/Uno.Themes/issues/974

kazo0 avatar Dec 19 '23 16:12 kazo0

No nothing familiar here, sorry :(

dr1rrb avatar Jan 10 '24 15:01 dr1rrb

@Youssef1313 is it possible this will be fixed/related to any of the animation stuff you are doing recently?

kazo0 avatar Feb 19 '24 14:02 kazo0

I don't think what I have will fix it.

Youssef1313 avatar Feb 19 '24 16:02 Youssef1313

looks like a regression from #11859 ?

Xiaoy312 avatar May 14 '24 21:05 Xiaoy312

@eriklimakc I imagine this is still happening with latest versions?

agneszitte avatar May 14 '24 22:05 agneszitte

Apparently fixed on latest Uno packages. Quickly tested all platforms and didn't see the issue anymore. You can also see on the stage site: https://salmon-rock-0cfebe70f-1014.eastus2.azurestaticapps.net/ from https://github.com/unoplatform/Uno.Themes/pull/1014.

Will do more deep tests and update here on the issue.

cc @Xiaoy312 @agneszitte @kazo0

eriklimakc avatar May 15 '24 14:05 eriklimakc

unassigned me and close this, if your deep tests are positive.

Xiaoy312 avatar May 15 '24 14:05 Xiaoy312

Closing as not reproducible anymore.

eriklimakc avatar May 15 '24 15:05 eriklimakc

@kazo0 It was fixed on 5.3.0-dev.906.

eriklimakc avatar May 15 '24 17:05 eriklimakc

For reference, that version belongs to https://github.com/unoplatform/uno/pull/16474

FYI @ramezgerges :)

Youssef1313 avatar May 15 '24 17:05 Youssef1313