* Refactor ASDataController
Check optional methods in ASDataControllerSource
* Reimplement reloadData
* Refactor new code
- No more new/inserted contexts flag
- Encapsulate code shared between reloadData and updateWithChangeSet
- Remove dataControllerWillDeleteAllData delegate method
- Hierarchy changes no longer needs to conform to NSCopying
- Reword TODOs
* Forgot to call completion block of reloadData :P
* Completion block of -[ASDataController reloadDataWithCompletion:] is nullable
* Data queried from ASCollectionNode and ASTableNode should be in UIKit index space
- This helps to avoid immature node allocation, especially when node virtualization is a thing
- However, this means that -reloadDataInitiallyIfNeeded in ASCollectionNode and ASTableNode must wait until all updates are finished.
* ASDataController shouldn't assume that allocated nodes were also laid out
* Revert "Data queried from ASCollectionNode and ASTableNode should be in UIKit index space"
This reverts commit 7bc977b3808a92f484b297781d0f5b30aa258e17.
* -nodeAtIndexPath: of ASDataController now forces node allocation, with the assumption that clients absolutely need it.
- Revisit this when node virtualization is implemented.
* ASDataController only grab changeSet.completionHandler when needed because it'll be niled out
* Fix ASTableViewTests related to reloadData
* Fix testThatDeletedItemsAreMarkedInvisible in ASCollectionViewTests
* Minor changes in ASCollectionView and ASTableView
* ASCollectionView and ASTableView shouldn't call [super reloadData] before their data controller does anything
* Address comments
* Fuse reloadData into -updateWithChangeSet: of ASDataController
* reloadData shouldn't be called as if it's inside a batch
- It can't be used in conjuntion with other updates.
- Calling it inside a batch update during the initial load can cause data inconsistency thrown by UICollectionView/UITableView
* Refactor ASDataControllerDelegate and ASRangeControllerDelegate
- Replace delegate methods in these protocols with -willUpdateWithChangeSet and -didUpdateWithChangeSet.
- ASRangeController, ASCollectionView and ASTableView are simplified because of this.
* Fix mismatch between sorting orders in ASDataController
* Forgot to call completion handler of reload change sets
* Make sure ASCollectionView is compatible with the behavior of UICollectionView's reloadData
- Since UICollectionView's reloadData doesn't requery data source but defers until the next layout pass, we need to wait until then to update range controller and do batch fetching.
- `-[ASCollectionView waitUntilAllUpdatesAreCommited]` needs to force a layout pass to make sure
everything is ready after it returns.
* testSectionIndexHandling of ASTableViewTests should only check visible nodes. Other nodes will be re-measured later.
* ASTableView is not ready until the first layout pass finished
* Address comments
* Bug fixes
* Make ASTableView/ASCollectionView delegate/dataSource unavailable, route setDelegate: to setAsyncDelegate:
* Remove deprecated method from example
* Drop down from unavailable to deprecated
* Start removing ASChangeSetDataController
* Continue removing ASChangeSetDataController
* Remove unnecessary change
* ASDataController is no longer an abstract class, remove its assertion
* Get back beginUpdates and endUpdatesAnimated:completion in ASCollectionNode
* Add inverted property to ASTableNode
* Add inverted property to ASCollectionNode
* Add example
* De-inform data controller and use different CATransform3D
* Add logic to pending state
* Add accessor for inverted property
* added accessoryType to ASCellNode
* Moved the passthrough properties in an own section in ASEditableTextNode
* added documentation and reverted ASEditableCellNode changes
* fixed code signing
* adding seperatorInset property as a passthrough property
* revert changes to project file
* moved setting properties to setNode:
* moved clipsToBounds to setNode
* ASDataController: Correctly handle fetching node at nil index path (return nil).
* Be more aggressive, in order to avoid needlessly waiting for updates to complete
* Replace fetch data with preload terminology
- Deprecate `-fetchData` and `-clearFetchedData` in favor of `-preload` and `-clearPreloadedData`
- Move `-setNeedsPreload`, `-recursivelyPreload` and `-recursivelyClearPreloadedData` to ASDisplayNode+FrameworkPrivate.h
- Update internal implementation, comments and tests
* Folllow up on #2642:
- Remove -preload and -clearPreloadedData in favor of -didEnterPreloadState and -didExitPreloadState.
- -didEnterPreloadState and -didExitPreloadState call the deprecated -fetchData and -clearFetchedData methods if they are overriden.
* Missed one in a test
* Get rid of behavior change for now.
* Revert more behavior changes, fix tests.
* Don't need these anymore.
* Test & tweak batch fetching implementation
* Tighten the test
* Stop batch fetching at the end of range controller pass
* Clean up the test
* Still check for batch fetching after each frame when scrolling
* Ensure batch fetching happens for empty collection/table
Be more aggressive with main thread punting
Trampoline setting the dataSource/delegate onto the main thread
Short-circuit the supplementary nodes method if no data source
Don't rely on assertions
Mark variable unused to fix release builds
Handle ASCollectionNode/ASTableNode deallocation better
Add some comments about new macro
- Introduce thread-safe ASEventLog
- ASCollectionNode and ASTableNode share their event log with their ASDataController. The controller uses it to log change set submitting and finishing events.
- ASCollectionNode and ASTableNode print their data source and delegate in their debug description.
* Only trigger table view height requery if row-node height changed
* Make ASTableView handle the section index bar better
* Remove outdated comment
* Add a main thread assertion
* Deprecated indexPath methods in ASTableView and ASTableNode and added several indexPath methods to ASTableNode and ASCollectionNode.
* Fixed incorrect doc.
Removed unnecessary __kindof.
* Separate dataSource & UIKit index spaces
Beef up our supplementary node support
Make the API way better
Go nuts
Add a unit test for UICollectionView's handling of reloadData inside batch updates
Wrap indexPathForNode: in a cache
Convert index paths in delegate methods
Go back on table view
Put collection view back
Switch up the API
Move most ASCollectionView API to ASCollectionNode
Move most table logic over to ASTableNode
Do the things
More conversion work
Keep on keepin' on
Get table view delegate API done
More porting
Simplify
Clear the delegate
More cleanup
Move more stuff around
Remove pointless file
Re-add some API
Put back more API
Use the right flag
* Some cleanup
* Remove incorrect comment
* Tweak the API
* Put back a couple methods
* update example projects (note: ASCollectionView deprecation warnings expected)
* change reloadDataWithCompletion:nil --> reloadData
* Clean up rebase
* Make deprecated numberOfItemsInSection methods optional
* Use the right flag
* Address nits
* update ASDKTube, ASDKgram & ASViewController examples
* Remove old deprecated methods. Will restore ones that were removed recently based on PR.
* Update example to use non-deprecated method.
* Don't remove locking / unlocking, insets or willDisplayNode deprecated methods yet.
* Improve assertion message if tableView:nodeBlockForRowAtIndexPath: or tableView:nodeForRowAtIndexPath: is not implemented
* Improve assertion message if collectionView:nodeForItemAtIndexPath: or collectionView:nodeBlockForItemAtIndexPath: is not implemented
* Initial commit for adding a size constraint to ASLayoutable's
* Some more commits
* Fix sample projects in extra/
* Remove preferredFrameSize test of ASEditableTextNode
* Remove preferredFrameSize from examples_extra
* Add deprecation warning to -[ASDisplayNode preferredFrameSize]
* Add deprecation warning to -[ASDisplayNode measureWithSizeRange:]
* Commit
* Commit
* Remove ASRelativeSizeRange
* Make ASRelativeSize private
* Adjust examples
* Improve setting of -[ASLayoutable size] with points or fractions
* Add ASWrapperLayoutSpec
* Improve creation of ASRelativeDimension
* Add `preferredFrameSize` back and add deprecated logging
* Add `layoutSpecBlock` setter and getter and add locking for it
* Add better documentation and fix macros to create ASRelativeDimension
* Create new ASSizeRangeMake with just a CGSize as parameter
* Update Kitten and Social App Layout example
* Add layoutThatFits: and deprecate measure:
* Rename ASRelativeDimension to ASDimension
* Fix examples for ASDimension renaming
* Remove fancy height and width setter
* Fix ASDimension helper
* Rename -[ASLayout layoutableObject] to -[ASLayout layoutable]
* Update layout related methods and more clearer documentation around how to use it
* Deprecate old ASLayout class constructors
* Don't unnecessary recalculate layout if constrained or parent size did not change
* Use shared pointer for ASDisplayNodeLayout
* Fix rebase conflicts
* Add documentation and move implementation in mm file of ASDisplayNodeLayout
* Fix test errors
* Rename ASSize to ASLayoutableSize
* Address comments
* Rename setSizeFromCGSize to setSizeWithCGSize
* Improve inline functions in ASDimension
* Fix rebase conflicts