Commit Graph
4622 Commits
Author SHA1 Message Date
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 8f079bd1ca Fix some tests 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 f81c7a05b6 Reverse ASViewController project change 2016-11-19 06:43:45 -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
Adlai Holler 198ea7a99d Merge pull request #2627 from maicki/MSFixStackLayoutSpaceRounding
[ASStackLayoutSpec] Don’t floor space between items for ASStackLayoutJustifyContentSpaceBetween and ASStackLayoutJustifyContentSpaceAround
2016-11-18 14:48:59 +09:00
Michael Schneider bc0443db02 Don’t floor space between items for ASStackLayoutJustifyContentSpaceBetween and ASStackLayoutJustifyContentSpaceAround 2016-11-17 18:05:22 -08:00
David Robles db45b5d814 Update sample video project to allow for testing video’s placeholder image isn’t prematurely cleared. 2016-11-17 10:35:47 -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
Adlai Holler b0ead608d9 Merge pull request #2622 from facebook/AHEventLoggingInProduction
[ASTraceEvent, Debugging] Greatly Improve Event Logging.
2016-11-17 14:53:56 +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
Adlai Holler df7c2b6d96 Merge pull request #2619 from craighowarth/allow-decoration-views
[ASCollectionView] Allow Decoration Views
2016-11-17 09:43:03 +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