Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

[RFC] The next milestones of ASCollectionNode #3219

Closed
nguyenhuy opened this issue Mar 24, 2017 · 1 comment
Closed

[RFC] The next milestones of ASCollectionNode #3219

nguyenhuy opened this issue Mar 24, 2017 · 1 comment

Comments

@nguyenhuy
Copy link
Contributor

nguyenhuy commented Mar 24, 2017

I'd like to share my vision of ASCollectionNode, now that we have #3017 and #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 delegate to its layout delegate, such as ASCollection(Gallery|Pager)FlowLayout (Improve collection datasource performance #2979).
  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!

@garrettmoon
Copy link
Contributor

This issue was moved to TextureGroup/Texture#209

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

No branches or pull requests

2 participants