forked from TextureGroup/Texture
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge with changes from TextureGroup/Texture #1
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Improve graphics contexts experiment * Update changelog * Remove extra space * Add a unit test for screen scale * Fix typo and use unique value
…yer #trivial (#773) * Expose asyncdisplaykit_node in _ASDisplayView same as in _ASDisplayLayer * Change comment
…ate (#775) * Add support for piping arbitrary user info from ASImageDownloader to the ASNetworkImageNodeDelegate * s/source/sourceType * Fix stuff and take Michael's advice
…tten #trivial (#776) * Fix synchronous state of node if +viewClass is overwritten * Also check for _layerClass overwrite for synchronous flag * Update some code style
…Node (#777) * Fix capturing self in the block while loading image in ASNetworkImageNode * Restore re-strongify while switching on the main thread * Update CHANGELOG.md
* Fixed breaking issue where completeBatchFetching is called on a background thread when no items are added to the collection * Changed spaces to tabs for consistency * Moved return statement for Code Review feedback * Fixed the same issue in the Objective-C version of ASDKgram * One more * Update PhotoFeedModel.m Fix header
…nters preload state (#779) This reverts commit 2e98588 (#751). The reason we can't wait for the coming CA's layout pass is that cell node visibility events occur before the pass, at which time the cell's subnodes don't have correct frames for impression tracking. The root cause of this problem is that, right now, cell node visible states are set by ASRangeController well before the layout pass of the hosting collection/table view. That means we're "jumping the gun". The more I think about this, the more I agree with @Adlai-Holler that we need to treat visible state differently. That is, a node should only be visible (and thus get visibility events) after it's fully loaded, it's view/layer attached to the hierarchy and laid out by a CA transaction. In other words, at the end of the CA layout pass. Such change needs time and effort to be thoroughly reviewed and tested. Until then, let's roll with this fix.
* [ASCellNode] Adds mapping for UITableViewCell focusStyle * Update CHANGELOG.md
* Improve ASNetworkImageNode delegate callout behavior * no message
* Get CatDealsCollectionView example running again * Fix it for real and some other styling stuff * Fix some warning * Adjust headers
…layout is happening (#794)
…even in slow CALayer rounding mode (#749) - Failing to do so will introduce race conditions in which the property was updated on a background thread but main thread has not executed the block that updates the property of the node's layer. During that window, the layer's property is out-of-date and can't be used. - After this change, ASDisplayNode's cornerRadius is the only source of truth and users must always use it instead of CALayer's.
…as more than one layout before scrolling. (#790) This should result in memory savings in many apps, since errant relayouts are pretty common.
* Add scrollViewWillEndDragging delegate * Make sure delegate can respond to scrollViewWillEndDragging * Add changes to CHANGELOG.md
…nding layout to not be applied (#792) * [ASDisplayNode layout] Fix an issue that causes a node's pending layout to not be applied - Since the implementation of layout version (#428), if a node's pending and calculated layouts have the same current version as well as the same constrained size, the 2 layouts are considered equal and can be used interchangeably. A layout version check between the 2 layouts was added in #695. This PR adds a missing constrained size check. - If the pending layout has the same version but a different constrained size compare to the calculated layout's, we can assume that the pending layout is newer and should be preferred over the calculated one. That is because layout operations always register their new layout as pending, which then (immediately or eventually) get applied to the node as calculated layout.
…trivial (#803) * Avoid triggering main thread assertions in ASCollectionNode/ASTableNode dealloc * Put it back
* fix SIMULATE_WEB_RESPONSE not imported #449 * Coalesce interface state updates to ASCATransactionQueue before CATransaction commit. This will avoid duplicate interface state delegate calls caused by view repeatly added/removed to/from hierarchy during controller animation transition. * fix tests for new run loop queue * Support for disabling ASCATransactionQueue * Fix didExitHierarchy to use ASCATransactionQueue. * merge range managed and none range managed for didExitHierarchy * Revert "merge range managed and none range managed for didExitHierarchy" This reverts commit f807efa. * merge range managed and none range managed for didExitHierarchy * remove metadata * abstract queue to impl class methods * Add tests * Fix test fail because of shared object. * guard _pendingInterfaceState access with lock * name refactor * Refactor from comments #788 * Apply InterfaceState immediately after ASCATranactionQueue is processed and before next runloop started. * refactor * no op to start CI build * remove unused var and kick off tests * change lisence * remove code for weak ref * add change log and adjust license
* Add failing tests * Fix responder chain handling in Texture * Add mores tests that horrible fail * Add Changelog.md entry * Some fixes * Update logic * Add tests that prevents infinite loops if a custom view is overwriting UIResponder methods * Add macro to forward methods in ASDisplayNode * Add macro for forwarding responder methods in _ASDisplayView * Remove junk * Address first comments * Update _ASDisplayView to cache responder forwarding methods * Use XCTAssertEqual
… to invoke it manually instead of +load. (#798) * - [ASDisplayNode] Consolidate main thread initialization and allow apps to invoke it manually instead of +load. Additionally this has a few minor fixes for Yoga support, and adds some basic but universally valuable callbacks like -nodeDidLoad to ASNodeController. * Small fix for handling _layoutVersion. * Remove poking the scale accessor
* Upgrade dangerfile * Allow cocoapods warnings for now :(
…ingle medium blog poster (#818)
* Fix TextNode2 not respecting background color * ASTextNode2: Use locks and copies right * Increment changelog * Make the Dangerfile accept any license header with Pinterest in it
…Kit passthrough cells. (#797) * - [ASWrapperCellNode] Introduce a new class allowing more control of UIKit passthrough cells. A few minor fixes to Collections behavior as well, including a new isSynchronized API. The difference from processingUpdates is that after Synchronized, all animations have also completed (or runloop turn if animations disabled, so .collectionViewLayout can be relied on being fully in sync). More upstreaming to come after this can land... * Fix -[ASDataController clearData] to take no action before initial data loading. * Empty commit to kick CI * Spacing change to kick CI (since an empty commit doesn't work...) * Tweak ASDataController changes to handle an edge case in _editingTransactionQueueCount management. * Avoid excess cyclic calls to onDidFinishProcessingUpdates: by avoiding ASMainSerialQueue. * Reverting my initial change as it wasn't the right approach, following the real fix before this.
* [Contexts] Use mmap directly for possible perf gain and to tag the memory as CGImage * Wrap the mmap in an object * Go straight to dataprovider * Tweak it * Remove wrong comment * Finish that comment * Address warnings
* Handle nil backgroundColor * Small improvement
…otential nil #trivial (#757) * Fix ASPrimitiveTraitCollection initialization on iOS 9. Add nil-value checks for preferredContentSizeCategory. * * Mark -[ASTraitCollection init] as deprecated. * Mark [ASViewController overrideDisplayTraitsWithWindowSize] as deprecated. Code review changes: * Remove unneeded nonnull annotations * Add null check in ASTraitCollection constructor implementation * Codestyle * Add some documentation about ASPrimitiveTraitCollection vs ASTraitCollection usage * Rename safeContentSizeCategory to AS_safeContentSizeCategory. Remove safePrimitiveContentSizeCategory in favour of AS_safeContentSizeCategory.
* Use NS_RETURNS_RETAINED macro to save time * Update changelog and do the thing with the license headers
* Order items in XCode project navigator by name It is a bit hard to find file in folders with long list of file, for example Tests. Sorting items by name makes this a bit easier and brings order. If there are child folders, they are ordered before files. Keeping folders sorted by name may be reasonable alternative as well. * Re-sort after merge. ASNetworkImageLoadInfo.h is still here, not sure why showing removed in this commit. Had this file duplicated reference previously?
* Make display node, layout spec, and style conform to NSLocking so that users/subclasses can access their locks * Update the changelog * Align slashes * Put it back, when we're in ASDisplayNode * Go a little further * Put back the changes I didn't mean to commit * Kick the CI * Fix yoga build * Put back non-locking change * Address comments from Scott
* fix SIMULATE_WEB_RESPONSE not imported #449 * Fix to make rangeMode update in right time * support animated image for cache * Modify change log
* Update the dangerfile * Make a trivial change to test new dangerfile * Try out the new value with another trivial change * Add a configuration API to make a unified place for pulling config from clients safely * Specify properties for delegate * Finish removing text experiment global enable * Generate the config file * Clean up configuration to fix tests * Work on making it serializable * Finish it up * Fix example code * Update sample project * Clean up a few things * Align with new project order * Make it faster and update license header * Add an option to specify your config at compile time * Update another license header * Add a version field, and bring interface state coalescing into configuration * Update CA queue code * Update CATransactionQueue tests * Turn transaction queue on by default (for now, see comment) * Update the tests * Update the tests AGAIN * Remove unused ordered set
* [ASDisplayNode] Add safeAreaInsets, layoutMargins and related properties to ASDisplayNode * Add layoutMargins bridged to the underlying view * Add safeAreaInsets bridged to the underlying view * Add fallback calculation of safeAreaInsets for old iOS versions * Add automaticallyRelayoutOnSafeAreaChanges and automaticallyRelayoutOnLayoutMarginsChanges properties * Add additionalSafeAreaInsets property to ASViewController for compatibility with old iOS versions * Provide safeAreaInsets for layer-backed nodes. This also fixes tests. * Fix crash when insetsLayoutMarginsFromSafeArea is set from a background thread * Changes requested at code review: * Update documentation for layoutMargins and safeAreaInsets properties. Suggest that users set the automaticallyRelayout* flags to ensure that their layout is synchronized to the margin's values. * Fix accessing ASDisplayNode internal structures without a lock. * Add shortcut in -[ASDisplayNode _fallbackUpdateSafeAreaOnChildren] to skip a child when possible. * Add shortcut in ASViewController to avoid fallback safe area insets recalculation in iOS 11. Fix fallback safe area insets recalculation when the additionalSafeAreaInsets are set. * Add debug check that a view controller's node is never reused without its view controller, so the viewControllerRoot flag value is always consistent. * Use getters instead of reading ivars directly in -layoutMarginsDidChange and -safeAreaInsetsDidChange. * Minor change in CHANGELOG * Minor change in ASDisplayNodeTests.mm
* Make NSIndexSet+ASHelpers.h reference local NSIndexSet+ASHelpers.h should be a user vs a system or framework include. * Update ASIntegerMap.mm
* Introduce ASRecursiveUnfairLock and tests * Document it and put underscores to scare people away * Increment changelog * Integrate it with ASDN::Mutex behind experiment * Rename the experiment * Love these license headers oh so much * Move internal header because we have to * Address Jon's feedback
* fix SIMULATE_WEB_RESPONSE not imported #449 * Fix to make rangeMode update in right time * disable interface coalescing and fix tests * Revert to before coalescing for ease of reading * refactor, make min change * refactor * add comments * Add change log
* [Issue 838] Update ASCeilPixelValue and ASRoundPixelValue Layouts can come back for 3x devices as a repeating decimal. Floats/doubles have a hard time representing these values and often the last digit or two will be garbage. This garbage can result in unexpected values from `ceil` or `round`. I try to fix this by subtracting `FLT_EPSILON` from the value before calling `ceil` or `round` #838 * addressed comments on the pr
…ial (#847) * fix SIMULATE_WEB_RESPONSE not imported #449 * Fix to make rangeMode update in right time * This is for cases when CollectionNode is created in cell of another collectionNode, the interfaceState(say didEnterVisible) is not called as expected. It's because interfaceCoalescing alter the time line and cause RangeController update before actual interface applied.
… Case #trivial (#867) * Optimize recursive unfair lock to remove a redundant set * Simpler
* Update the podspec * Put that back * Put back the C++ standard library
…xpansion producing ‘defined’ as undefined behavior” in Xcode 9.3 (#879)
…ings #trivial (#880) * Define ASDISPLAYNODE_ASSERTIONS_ENABLED explicitly * Add parameter type for drawRect: in ASDefaultPlaybackButton
* Add experiment to skip creating UIViews altogether for constants * Update changelog * Do it right * Annotate function * Skip all the work entirely
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.