In this case, the user hasn't specified enough about the layout of a node. We default to
0, 0 - but ideally the case should not occur at all. So it's important to help developers
detect these cases and fix them quickly.
An assertion causes developers several problems:
- They can't see important information unless an exception breakpoint is manually added.
- They can't see their layout onscreen and so visually understanding the problem is impossible.
- They can't proceed with testing to trigger other faults in the layout and are blocked fixing one at a time.
A log fixes every one of those problems:
- They can set a breakpoint on the log line very easily if desired.
- They can see their layout display and recognize the 0,0 node even more quickly than the log text information.
- They can see if multiple logs print out, or if the log only occurs for one item in a feed, or certain types --
This helps them debug faster by knowing if the layout is always broken or certain conditions break it.
Since developing with ASLayoutSpecs is an iterative process, it's crucial that we let developers have the
freedom to experiment and test without hitting too many assertions. Fortunately it will be impossible to ignore
these huge logs (full recursive description) and their nodes will be 0, 0 size, so they will get fixed.
* Optimize data controller loading by combining section updates with first set of item updates
* Update call pattern test
* Add some explanation about the approach
- 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.
* Deprecations should be re-enabled. If there are specific deprecations we'd like to hold off on, we should address those specifically.
* Fix decleration
* Move select to undeprecated
* Fix deprecations
* added control node test
* fix tests
* target action pair
* go back to class
* move ASControlTargetAction to Private
* added ASControlTarget to cimpole sources
* add ASControlTargetAction to framework target as well
* init local variables with nil
* removed comment with private Apple class name
* isEqual implementation for ASControlTargetAction
* eliminate retain cycle
* use ASControlTargetAction isEqual
* change to NSMutableOrderedSet
* Use OrderedSet and isEqual
* Use that NSMutableOrderedSet stored the same object only once
* Moving back to NSMutableArray
* minor improvements
* 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
* Check in ASLayout if size is valid for sizing instead of valid for layout
* Return constrainedSize from calculateSizeThatFits:
Remove invalid constrainedSize check within ASNetworkImageNode. Furthermore as ASDisplayNode does not return CGSizeZero anymore we have to give the display nodes we use in tests and are involving a stack spec an intrinsic content size.
* Remove extra constrainedSize handling in ASNetworkImageNode handling
* Change test to use FLT_MAX
* [ASCellNode] Added indexPath property.
* [ASCellNode] Cached the type of scrollView we're using in the node, and placed that logic in setScrollView.
* [ASCellNode] Removed table and collection view from indexPath, since they return the index paths from the view-space.
* Changed the logic for getting indexPath so that it works even when the cell is not displayed.
* [VerticalWithinHorizontalScrolling] Explicitally synthesized indexPath property.
* 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