493 Commits

Author SHA1 Message Date
Adlai Holler
a4c6d8912e Don't Skip Remeasurement On First Layout Pass (#3031)
* Don't Skip Remeasurement if Initial Bounds are Zero

* Remove misleading unit test
2017-02-14 16:28:26 -08:00
Adlai Holler
bbc1aecf95 Deprecate shouldRasterizeDescendants (#3024)
* Deprecate shouldRasterizeDescendants

* Set superclass right
2017-02-13 13:34:53 -08:00
Adlai Holler
a13b36d63f Allow UICollectionViewLayout to Provide Layout Inspector, Always Update Delegate (#3003)
* Allow UICollectionViewLayout to give us a layout inspector, always call the didChangeDelegate/didChangeDataSource on binding

* Make an assertion

* Update the tests

* Tests use actual layout inspector

* Be more consistent
2017-02-08 22:03:13 -08:00
Michael Schneider
f21254593d [Layout] Add extensibility support to ASLayoutElementStyle (#2975)
* Add extensibility support to ASLayoutElementStyle

* Fix some typo
2017-02-07 10:34:09 -08:00
Adlai Holler
404795dc02 Remove Support for iOS 7 (#2930)
* Drop support for iOS 7

* Copy reference images

* Update deployment for sample projects

* Update version

* Update "Life Without Cocoapods"
2017-02-01 14:40:37 -08:00
Adlai Holler
38aac9d019 IGListKit Support II: Electric Boogaloo (#2942)
* Reimplement IGListKit support in a cleaner way

* Rename and fix some stuff

* Fix supplementaries more

* Update docs

* Update test

* Cleanup minor things

* Tweak it

* Indentation

* Remove irrelevant changes

* Break out cell into its own file

* Fix indentation

* Address feedback
2017-01-30 11:16:59 -08:00
Adlai Holler
295ed22c23 Improve Our Handling of Flow Layout Headers/Footers (#2939)
* Rejigger our flow layout supplementary support to make more sense.

* Support old protocol

* Update

* Update deprecation message

* Undeprecate insetForSection method, because it actually _does_ still work

* Update the tests

* Remove irrelevant junk

* Remove cast, add pragma
2017-01-27 15:58:43 -08:00
Adlai Holler
c0950e0f8e Fix test failure caused by collection views lingering (#2935) 2017-01-25 14:24:36 -08:00
Adlai Holler
79f3aa5f3b Disable flaky test (#2934) 2017-01-25 13:20:33 -08:00
Huy Nguyen
38f1efd448 [ASDataController] Simplify data controller (#2923)
* 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
2017-01-24 17:41:19 -08:00
Huy Nguyen
6736367627 [ASStackLayoutSpec] Refactor baseline alignment algorithm (#2892)
* Add tests for baseline alignments

* Merge baseline alignment algorithm to the main stack algorithm
- Baseline alignment is now part of the main stack algorithm.
- ASStackBaselinePositionedLayout is no longer needed and removed.

* All snapshot test cases of ASStackLayoutSpec are passing now

* Remove baselineRelativeArrangement

* Remove TODO

* Minor fixes in cross size determination step
2017-01-18 11:12:10 -08:00
Adlai Holler
68bd326f9c Disable Flaky ASNetworkImageNode Test (#2899)
* Disable flaky network image node test

* Make flaky test slightly more lenient
2017-01-17 17:03:45 -08:00
Michael Schneider
89156ebbc7 Add availability check for noescape attribute (#2897) 2017-01-13 11:32:33 -08:00
Adlai Holler
7c4ee350b0 Use Native convertRect:, convertPoint: Methods to Handle Nil Cases (#2889)
* When converting rects, points on loaded nodes, call into UIKit/CoreAnimation

* Always use view-ish behavior

* Improve nil window handling, add documentation
2017-01-11 13:44:35 -08:00
Adlai Holler
42f0288fda Account for table view cell separator when reporting height (#2883) 2017-01-11 12:48:16 -08:00
Adlai Holler
92bbfc112f Generate an iOS 9 reference image for testTextContainerInsetIsIncludedWithSmallerConstrainedSize (#2880) 2017-01-09 12:55:31 -08:00
Huy Nguyen
be6faa107a Support Buck build (#2849)
* Support Buck build

* Simplify pod_install hook and buck-file dir's structure

* Update PINRemoteImage's BUCK

* Frameworks linking:
- Weak linking Photos and MapKit.
- Revisit //:Tests' list.
2017-01-04 14:11:28 -08:00
Adlai Holler
23c81b150d Disable testThatRootPagerNodeDoesGetTheRightInsetWhilePoppingBack (#2857) 2017-01-03 14:55:11 -08:00
Huy Nguyen
99c5021be7 Remove duplicated _delegate ivar in ASVideoNode (#2844) 2017-01-01 18:42:41 -08:00
Adlai Holler
2f7925544b Add a failing unit test for the automatic subnode management range issue (#2826) 2016-12-28 11:22:43 -06:00
Adlai Holler
a426d99c74 Remove irritating layout attributes assertions (#2828) 2016-12-25 11:43:34 -05:00
Adlai Holler
57913b8578 Range Controller Uses Last Scroll Direction, Defaults to Down/Right (#2808)
* Test that the initial range bounds are what we expect

* Use the user's previous scroll direction in the range controller

* Remove flow layout assertion
2016-12-22 15:48:57 -05:00
Adlai Holler
3e53d26686 Ensure that all nodes are deallocated inside the thrash testing method to avoid polluting other tests (#2800) 2016-12-19 18:45:57 -05:00
Adlai Holler
eea5ddac3e Range Controller Explicitly Marks Disappeared Nodes as Invisible (#2805)
* Improve visibility handling for range-managed nodes

* Tweak ASWeakSet & the test

* Put back a few things that are pending a different diff

* Add a test

* Ensure we update visible nodes, even if there are no new ones
2016-12-19 17:38:27 -05:00
Michael Schneider
57cd6a3ba8 [ASPagerNode] Fix content insets are wrong in pager node if root node of ASViewController and transition back (#2736)
* Fix content insets are wrong in pager node if root node of ASViewController and transition back

* Add unit test

* Improve test

* Fix test

* Move tests to ASPagerNodeTests
2016-12-12 16:05:09 -08:00
Adlai Holler
5b80a641af Improve Handling of Rasterized Node Interface & Hierarchy States (#2731)
* Improve handling of rasterize node interface states and testing

* Fix harder

* Finish fixes and move rasterization flag into beta header

* Re-enable rasterization in ASDKgram

* Re-enable working test

* Only do it in debug
2016-12-08 09:52:21 -08:00
Michael Schneider
4355f4d2ee [Layout] Don't crash if layout elements are created in layoutSpecThatFits: (#2694)
* Fix crash if layout elements are created with no owner and referenced in layoutSpecThatFits:

* Add failing test for nodes deallocated while creating in layoutSpecThatFits:

* Some more

* Some cleanup

* Added more complexity to tests

* Only cache sublayouts if the layout get’s flattened

* Address comments

* Address comments
2016-12-07 14:58:34 -08:00
Michael Schneider
beb98b448e [ASTextKit] Remove internal side effects related to constrainedSize. 2016-12-06 19:53:58 -08:00
Michael Schneider
ef84e99673 Tremendously make the implementation easier 2016-12-05 20:15:23 -08:00
Michael Schneider
70b647c2b9 Add support for setting a static image to ASNetworkImageNode 2016-12-05 16:43:46 -08:00
Michael Schneider
9adb6554fc Add assertion against externally setting .image in specific ASImageNode subclasses 2016-12-05 16:43:46 -08:00
Adlai Holler
20c66f1025 Beef up the tests 2016-12-05 15:37:49 -08:00
Adlai Holler
9bc58dc024 When not visible, only batch fetch to fill visible area 2016-12-05 15:00:39 -08:00
Adlai Holler
21cad90355 Ensure we always fill leading screens for batching 2016-12-05 14:51:07 -08:00
Michael Schneider
a2e75152f8 [ASDisplayNode] Fix flickering for nodes that support range managed interface state (#2710)
* Fix flickering for range managed nodes

* Go back to old behavior to check for range managed before calling didExitPreloadState in interface state change
2016-12-05 10:34:03 -08:00
Adlai Holler
40a8769217 Filter out extra items when querying collection view layout (#2693) 2016-12-02 08:48:46 -08:00
Adlai Holler
051b738236 Inject data source class name into update validation exceptions, deprecate suppression flag (#2692) 2016-12-01 17:30:36 -08:00
Garrett Moon
ba2268ac99 2611 rename fetch data (#2689)
* 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.
2016-12-01 13:41:22 -08:00
Adlai Holler
b075aa2851 Merge pull request #2682 from facebook/AHFixMoreDeallocVisibleCases
Fix Edge Cases of Table Cell Nodes Deallocated While Visible
2016-11-30 09:01:01 -08:00
Adlai Holler
81a04bc93b Remove magic number 2016-11-30 09:00:48 -08:00
Adlai Holler
3fe87ffb64 Add a test replicating Issue 2252 2016-11-29 16:19:48 -08:00
Adlai Holler
df497b82c2 Improve Batch Fetching Call Pattern to Reduce Fetch Calls (#2675)
* 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
2016-11-29 13:40:03 -08:00
Adlai Holler
14765a55d2 Revert "Merge pull request #2649 from facebook/AHCollectionNodeInitializer"
This reverts commit 0f620f458d815b6f7a6b5d954ac29a6d056caf58, reversing
changes made to 0c65d21f8de3023c6d3a25572da18e3b82a35040.
2016-11-23 15:56:24 -08:00
Adlai Holler
94a0ba8635 Make the tests pass 2016-11-22 16:52:48 -08:00
Adlai Holler
04b93182cd Rejigger ASCollectionNode initializers 2016-11-22 16:49:52 -08:00
Adlai Holler
6d01bbeb19 Let nodes deallocate naturally, manually trampoline UIKit ivars
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
2016-11-21 00:46:57 +09:00
Michael Schneider
1b0b9e4830 Fix layout transition measurement completion on main test (#2639) 2016-11-20 07:05:54 -08:00
Michael Schneider
acc080ab9c Revert setting isMutable to true in ASLayoutSpecSnapshotTestHelper 2016-11-19 06:43:46 -08:00
Michael Schneider
f9c70470d8 Address another round of comments 2016-11-19 06:43:46 -08:00
Michael Schneider
2cd49642b9 Address comments from @appleguy 2016-11-19 06:43:46 -08:00