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

better optimizeForInsertDeleteAnimations and fix stableId collision #479

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

LVBK
Copy link

@LVBK LVBK commented Mar 12, 2020

This PR try to prevent RLV recycler too hard.
I try to use RLV and react-native-reanimated (Transitioning.View) for cool list animation (fade in, fade out, move)
But original RLV with optimizeForInsertDeleteAnimations not help 100%
When new item with new stableId come in.
Sometimes, RLV try to recycle with old render key so animation is Transition.Change, not Transition.In
So, my core idea. every time dataSource change. I will clear recyclePool. It will prevent reuse old render key,
new item will mount in (not update). It also help stableId collision.

DataProvider.cloneWithRows with 3rd optinal parameter optimizeForInsertAtBottomAnimation = true will try to _requiresDataChangeHandling when dataSource have something new item added to bottom of RLV (load more)
So _requiresDataChangeHandling = true will trigger VirtualRenderer.handleDataSetChange and prevent recycle items at top of RLV (Prevent top down move animation).

Now i'm happy with RLV and react-native-reanimated and goodbye Flatlist :)

@naqvitalha naqvitalha closed this May 4, 2020
@naqvitalha naqvitalha reopened this May 4, 2020
@naqvitalha naqvitalha closed this May 4, 2020
@naqvitalha naqvitalha reopened this May 4, 2020
@davx1992
Copy link

@LVBK @naqvitalha when this will be avaliable for use? Struggling with stable id collision issue.

@davx1992
Copy link

davx1992 commented Jan 15, 2021

This is improtant fix, which is removing issue with stable ids, any plan to merge this?

@mdarke1
Copy link

mdarke1 commented Mar 4, 2021

I totally agree. Its great to have an itemAnimator and an optimizeForInsertDelete functionality but if the stableId issue has not been resolved yet then we cant animate inserts correctly.

A little guidance on when/if this is going to be merged would be greatly appreciated.

@mdarke1
Copy link

mdarke1 commented Mar 8, 2021

Just to be clear - this is an issue of the itemAnimator for inserting/deleting failing to work once scrolling is enacted.

@timurridjanovic
Copy link

@naqvitalha any plans to merge this?

@AlexSirenko
Copy link

Any updates?

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.

None yet

6 participants