195 Commits

Author SHA1 Message Date
Levi McCallum
1216d748a1 Test number of supplementary views in section inspector method 2015-10-15 11:40:52 -07:00
Levi McCallum
8a77072e3c Add tests for flow layout inspector section calculation 2015-10-15 11:40:51 -07:00
Adlai Holler
b1e60a95e6 Merge branch 'master' into update-objc 2015-10-13 21:26:20 -07:00
Garrett Moon
1a8f66919b Add tests for enabling / disabling shouldRasterize 2015-10-06 11:47:13 -07:00
Adlai Holler
8bb9d173dc Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode+Subclasses.h
	AsyncDisplayKit/ASMultiplexImageNode.h
	AsyncDisplayKit/ASViewController.h
	AsyncDisplayKit/Details/ASDataController.h
2015-10-05 13:24:16 -07:00
Adlai Holler
ac8b224d9b Fix broken ASPhotosFrameworkImageRequest test 2015-10-02 13:04:48 -07:00
Adlai Holler
de1f9788f3 Simplify creation of Photos Framework NSURLs in ASMultiplexImageNode 2015-10-02 12:44:21 -07:00
Adlai Holler
bf88bd8e19 Rename image request class, add deliveryMode into the request params 2015-09-26 13:40:00 -07:00
Adlai Holler
ee0c027ba6 Build photos image request class and tests 2015-09-25 15:25:37 -07:00
Steven Ramkumar
d09888f9c2 Add a indexPathForNode: to ASTableView 2015-09-22 12:09:56 -07:00
Adlai Holler
cde790124d Merge branch 'master' into update-objc 2015-09-17 11:27:27 -07:00
appleguy
21bdbbe12f Merge pull request #665 from jflinter/jack-build-phase-cleanup
Clean up Cocoa Touch framework target
2015-09-17 10:15:21 +02:00
Jack Flintermann
b84c371211 fix breaking test imports 2015-09-16 23:39:19 -04:00
Adlai Holler
04690c0a4c Re-add nil tests 2015-09-16 15:36:52 -07:00
Adlai Holler
262d65eea9 More updates 2015-09-16 15:34:24 -07:00
Huy Nguyen
dfbaa35706 Disable an unstable test in ASTableViewTests. 2015-09-16 23:04:18 +03:00
Huy Nguyen
2d575fcafc Relayout table view cell nodes if there is a mismatch between content view size and the node's constrained size
- Above is the generic case. Correctly handling it means relayout when the table view enters or leaves editing mode is solved as well.
- Async data source API removal: In a table view, cell nodes should always fill its content view and table view widths. Thus async data source can no longer provide custom constrained size for cell nodes. This removal allows table view to better handle relayout.
- Some more tests are added to ASTableViewTests to check against use cases handled in this diff.
2015-09-16 11:41:34 +03:00
rcancro
b14e189bfb Addressed comments to LayoutOptions PR 2015-09-11 16:07:18 -07:00
appleguy
69365451d1 Merge pull request #643 from nguyenhuy/fixRelayoutDuringInitialConfig
Avoid doing relayout during initial configuration
2015-09-09 19:45:21 -07:00
Huy Nguyen
6383b69029 Update ASTableViewTests to detect the case when relayout is trigger during initial configuration. 2015-09-08 22:43:25 +03:00
rcancro
cbaf178950 Hide ASLayoutOptions from the user 2015-09-08 09:50:47 -07:00
rcancro
15b3fd6eab Moved ASLayoutable* properties into ASLayoutOptions class 2015-09-08 09:50:27 -07:00
appleguy
38eae3ab77 Merge pull request #623 from rcancro/layoutSpec
ASLayoutSpec are temporarily mutable and have a more obj-c interface
2015-08-23 11:31:07 -07:00
rcancro
680305704a addressed comments and fixed tests 2015-08-21 21:03:40 -07:00
Huy Nguyen
3e5d5c44cb Test relayout caused by a different constrained size for each and every node. All nodes, including loading ones, must be re-measured. 2015-08-21 00:59:21 +03:00
Sal
f06630c55a Add test coverage for ASTextNodeRenderer to validate nil and empty strings produce CGSizeZero 2015-08-13 13:57:54 -04:00
Shannon Ma
f7a4ca45db Fix ASTextNodeWordKernerTests for Xcode 7/iOS 9 2015-07-31 11:31:10 -07:00
Ethan Nagel
3da7305abb Wait to begin thrashing until we have completed reloading the data so we aren't trying to do both operations concurrently. 2015-07-15 16:31:01 -07:00
Ethan Nagel
8c72118e69 Don't abuse the CI servers so much. Note - With this configuration we will often pass with a known race issue we currently have. Making ASTableViewStressTest more interesting so we can reliably reproduce the issue there. 2015-07-15 10:19:03 -07:00
Ethan Nagel
98bdae8690 Merge branch 'master' into update-astable-test 2015-07-13 14:39:28 -07:00
Ethan Nagel
f010b0f3e3 Update ASTableView test to be more random and more rigorous. 2015-07-13 14:34:10 -07:00
Huy Nguyen
e1fd58268c Clean up #468:
- -layoutSpecThatFits: must return an ASLayoutSpec.
- Move ASDisplayNode's -measureWithSizeRange: redeclaration to ASDisplayNode.h.
- Rename ASStackLayoutChild.h to ASStackLayoutDefines.h.
- Rename ASStaticLayoutSpecDimension.h to ASRelativeSize.h.
- Don't import ASLayout.h in other headers to prevent circular inclusions.
- Explain use cases of ASLayout's initializers.
- Clean up ASInternalHelpers.h.
2015-07-10 19:41:17 +07:00
Victor Mayorov
01771f7860 Implemented test for crash in ASCollectionView on reloadData 2015-07-07 23:14:54 -07:00
Huy Nguyen
9678adaa93 Merge branch 'master' into layout_node 2015-07-06 22:21:32 +07:00
Huy Nguyen
51f1ed819f - ASDisplayNode now caches calculated layout requested by layout specs.
- constrainedSizeForCalculatedLayout is of type ASSizeRange.
- calculatedLayout is better explained.
- Since ASLayout is cached and reused, its position property is mutable.
2015-07-06 22:08:01 +07:00
appleguy
3f574a3306 Merge pull request #521 from jflinter/jack-uiresponder-additions
Add UIResponder methods to ASDisplayNode
2015-07-04 22:36:09 -07:00
Huy Nguyen
af64f33ed7 Minor changes: remove unncessary imports and add a new line ad the end of ASInternalHelpers.h 2015-07-01 18:36:36 +07:00
Huy Nguyen
2149d44990 Fix naming convetion:
- "Layout node" is changed to "layout spec".
- Update tests.
- Update Kittens sample.
2015-07-01 18:13:44 +07:00
Huy Nguyen
eb5670032d ASDisplayNode flattens the ASLayout calculated from its layout spec and stores the result. This reduces memory footprint and gives -layout a performance gain. 2015-06-30 20:18:11 +07:00
Scott Goodson
57465c7fd3 Overhaul ASDataController and extensively test ASTableView.
This diff resolves all known consistency issues with ASTableView and ASCollectionView.
It includes significantly more aggressive thrash-testing in ASTableViewStressTest,
which now passes on a variety of device and simulator configurations.  It also updates
the unit tests run on every commit to ensure any regression is caught quickly.

A few of the salient changes in this diff:
- ASTableView now uses Rene's ASCollectionViewLayoutController, and actually uses a
UICollectionViewFlowLayout without any UICollectionView.  This resolves an issue where
ASFlowLayoutController was generating slightly out-of-bounds indicies when programmatically
scrolling past the end of the table content.  Because the custom implementation is likely
faster, I will revisit this later with profiling and possibly returning to the custom impl.
- There is now a second copy of the _nodes array maintained by ASDataController.  It shares
the same node instances, but this does add some overhead to manipulating the arrays. I've
filed a task to follow up with optimization, as there are several great opportunities to
make it faster.  However, I don't believe the overhead is a significant issue, and it does
guarantee correctness in even the toughest app usage scenarios.
- ASDataController no longer supports calling its delegate /before/ edit operations.  No
other class was relying on this behavior, and it would be unusual for an app developer to
use ASDataController directly.  However, it is possible that someone with a custom view
that integrates with ASDataController and ASRangeController could be affected by this.
- Further cleanup of organization, naming, additional comments, reduced code length
wherever possible.  Overall, significantly more accessible to a new reader.
2015-06-28 18:03:45 -07:00
Huy Nguyen
dd29a890df Still support -calculateLayoutThatFits: (and manual layout), for backward compatibility. 2015-06-28 20:31:32 +07:00
Jack Flintermann
5889c7019e basic unit tests 2015-06-27 03:19:52 -04:00
Huy Nguyen
95e787b226 Remove stack children type:
- ASLayoutable requires mutable properties that are used when attached to a stack layout.
- Thus, ASLayoutable objects (including ASDisplayNode) can be injected into stack layout directly.
- ASStackLayoutNodeChild no longer needed.
- Tests and Kitten sample updated.
2015-06-26 11:47:42 +07:00
Huy Nguyen
f588bceb4d Introduce ASLayoutable and eliminate ASCompositeNode:
- Both ASDisplayNode and ASLayoutNode conforms to this protocol.
- ASDisplayNode can be embeded directly into layout graph.
- Eliminate ASCompositeNode.
- Fix ASStaticSizeDisplayNode not recpect min constrained size.
- Updated tests.
2015-06-26 09:29:16 +07:00
Huy Nguyen
259bbf22bc Fix naming conventions on equal and resolve methods of new size types. 2015-06-25 11:34:37 +07:00
Huy Nguyen
810bc3ab84 Rename ASLayoutNode's -computeLayoutThatFits to -calculateLayoutThatFits. 2015-06-25 11:34:37 +07:00
Huy Nguyen
4ad64b2841 Update tests. 2015-06-25 11:34:37 +07:00
Huy Nguyen
64e2323a4e Remove ASLayoutNodeSize:
- ASLayoutNode no longer has 'size' constraint during its initialization..
- ASLayoutNode no longer needs parentSize to calculate its layout.
2015-06-25 11:34:36 +07:00
Huy Nguyen
e23a3fe4c2 Add layout tests. 2015-06-25 11:34:36 +07:00
Scott Goodson
c700618862 Improvements to thread safety during closely spaced edit events.
This applies primarily when beginUpdates / endUpdates is not used.
Due to user interaction-driven edits, like reloads or adding content
at the bottom, sometimes this is unavoidable in app design and thus
critical.

I have a diff in flight to make ASDataController / ASRangeController
robust against very aggressive thrash testing, which will be added
both to the unit test suite and this new example project.
2015-06-21 21:04:09 -07:00