71 Commits

Author SHA1 Message Date
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
Victor Mayorov
e94699ae31 Fixed bounds in ASDisplayNode. Bounds.origin shouldn't be affected by -[ASDisplayNode setFrame:] method. 2015-06-15 18:30:44 +03:00
Victor Mayorov
1f5813b835 Fixed typo 2015-06-10 16:19:54 +03:00
Victor Mayorov
7167e4a589 Fixed ASBasicImageDownloader to handle multiple request with the same URL 2015-06-10 15:38:51 +03:00
Scott Goodson
e3f0e66cb3 Updating API names for network range and memory culling before ASDK 1.2 tag. 2015-05-21 22:43:38 -10:00
appleguy
33c5a72002 Merge pull request #432 from tonklon/master
ASTextNode expose exclusion paths
2015-05-16 22:19:47 -10:00
appleguy
203748d069 Merge pull request #425 from onhachoe/master
change ASMutableAttributedStringBuilderTests so that it is safe against ...
2015-05-16 22:08:51 -10:00
Patrik Tomas Chamelo
19e57d9d46 Update FBSnapshotTestCase to 1.8.1 2015-05-07 14:14:50 -07:00
Tobias Klonk
2a29f81b3a ASTextNode expose exclusion paths
expose NSTextContainer's exclusionPaths property on ASTextNode to be able to exclude view areas from typesetting.

This implements #394
2015-04-20 10:21:01 +02:00
Onha Choe
74d2433d60 change ASMutableAttributedStringBuilderTests so that it is safe against different MAX macro
when MAX macro is defined in such a way in "sys/params.h", this test will become flaky,
fix so that it doesn't happen
2015-04-14 13:57:54 -07:00
Ryan Nystrom
24bb0926bc Merge pull request #421 from facebook/xcode-6-3
Xcode 6.3 support
2015-04-08 16:44:50 -07:00
Ryan Nystrom
527a6228a9 Xcode 6.3 support 2015-04-08 16:35:10 -07:00
Scott Wolchok
15dfd25aff s/assign/strong/ on an object-typed ivar
It caused a zombie in tests.
2015-04-06 14:47:42 -07:00
Nadine Salter
dd10fda42c Fix ASSnapshotTestCase #import. 2015-03-23 16:39:21 -07:00
Nadine Salter
ad3f3b5fdc Disable flakey test. 2015-03-23 15:59:29 -07:00
Nadine Salter
b869d025ff [tests] ASSnapshotTestCase. 2015-03-23 14:06:38 -07:00
Ryan Nystrom
7117548bc1 Longer timeout for async tests 2015-03-17 11:44:10 -07:00
Ryan Nystrom
db8bbcfd0e Thread safe creation and canceling of download tasks
fixes #364
2015-03-11 16:52:14 -07:00
Ryan Nystrom
47b53d9293 Stricter build flags for ASDK and tests 2015-03-04 11:09:02 -08:00
Ryan Nystrom
c657411a2e Batch fetch with small data sets 2015-02-26 22:29:13 -08:00
Ryan Nystrom
b3ae15858a Unit tests for batch fetching 2015-02-26 22:26:25 -08:00
Ryan Nystrom
52cbbd3d3c Allow all gestures through ASControlNode
fixes #305
2015-02-11 17:00:44 -08:00
Nadine Salter
9f6ce8e16e Merge pull request #265 from andyscott/ASTextNode-max-line-count
Add maximumLineCount to ASTextNode
2015-01-27 14:41:25 -08:00
andyscott
c098272c0a Fix existing tests and add additional test for max line count 2015-01-27 09:47:55 -08:00
Ryan Nystrom
ea6c29fb7f Compile for extensions 2015-01-27 09:30:09 -08:00