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

[RFC] The next milestones of ASCollectionNode #209

Open
garrettmoon opened this issue May 2, 2017 · 0 comments
Open

[RFC] The next milestones of ASCollectionNode #209

garrettmoon opened this issue May 2, 2017 · 0 comments

Comments

@garrettmoon
Copy link
Member

garrettmoon commented May 2, 2017

From @nguyenhuy on March 24, 2017 20:45

I'd like to share my vision of ASCollectionNode, now that we have facebookarchive/AsyncDisplayKit#3017 and facebookarchive/AsyncDisplayKit#3130 in pretty good shape to form a foundation of the following projects:

  1. Give back control to collection layout objects and eliminate layout inspector, layout facilitator, etc.
  2. Have ASDataController, ASRangeController and ASCollectionLayouts to be decoupled from ASCollectionView and instead rely on ASCollectionNode. With this, we'll be able to do the initial reloadData, prepare collection layout and preload cells before the view is even allocated.
  3. Introduce measure range (and even allocate range in the far future): ASDataController won't allocate and measure all cell nodes in one go, but instead refer to its layout delegate, such as ASCollection(Gallery|Pager)LayoutDelegate (Improve collection datasource performance #186).
  4. Interface-state-aware ASCollectionNode:
    • When a collection node enters preload state, it triggers the initial reloadData and then preloads "visible" cells. Those cells should be in preload state and start fetching images, etc. A collection node that is in preload state should have its own visible range of 0, display range of 0 and preload range of 1.
    • When it enters display state, it allocates its collection view and renders. Its visible range at this stage is 0, render range is 1 and preload range is bigger than that.
    • When it finally enters visible range, its visible cells should all be ready and it uses the normal ranges.
    • With this system, nest collection nodes (e.g closeup) will be much better supported. Currently we can't perform initial reloadData, prepare the collection layouts and preload visible cells (e.g pin image) of sub-collection-cell-nodes (e.g close gallery cell) until they enter display range of the containing collection (e.g closeup gallery pager) and have their view allocated.

All of these projects won't be realized without the help and feedbacks of core team members, especially @Adlai-Holler, as well as other community members. So please leave comments!

Copied from original issue: facebookarchive/AsyncDisplayKit#3219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants