-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: ## Context This was another attempt to fix the issue with IM based on the discussion of D62756083. Now that we've identified another bug with `initIncrementalMount` where would unmount both Hosts and Components that exclude from IM, which is different with the logic of `performIncrementalMount`. So the current solution would work like this: 1. Kick off IM with an empty visible rect when LithoView gets detached, which would go into `initIncrementalMount` and unmount all components not excluding from IM. 2. We'll end up having a couple of hosts(the parent of component that excludes from IM) and concreate components unmounted, during the `MountState::detach` we run the legacy flow to unbind them. 3. When LithoView is re-attached, we would re-bind those components left by IM(excomponents exclude from IM and their parents) first. 4. Kick off IM again to re-mount and re-bind the rest of components. ### Out of scope: Given we're addressing the issue with Incremental Mount that we never unmount component when it gets out of screen. And due to the fact that we're not able to get a correct visible rect of a view when it's detached, we have to resort to unmounting them when detached, and that also means we cannot ensure that all components will be mounted again if user detach and attach LithoView manually, which can only happen when Incremental Mount being triggered at least once. Reviewed By: adityasharat Differential Revision: D63028994 fbshipit-source-id: be4de0b7c1a039577434b9e762f61171414b0700
- Loading branch information
1 parent
a07ee75
commit 17923fd
Showing
7 changed files
with
141 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters