2703 Commits

Author SHA1 Message Date
Michael Schneider
2cd49642b9 Address comments from @appleguy 2016-11-19 06:43:46 -08:00
Michael Schneider
bd851cae9c Change some invalidateCalculatedLayout to setNeedsLayout calls 2016-11-19 06:43:46 -08:00
Michael Schneider
a88b2ae916 Call setNeedsLayout in ASTextNode instead of just invalidate the calculated layout to trigger a relayout if necessary 2016-11-19 06:43:46 -08:00
Michael Schneider
d73712059d Remove unecessary measurement pass in ASCellNode 2016-11-19 06:43:46 -08:00
Michael Schneider
c29b7a184c Introduce ASFloorSizeValues and ASCeilSizeValues 2016-11-19 06:43:46 -08:00
Michael Schneider
8964ce86b6 Revert ASTextNode workaround for side effect in calculateSizeThatFits: 2016-11-19 06:43:46 -08:00
Michael Schneider
cc297a2dae Fix some tests and add a workaround to ceil the values from self.bounds.size before checking for equality 2016-11-19 06:43:46 -08:00
Michael Schneider
3d37e55c7b Some more improvements around constrained size 2016-11-19 06:43:46 -08:00
Michael Schneider
30b7644415 Factor out constrainedSize usage for layout pass 2016-11-19 06:43:46 -08:00
Michael Schneider
257d4c3a1f Further improvements and fixing tests 2016-11-19 06:43:46 -08:00
Michael Schneider
c14a86c4d6 More improvements to figure out the constrained size that should be used in the layout pass 2016-11-19 06:43:46 -08:00
Michael Schneider
a71a1d8519 Address comments 2016-11-19 06:43:46 -08:00
Michael Schneider
2744998a10 Further progress 2016-11-19 06:43:46 -08:00
Michael Schneider
c7765f6183 Add pending layout to ASDisplayNode 2016-11-19 06:43:46 -08:00
Michael Schneider
d21a512907 Some commit 2016-11-19 06:43:46 -08:00
Michael Schneider
5d84f21fda Add sizeThatFits: to _ASDisplayView 2016-11-19 06:43:46 -08:00
Michael Schneider
b0eb2f81c2 Cleanup 2016-11-19 06:43:46 -08:00
Michael Schneider
dcc54c0d36 Proper relayout if size changes 2016-11-19 06:43:46 -08:00
Michael Schneider
0eb882bae5 Some more changes 2016-11-19 06:43:46 -08:00
Michael Schneider
c819d716b4 Implement sizeToFit: 2016-11-19 06:43:46 -08:00
Michael Schneider
e7fccb2363 Improve ASButtonNode layout invalidation 2016-11-19 06:43:45 -08:00
Michael Schneider
0f8eac4757 Some other commit 2016-11-19 06:43:45 -08:00
Michael Schneider
bcb032d5a5 Make tests happy 2016-11-19 06:43:45 -08:00
Michael Schneider
6f40e9a654 Some more stuff in flux 2016-11-19 06:43:45 -08:00
Michael Schneider
c61ba65ba3 Some commit 2016-11-19 06:43:45 -08:00
Michael Schneider
5226879291 Some commit 2016-11-19 06:43:45 -08:00
Adlai Holler
307a1a0ab6 Merge pull request #2625 from MarvinNazari/master
[ASCellNode] implement a .viewController property
2016-11-19 15:49:32 +09:00
Garrett Moon
2284914c36 If you override the property, you need to specify __weak (#2631) 2016-11-19 07:42:44 +09:00
Garrett Moon
fb48a27160 If you override the property, you need to specify __weak (#2630) 2016-11-19 06:20:25 +09:00
Marvin Nazari
b578eb7490 [ASCellNode] Force the view to load if we haven't already 2016-11-18 12:38:59 +01:00
Michael Schneider
bc0443db02 Don’t floor space between items for ASStackLayoutJustifyContentSpaceBetween and ASStackLayoutJustifyContentSpaceAround 2016-11-17 18:05:22 -08:00
David Robles
4ad8361eea Prevent premature placeholder image clearing when setting the video asset at a later point in time. 2016-11-17 10:35:26 -08:00
Marvin Nazari
31ffea40c2 [ASCellNode] implement a .viewController property 2016-11-17 11:26:55 +01:00
Adlai Holler
da465bf812 Merge pull request #2624 from facebook/HTDeprecateTableViewDelegates
[ASCollectionNode, ASTableNode] Deprecate asyncDelegate & asyncDataSource Properties
2016-11-17 18:41:41 +09:00
Hannah Trosi
6565b8348d collectionView 2016-11-17 16:46:07 +09:00
Hannah Trosi
c9143fb5df tableView only 2016-11-17 15:18:55 +09:00
Adlai Holler
00f448d534 Merge pull request #2623 from facebook/AssertLog
[ASDisplayNode] Convert assertion to log so developer can see layout issues onscreen.
2016-11-17 14:55:44 +09:00
Scott Goodson
8c01fccfca [ASDisplayNode] Convert assertion to log so developer can see layout issues onscreen.
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.
2016-11-16 21:14:15 -08:00
Adlai Holler
4a48ba8be2 Improve our event logging greatly 2016-11-17 12:04:30 +09:00
Craig Howarth
e8688d645a [ASCollectionView] Allow Decoration Views 2016-11-16 17:16:15 -05:00
Adlai Holler
14fa50d42f Merge pull request #2613 from facebook/AHFixCarthage
Fix the Carthage Build
2016-11-16 11:51:09 +09:00
Adlai Holler
9e04088b65 Merge pull request #2610 from garrettmoon/fixCallingContentsOffMainThread
[ASDisplayNode] Placeholder contents configuration needs to check self.contents on main.
2016-11-16 11:09:26 +09:00
Adlai Holler
244ff00152 Fix carthage? 2016-11-16 11:03:55 +09:00
appleguy
4d16d58407 Add method to specify the default NSURLSessionConfiguration for (#2609)
ASPINRemoteImageDownloader. This will allow callers to supply their own custom
logic whether that is background downloads, custom http headers, cookie
storage, etc.
2016-11-14 19:53:30 -08:00
Adlai Holler
a080773532 Remove legacy ASVideoNode flags (#2608) 2016-11-15 11:56:56 +09:00
Garrett Moon
b1f0bbf514 self.contents isn't safe to access on the main thread. 2016-11-14 16:21:14 -08:00
rmalik
7769883dc8 Add method to specify the default NSURLSessionConfiguration for
ASPINRemoteImageDownloader. This will allow callers to supply their own custom
logic whether that is background downloads, custom http headers, cookie
storage, etc.
2016-11-14 16:19:48 -08:00
Michael Schneider
d649f2524f Remove legacy ASVideoNode flags 2016-11-14 09:21:38 -08:00
Adlai Holler
e2e32870ed Reduce Flashing & Optimize ASTableNode/ASCollectionNode Data Loading (#2541)
* Optimize data controller loading by combining section updates with first set of item updates

* Update call pattern test

* Add some explanation about the approach
2016-11-14 14:30:41 +09:00
Michael Schneider
44aa582ceb Fix crash if batch update blocks are nil although method declaration allows nullable (#2599) 2016-11-14 10:15:11 +09:00