-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Animating article items being dismissed #688
base: main
Are you sure you want to change the base?
Animating article items being dismissed #688
Conversation
Whoa! Never thought it's that easy.. Works fine. Could you also apply this to the publication date headers? In the case shown below these are not as smooth. 00dc4867-6d58-4470-9407-2749b257a5ee.mp4Thanks, @savvasdalkitsis! |
This looks great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I pushed another change to animate the headers |
@savvasdalkitsis new release of compose animation has introduced addition/deletion animation for list items animateItem(), you can give it a try |
Unfortunately I noticed that the animation tends to cause blank gaps on dismiss. 85f9eec5-670b-47e0-8ee4-19d82f1f0a3f.mp4It's kinda random, sometimes it works well. |
@nvllz i cannot replicate it locally but i updated to the latest compose bom in case there is a bug fix in there that addresses this. can you try it and see if the issue shows up again? |
… when navigating back from article view
@nvllz I believe updating to the alpha/beta versions of compose and using the new The question now is if you are comfortable moving to a non stable version of compose. If not, we may have to wait until the method makes it to stable. Also note that the last commit also introduces a weird interaction in the swipe box that the remove animation runs after the swipe box snaps back to the original position. Not sure if that would be a blocker for you |
Just tested the latest build and can confirm that article swiping seems to be fixed. But this kinda broke the sticky headers feature, as turning them on causes the flow page to throttle when scrolling.
Not sure what you mean. I just noticed that the article background is not colored when swiping, which looks even better now. |
I removed the animating of the stickyHeader to see if that fixes the performance issue you mentioned @nvllz (it looked the same to me on the emulator) For the swipe issue i mentioned, see the video below: Screen_recording_20240507_084322.mp4Previously, when you swiped an item away, it wouldn't bounce back and then dissapear, it would dissapear immediately. hope that makes sense |
It doesn't bounce back for me, tested with Galaxy S20+. 9e3e38e0-c043-4ac0-9f5d-ea858c557d18.mp4 |
Well, that's weird 😅 |
Unfortunately it doesn't fix the problem, as the flow page keeps lagging with sticky headers enabled. But I figured out how to trigger this bounce back animation, using a longer swipe. 335fd50f-6944-476e-937c-2ea063b5d7cc.mp4(Sticky headers disabled) |
Hi everyone, what’s the current status of this PR? I mean, can it be included in the next release? |
blocked by #772 |
I used a build with this PR included and it worked well. The only imperfection was the card sliding back animation on a long swipe, shown above. |
This will make items being swiped away animate the rest of the list so there is no jarring jump when the article is removed