4500 Commits

Author SHA1 Message Date
Flatout73
b0c3e65da8 Fix misprint (#768) 2018-01-29 12:05:48 +00:00
Denis Morozov
3f27546ec8 Fix typos in layout2-layoutspec-types.md #trivial (#770) 2018-01-29 12:05:33 +00:00
Adlai Holler
c3ae4474d0
NoCopyRendering experiment: Fix possible memory leak if image node rendering is canceled #trivial (#765)
* Fix memory leak if image node rendering is canceled

* Update comment
2018-01-23 10:45:34 -08:00
Adlai Holler
9b8a919a93
Revert "Faster collection operations (#748)" (#759)
This reverts commit 5c13403ef75c030adc7a4d51a7792a9c6c1c348b.
2018-01-22 11:38:09 -08:00
Adlai Holler
5c13403ef7 Faster collection operations (#748)
* Faster collection operations

* Fix a few things

* Put the stupid semicolon

* Address warning

* Cut down retain/releases during collection operations

* Update CHANGELOG.md
2018-01-22 13:22:03 +00:00
janechoi6
b5d3e52e8b Update subclassing.md (#753) 2018-01-18 16:00:15 +00:00
Huy Nguyen
2e98588372
[ASDisplayNode] Don't force a layout pass on a visible node that enters preload state (#751)
- After #706, a layout pass is forced on an ASM-enabled node that enters preload state to make sure that its subnodes can start preloading as well. However, when the node is visible, a (coalesced, thus more efficient) layout pass will be triggered by CA soon anyways, so rely on it instead.
2018-01-17 15:35:02 +00:00
Adlai Holler
4776cb3dcd Fix the dangerfile for real (#750) 2018-01-16 20:55:27 +00:00
Yevgen Pogribnyi
a3136b0225 [ASTraitCollection] Add missing properties to ASTraitCollection (#625)
* [ASTraitCollection] Add missing properties to ASTraitCollection

* ASTraitCollection now completely reflects UITraitCollection

* Add ASContentSizeCategory enum that corresponds to
  UIContentSizeCategory and can be used inside a struct.

* * Remove enum ASContentSizeCategory.
* Use __unsafe_unretained UIContentSizeCategory instead of the enum.

* Added ASPrimitiveTraitCollection lifetime test

* Changes requested at code review:
* Restore one of the ASTraitCollection constructors with a deprecation notice.
* Clean up API by the separation of tvOS-specific interfaces.
* Use [NSString -isEqualToString:] for ASPrimitiveContentSizeCategory equality tests for better readability.
* Encapsulate fallback logic for UIContentSizeCategoryUnspecified.

* Fix failing test
2018-01-16 18:08:29 +00:00
Adlai Holler
193be32bcf
Update dangerfile for 2018 #trivial (#746)
* Update the dangerfile

* Make a trivial change to test new dangerfile

* Try out the new value with another trivial change
2018-01-15 15:13:54 -08:00
Adlai Holler
61dade6bda Raise deployment target to iOS 9 (#743)
https://github.com/TextureGroup/Texture/pull/743

Manually merged since I forgot to retarget that diff onto master before merge
2018-01-15 15:13:05 -08:00
Adlai Holler
1d105c2056
Add an experimental "no-copy" renderer (#741)
* Add "ASGraphicsContext" to skip copying our rendered images

* Zero the buffer before making a context

* Update license header

* Update dangerfile

* Make it a runtime flag

* Restore GState for good measure

* Free buffer if end without image

* Enable the experiment, and cut out the middle-man

* Fix typo
2018-01-13 19:19:08 -08:00
Garrett Moon
3708f2e448 Update CHANGELOG for 2.6 2018-01-12 13:01:28 -08:00
Sudhanshu
1dfdb48497 Add MensXP to Showcase (#739)
This change is for adding "MensXP: Fashion, Grooming tips" iOS App to Texture showcase.
2018-01-10 10:15:53 -08:00
Adlai Holler
5e73396cde
Enable collection node interactive moves (#735)
* Add support for interactive moves

* Enable drag & drop in collection view example

* Update changelog

* Change the gating logic to match UIKit

* Add a warning when we prevent interactive movement due to async layout
2018-01-09 14:34:32 -08:00
appleguy
131619de96
Reimplement ASRectTable using unordered_map to avoid obscure NSMapTable exception. (#719)
* Reimplement ASRectTable using unordered_map to avoid obscure NSMapTable exception.

The new class is called ASRectMap, which patterns alongside ASIntegerMap in both name and implementation.

After some pretty detailed investigation, including study of open-source reimplementations
of Foundation, the best lead I've found on the NSMapTable exception is that
some NSPointerFunction types are not fully supported. Strangely, the ones being used
do seem to work fine almost all of the time.

The main concern is the Struct memory type, which is not officially re-declared in
NSMapTable, and as such the documentation claims that there may exist some
combinations of NSPointerFunction that are not supported.

Because the exception is occurring frequently enough to be a concern (in the hundreds
to low thousands, though only 50 a day) - I decided to replace NSMapTable entirely
in order to ensure full correctness.

"*** -[NSMapTable initWithKeyPointerFunctions:valuePointerFunctions:capacity:] Requested configuration not supported."

* Fix Xcode project
2017-12-21 16:17:25 -08:00
Stephen Williams
4dec51ca37 Fix ASDKgram example #trivial (#700)
- Fix an insta-crash that's caused by Webservice.load method to call its completion block off the main thread.
- Fix incorrect http status code check.
- Bump the deployment target to get the project compiling.
2017-12-20 12:53:13 +00:00
John T McIntosh
fff5aae0a5 Add support for toggling logs off and back on at runtime #trivial (#714) 2017-12-20 12:49:09 +00:00
Huy Nguyen
7416d6a88a
Add Blendle to our showcase page (#721) 2017-12-19 18:53:13 +01:00
Ilya
eab7bea48d Add missing flags for ASCollectionDelegate (#718)
* Add missing flags for ASCollectionDelegate

* Update CHANGELOG.md
2017-12-19 17:13:45 +00:00
César Estébanez Tascón
8f19434788 Check for nil elements on ASTableView as well #trivial (#710) 2017-12-19 16:56:35 +00:00
Garrett Moon
46d46fdf12
#trivial Fixes image nodes being stuck not being able to download image (#720)
* #trivial Fixes image nodes being stuck not being able to download image

* Clear out the _cacheUUID too even though this is not strictly necessary.
2017-12-18 15:15:29 -08:00
Ha Hyun soo
8300d8eb61 Vingle very community - Update showcase (#711) 2017-12-11 19:47:41 -08:00
Huy Nguyen
5a4d569c56
Ensure an ASM enabled node applies its pending layout when enters preload state (#706)
This makes sure subnodes are inserted and start preloading right away, instead of waiting until the next layout pass of the supernode. Fixes #693.
2017-12-08 18:30:26 +00:00
Garrett Moon
008a1ce208
Revert Adds support for specifying a quality indexed array of URLs (#699)
* Revert "Adds support for specifying a quality indexed array of URLs (#557)"

This reverts commit 3c77d4a5da44c46c7b80b2a627c95389b7d6352d.

* Add CHANGELOG entry
2017-12-05 13:55:19 -08:00
Garrett Moon
0b6d41f872
A couple performance tweaks for animated images #trivial (#634)
* A couple performance tweaks for animated images

* @nguyenhuy's comments

* Avoid calling animatedImageData twice. Thanks @maicki.

* Fix call to background deallocation

* Good catch by @Adlai-Holler
2017-12-04 14:56:04 -08:00
Andrew Yates
c1f517a7eb Correct Synchronous Concurrency Talk Link (#698)
Fixes #697.
2017-12-04 10:41:00 -08:00
Adlai Holler
0dc7002f0b Add unit tests for the layout engine (#424)
* Build testing platform & tests for the layout engine

* Add our license header to debugbreak.

* Remove thing

* Address review comments

* Beef up the logging

* Update -[ASLayout isEqual:]

* testLayoutTransitionWithAsyncMeasurement passes now

* Disable testASetNeedsLayoutInterferingWithTheCurrentTransition

* Fix build errors
2017-12-01 17:05:47 +00:00
Huy Nguyen
bccde6cf0f
[ASScrollNode] Fix small bugs and add unit tests (#637)
* Add unit tests for ASScrollNode

* Make sure ASScrollNode's size is clamped against its size range

* Invalidate ASScrollNode's calculated layout if its scrollable directions changed

* Update comment

* Update CHANGELOG

* Address Adlai's comments
2017-12-01 15:41:06 +00:00
Huy Nguyen
b01fac35b6
[ASDisplayNode+Layout] Ensure a pending layout is applied once (#695)
Before:
  - Even if a pending layout was applied before, it'll be unnecessarily applied again in next layout passes and cause `-calculatedLayoutDidChange` being called multiple times.

After:
  - If a pending layout was applied, the calculated layout will not be ignored but reused, if possible, in next layout passes.

Test plan: testSetNeedsLayoutAndNormalLayoutPass in #424.
2017-12-01 13:11:17 +00:00
Erekle
d8cda8d74a [iOS11] Update project settings and fix errors (#676)
* [iOS11] Update project settings and fix errors

* update changelog

* resolve comments
2017-11-30 12:25:06 +00:00
Richard Henry
324288455f Add missing </div> tags in Layout API Sizing docs (#691)
This fixes the broken documentation here: http://texturegroup.org/docs/layout2-api-sizing.html
2017-11-28 12:15:56 +00:00
Huy Nguyen
b411149290
Add a recent talk by @smeis at CocoaHeadsNL (#687) 2017-11-28 12:14:56 +00:00
Richard Henry
ab51983ebf Fix bug that breaks ASNodeController docs page (#690)
When Obj-C is selected on this page, the bottom half of the documentation is missing. When Swift is selected, malformed content appears where the documentation is nested inside the code block.

Repro'd here in Safari and Chrome: http://texturegroup.org/docs/containers-asnodecontroller.html

I think the bug is that <PhotoCellNode> is being parsed as an HTML tag, and this should fix it.
2017-11-27 22:20:50 -08:00
huang-kun
e4b2c05c21 [ASCornerLayoutSpec] New layout spec class for declarative corner element layout. (#657)
* Add new layout spec class with snapshot testing. Update examples and CHANGELOG.md

* Code review updates.

* Open curly bracket in a new line.
2017-11-24 13:45:59 +00:00
Max Wang
b2539d3531 Bugfix/fix yoga logging aligning api changes (#668)
* fix SIMULATE_WEB_RESPONSE not imported #449

* Fix logging message for new api
2017-11-21 13:34:21 +00:00
Erwin Zhang
cb2e5ddb2d Fix swift sample. (#669) 2017-11-21 13:33:45 +00:00
WymzeeLabs
17c4d606d7 Update subtree-rasterization.md (#679)
* Update subtree-rasterization.md

For Texture 2.5.1 API

* Update subtree-rasterization.md
2017-11-21 12:16:04 +00:00
WymzeeLabs
fc79566ad4 Update layer-backing.md (#678)
Reflect Texture 2.5.1 API change
2017-11-21 12:14:23 +00:00
Adlai Holler
4fc753a458
Make it possible to map between sections even if they're empty (#660)
* Make section mapping work even for empty sections

* Unlock more cases and update changelog

* Fix complexity documentation
2017-11-03 16:24:48 -07:00
Adlai Holler
ff608c92bf
[Minor Breaking API] Make deallocation queues more reliable (#651)
* Make our async deallocation functions take a double pointer, so we can be sure we've released before the queue drains

* Make it a class property

* Fix the return type

* Use a locker

* Improve release notes
2017-11-02 10:45:34 -07:00
TBXark
64b6242b9c Update layout2-layoutspec-types.md (#655)
Fix `ASBackgroundLayoutSpec ` example code bug
2017-11-02 16:45:57 +00:00
Garrett Moon
1626c17ff2 Disable this test for now, it's too flakey and no one has time to investigate (#649) 2017-11-02 12:54:39 +00:00
Adlai Holler
944cad6ed6
Make the framework backwards compatible with Xcode 8 (#650)
* Make the framework backwards compatible with Xcode < 9

* Update changelog
2017-10-31 16:11:57 -07:00
Garrett Moon
255682da3d Fix a layout deadlock caused by holding the lock and going up the tree. (#638)
* Fix a layout deadlock caused by holding the lock and going up the tree.

* Add CHANGELOG message

* Huy's comments
2017-10-31 15:36:01 +00:00
Ha Hyun soo
d8c2a8edd2 [Documentation] Update Inversion Docs (#647)
* Update docs

append inversion example about swift language

* apply github comment
2017-10-31 13:25:37 +00:00
appleguy
63efdbde8f [ASCollectionView] Call -invalidateFlowLayoutDelegateMetrics when rotating. #trivial (#616)
* [ASCollectionView] Ensure -invalidateFlowLayoutDelegateMetrics is called for UIKit passthrough cells.

This allows rotation to work properly when rotating UIKit passthrough
cells that need to change width.

* [ASCollectionView] No need to verify node is still in model to handle view-only notifications.
2017-10-31 13:20:58 +00:00
Adlai Holler
af99ff5ef2 Have ASNetworkImageNode report whether images were cached or not (#639)
* Have ASNetworkImageNode report whether images were cached or not.

* Update changelog

* Add fileURL case
2017-10-25 15:57:30 -07:00
r é m i 
8317c11e42 [Tests] Introducing tests for the ASTabBarController (#628)
* introducing tests for the ASTabBarController

* Update ASTabBarControllerTests.m
2017-10-25 10:53:37 +01:00
r é m i 
128700f82d [Tests] Add test scrollToPageAtIndex ASPagerNode (#629)
* add scrollToPageAtIndex for the ASPagerNode

* update convention code
2017-10-24 19:40:48 +01:00