-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(animation): support animating width/height properties (WIP) #4917
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
feat(animation): support animating width/height properties (WIP) #4917
Conversation
Can one of the admins verify this patch? |
13 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
85a84ac
to
a259a1f
Compare
- width/height can be specified in any valid PercentLength form that can be parsed. - make width/height properties be based on animatable CSS property. TODO: affectsLayout???? - add a few basic tests. Could probably use a few more? - fix a few null pointer exceptions in PercentLength helpers
4845d64
to
05e021a
Compare
- basic height animation - height animation in StackLayout - fix an issue where strings were not automatically converted to PercentLength when calling directly into `View.animate`
05e021a
to
7b9ed16
Compare
I added a few UI tests. With AndroidA time update function is required to animate
iOSThere is no time update callback in Javascript, so the value isn't animated as far as the {N} Layout is concerned.
What to do?It looks like there are some options to add a javascript callback that could update the Layout value over time on iOS, but it would almost certainly slow things down and add complexity. It's not clear to me if it's worth slowing down all height animations to satisfy a particular layout constraint. e.g. this poor animation would have to pay for a feature it doesn't need. 😭
Thoughts? |
6089f26
to
ef147a6
Compare
- use height transition to cover textview content. - when clicking on the summary view, animate the summary height up to a small header and show the text view. - fake animating the height on the textview by very subtly animating its translateY value while shrinking the header height. This tricks your mind into think that the text view is also vertically growing, even thought it's just slightly moving up along the Y axis.
d8a5d30
to
b2b38e4
Compare
- verify all built-in animation curve types work as expected.
b2b38e4
to
11e14d2
Compare
Added a few more examples to test corner cases: Scrolling text view with animated header
Animation curves
|
I missed testing a few things, so I put this back in WIP, but I still welcome reviews/feedback. |
Hey @justindujardin, thank you for your contribution. We are going to execute some tests and review the PR. |
@justindujardin 🥇🥇🥇 |
is this scheduled for release? |
How can I know if this already available and on which version? |
Hello All, Great work on this pull-request! You can follow the progress on it here. Our main concerns with this implementation are related to performance. I am afraid that we have not had the time to measure and investigate it due to higher priority tasks. However, we are aware of its importance and wide demand, that is why we would like to invest further efforts and improve this feature as well as the animations at all. This has not been scheduled for release yet. Currently, we are working on the 4.1 roadmap, so I hope we could get it there. Please follow the issue and this pull-request for any comments and updates. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Add support for animating width/height View properties.
Implements #1764
Use with View.animate
Use with Angular
Unfinished thoughts
There are a few limitations that could be lifted, but need input: