Sidebar drops on iOS and Android land without a flash, keeping the current list (remount alternative) (#9681)
* fix(app): drop a sidebar row without a wrong frame on native by remounting moved cells draggable-flatlist moves a cell with a held drag translate. Reanimated re-applies a view's last animated transform to every React commit, so the reorder commit painted one frame of new order plus old translate. The drop now gives each moved cell a fresh transform host, keyed per cell, so the reorder commit mounts views with no animated transform to re-apply. Moved cells remount their row subtree on each drop. * fix(app): keep a project's Show more reveal when a drop remounts it The drop remounts each project block it moves, and the block held its own reveal state, so a revealed project shrank back after a drop. The project list now owns the reveal per project, and the group hook takes it as input. * docs(app): note that a native drop resets state held inside a moved row * fix(app): render every row of a non-scrolling native list in its first commit A drop remounts the nested workspace list of each project block it moves. FlatList renders 10 rows on mount, so a moved project showing more than 10 workspaces painted 10 rows and grew a commit later.
This commit is contained in:
1 parent
c81f38d7ca
commit
85fb5b436d
7 files changed
+318
-66
No files matched your search
@@ -48,6 +48,10 @@ const patchedPackages = [
|
||||
nodeModulesPath: "node_modules/@legendapp/list",
|
||||
patchPrefix: "@legendapp+list+",
|
||||
},
|
||||
// Native sidebar lists. Besides gesture sessions and panel-gesture arbitration, the drop gives
|
||||
// each moved cell a fresh transform host. Reanimated re-applies a view's last animated
|
||||
// transform to every React commit, so a reused host painted one frame of new order plus old
|
||||
// drag translate (upstream computerjazz/react-native-draggable-flatlist#621, open).
|
||||
{
|
||||
nodeModulesPath: "node_modules/react-native-draggable-flatlist",
|
||||
patchPrefix: "react-native-draggable-flatlist+",
|
||||
|
||||
Reference in new issue
Block a user