* Add test case for TextKit truncation style
* Add fast path for text node measurement with default truncation
* Use fast path more often
* Reverse options order
* Simplify implementation – no functional change
* Share "isScaled" variable
* Intersect with constrained rect
* Add a failing test case for fast-path truncation
* Add some more truncation tests, using slow path as reference image
* Update the tests
* In ASTextKitRenderer, intersect bounds with constrained rect
* Add test case for TextKit truncation style
* Add fast path for text node measurement with default truncation
* Use fast path more often
* Reverse options order
* Simplify implementation – no functional change
* Share "isScaled" variable
* Intersect with constrained rect
* Add a failing test case for fast-path truncation
* Add some more truncation tests, using slow path as reference image
* Update the tests
* In ASTextKitRenderer, intersect bounds with constrained rect
* Use maximumNumberOfLines property in text kit fast path
Add reference images
Disable fast-path for max-one-line case
* Remove unneeded snapshot files
* Added selection API to ASTableNode and ASCollectionNode (#2450)
* Updated test case to use collectionNode instead of collectionView for the selection tests.
* Fixed typos.
Added asserts for main thread.
Updated ASCollectionViewTests for multiple selections for nodes.
* Added assigns to the different properties.
* 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
* Improve ASDimensionMake via NSString
- ASXCTAssertEqualDimensions
- Add support for "auto"
- Assert if given an empty or invalid string
* Address comments
* Add ASCGFloatFromString and ASCGFloatFromNumber
* Rename CGRect+ASConvenience to CoreGraphics+ASConvenience
* Remove set layout style size helper
* Update API to set and get a CGSize / ASRelativeSize from an ASLayoutElementStyle
- Expose ASRelativeSize type
- Add new helper properties to set a size / relative size to ASLayoutElementStyle
- Don't expose the size in ASLayoutElementStyle anymore and move into ASLayoutElementStylePrivate
* Update examples
* Update comments for size helpers
* Add tests for how UICV/ASCV will throw if you update before the initial data load
* Allow user to submit updates before initial data load to workaround UICollectionView bug
* Add some info
* 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.
- Objects conform to ASSectionContext protocol can be provided via ASCollectionDataSource and later retrieved from the collection view. They are guaranteed to be in sync with sections of the collection view. They can be used to store additional data associated with each section, to be used in collection view layout and the like.
- ASSection is an internal object that is the foundation for coming debugging tools.
- Unit tests included.
* [Layout API] Rename ASLayoutable to ASLayoutElement
* arg
* fix wrapperWithLayoutElement
* [Layout API] Rename ASLayoutable to ASLayoutElement
* arg
* address Michael's comments
* Remove ASLayoutValidation files that were deleted on master since this diff was created.
* Initial commit to move [ASLayoutSpec children] from std::map to NSMutableArray
* Add NSFastEnumeration to ASLayoutable
* ASNullLayoutSpec is a Singleton now
* Move ASLayoutSpecPrivate in Private folder
* Move to NSArrayPointer and remove ASNullLayoutSpec
* Revert "Move to NSArrayPointer and remove ASNullLayoutSpec"
This reverts commit 9ab9cf7024b1f6e1984d84fe58af2b84e84cdf94.
* Move to childAtIndex: and setChild:atIndex:
* Add support for flex factor
* Add snapshot tests
* Respect child specified size from ASLayoutable
* Add new snapshot test images
* Fix rebase conflict
* Add tests for batch update completion handler calling
* Ensure we call all completion handlers after collection view updates
* Tweak it
* Fix the doc
* Minor improvements
* Document addCompletionHandler better
* Add delegate to ASLayoutableStyle for property changes
* Moving ASLayoutableStyle delegate to readonly
* Add ASLayoutableStyleTests
* Fix property stirngs
* Fix video example
* Address comments of Adlai
* Deprecate preferredFrameSize
- Remove all support for preferredFrameSize in ASDK
- preferredFrameSize setter calls through and sets the width and height of the node
- preferredFrameSize getter tries to return a CGSize based on the width and height properties otherwise if this is not possible it throws
* Address comments
* Return CGSizeZero for preferredFrameSize unless width and height are ASDimensionUnitPoints
* Better comment for preferredFrameSize and remove lock in calculateSizeThatFits:
* Add style property to ASLayoutable
* Add styles property to further layout specs
* Adjust some examples
* Add `loadStyle` to create the style object in a ASLayoutable
* Revert "Add `loadStyle` to create the style object in a ASLayoutable"
This reverts commit 2b7240f2c7dc993e38cadf290cfdf08482dd70c7.
* Revert "Adjust some examples"
This reverts commit 3254ae0a321e75db3ecfa80adee9d96bde93a33d.
* Revert "Add styles property to further layout specs"
This reverts commit c779dcb876ead27122c1af1300146a6ad36912cb.
* Rename ASLayoutableStyleDeclaration to ASLayoutableStyle
* Add styleClass class property for extensibility support of the ASLayoutable style object
* flexShrink should not be YES by default
* Improve assertion message if tableView:nodeBlockForRowAtIndexPath: or tableView:nodeForRowAtIndexPath: is not implemented
* Improve assertion message if collectionView:nodeForItemAtIndexPath: or collectionView:nodeBlockForItemAtIndexPath: is not implemented
Scenario: An ASCollectionNode is a subnode of an ASCellNode. A layout transition is started, resulting in
the removal of the ASCollectionNode as a subnode. As it is removed, the hierarchy state is cleared - including
the "range managed" bit - on the ASCollectionNode. However, the deep recursion traverses the layer hierarchy
too, and clears this bit on the ASCellNodes inside the ASCollectionNode. A moment later, the collection performs
its final ASRangeController update to mark its cells as invisible and free memory. Then an assertion is triggered
in ASRangeController, because it is operating on nodes that do not have the "range managed" bit set.
It turns out that ASInterfaceState also propogates in this way, but that behavior is efficient and beneficial in
its current configuration (it assists how multi-dimensional preloading works). However, hierarchy state should
never need to jump discontinuities in the node hierarchy. For now, disabling that case and will revisit
other use cases soon.