* Add ASBatchFetchingDelegate
- In addition to checking remaining leading screens, ASBatchFetching now also calculates a remaining time and consults its delegate if needed.
- The delegate can override the decision of ASBatchFetching, for example based on remaining time and average time of past batch requests.
* Fix up tests
* Update CHANGELOG
* Add experimental text node implementation, based on YYText
* Fix warnings and alert when unimplemented experimental features are used.
* Address feedback from review
* Extend the cthulog
* Update license headers
* [ASTextKitFontSizeAdjuster] Replace use of boundingRectWithSize:options:context: with boundingRectForGlyphRange: inTextContainer:
`boundingRectWithSize:options:context:` started returning different values for the same strings between iOS 10.2 and iOS 10.3. Switching to using `NSLayoutManager`’s `boundingRectForGlyphRange: inTextContainer:` fixed this. It also makes sure we are consistent with what `ASTextKitTailTruncater` uses.
* updated changelog
We need this in case someone is setting the URL to nil before setting
the image directly. I.e. they have a node which has been used as a network
node or an image node but now they want it to be an image node.
They should then set the URL to nil and then set the image.
*if* it was used as a network node previously, this would work.
If it was previously used as an image node it would historically assert.
This addresses that.
* Move configuring the debug label from the drawing method in displayDidFinish
* Move will- and didDisplayNodeContentWithRenderingContext in drawing parameters
* Implement ASPageTable
- It is a screen page table that can be used to quickly filter out objects in a certain rect without checking each and every one of them.
- ASCollectionLayoutState generates and keeps a table that maps page to layout attributes within that page.
- ASCollectionLayout (and later, ASCollectionGalleryLayoutDelegate) consults its layout state for `layoutAttributesForElementsInRect:`. This ensures the method can return as quickly as possible, especially on a large data set (I heard some people have galleries with thousands of photos!).
* Address comments
* Handle items that span multiple pages
* Make danger happy
* Make ASCellNode indexPath and supplementaryElementKind atomic
* Update the change log
* Fix licenses
* Be explicit with atomic
* Rename the protocol
* And the file
* [ASNodeController+Beta] Provide an option to allow nodes to own their controllers.
We should certainly remove this before moving ASNodeController out of Beta. However, I think
it will require at least ASCollectionNode to be able to retain its top level set of node controllers.
Without this facility built in, it's very difficult for apps supporting both UIKit and ASDK to
manually manage the controllers and keep them in sync with perfect timing.
* [ASNodeController] Fix one of the #if's.
* [ASDisplayNode] Convert isSynchronous to an Objective-C atomic BOOL.
This reduces lock contention, and should also fix a very rarely seen deadlock.
* [ASDisplayNode] Implement a std::atomic-based flag system for superb performance
Although Objective-C atomics are equally fast, or better that std::atomic when
access through method calls, for the most intense use cases it is best to avoid
method calls entirely.
In ASDisplayNode, we could benefit significantly from avoiding both method calls
(already true today) but also avoid locking the mutex, for both CPU and contention
gains.
There will still be many methods that need locking for transactional
consistency - however, there are currently dozens of accessor methods that could
avoid frequent lock / unlock cycles with use of atomics, and other usages of the
ivars directly where locking could be delayed until after early-return conditions
are checked and passed.
* [Yoga Beta] Improvements to the experimental support for Yoga layout.
Yoga remains an unsupported / speculative feature, but these improvements are important for
the functionality of clients that are experimenting with it.
For example, without these changes, ASButtonNode is not able to lay out correctly. These
changes allow certain subtrees that use layout specs to coexist properly in a Yoga heirarchy.
The most significant change here is moving ASEdgeInsets into the #if YOGA gating. Although
this is technically an API change, this type was added with no known use cases and is
really only useful for flexbox layout specification. So, before usages of it are created,
it makes sense to constrain the Texture API surface until that time.
* [RTL] Bridge the UISemanticContentAttribute property for more convenient RTL support.
Although apps could handle this before by setting the view's property in didLoad, it's
useful to bridge this property for setting during off-main initialization.
This change also makes RTL fully functional / automatic for Yoga layout users.
* Remove RTL property addition and depend on PR #60 landing first.
* Fix warnings
* Add line to changelog
* [CGPointNull] Rename globally exported C function to avoid collisions.
Some other frameworks also declare this. Let's try to minimize collisions
without making the name too ugly.
* Fix build errors
Although apps could handle this before by setting the view's property in didLoad, it's
useful to bridge this property for setting during off-main initialization.
This change also makes RTL fully functional / automatic for Yoga layout users.
* Fixes a potential deadlock; it's not safe to message likely super nodes while holding the lock.
* I think this is what @nguyenhuy is looking for :)
* Fix up CHANGELOG.md