Commit Graph
4622 Commits
Author SHA1 Message Date
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
r é m i  baf1ea2db4 introduce tests for the ASNavigationViewController (#627) 2017-10-24 19:40:28 +01:00
Huy Nguyen 3b91fbaab2 Update "Getting Started" page (#633) 2017-10-24 16:50:50 +01:00
Garrett Moon d00a58580a Xcode update line should be in 2.6 2017-10-24 08:20:41 -07:00
Garrett Moon 7fffebe293 Update to 2.6 to indicate Xcode upgrade required. 2017-10-24 08:17:43 -07:00
appleguy 68f3468d91 [ASCollectionView] Improve performance and behavior of rotation / bounds changes. (#431)
* [ASCollectionView] Improve performance and behavior of rotation / bounds changes.

See #430 for details.

* Edit CHANGELOG.md

* [ASDataController] Implement -relayoutAllNodesWithInvalidationBlock:, to flush the ASMainSerialQueue before -invalidateLayout is called.

* Don't set download results if no longer in preload range. (#606)

Good catch by @djblake, if you scroll fast enough, you leave images
set on the image node because didExitPreloadRange (which would have
cleared it) was already called.

* Animated WebP support (#605)

* Updating to support animated WebP

* Fix a deadlock with display link

* Fix playhead issue.

* Fix up timing on iOS 10 and above

* Don't redraw the same frame over and over

* Clear out layer contents if we're an animated GIF on exit range

* Clear out cover image on exit of visible range

* Don't set cover image if we're no longer in display range.

* Don't clear out image if we're not an animated image

* Only set image if we're not already animating

* Get rid of changes to podfile

* Add CHANGELOG entry

* Update license

* Update PINRemoteImage

* Remove commented out lines in example

* [ASDataController] Add nullable specifier to invalidationBlock for relayout of nodes.
2017-10-24 13:12:52 +01:00
Garrett Moon 63842e1a39 Fixing changelog 2017-10-22 17:42:57 -07:00
Garrett Moon 7779531810 Update CHANGELOG for 2.5.1 2017-10-22 17:39:14 -07:00
Garrett Moon 53147f0ce6 Updating podspec to 2.5.1 2017-10-22 17:36:52 -07:00
Garrett Moon d31af734df Dispatch batch update to main #trivial (#626)
* Dispatch batch update to main

* TableView too
2017-10-20 15:01:38 -07:00
Garrett Moon 919ec8d32b Check if we need to do a batch update (#624)
* Check if we need to do a batch update

If we've changed our leading screens for batch fetching, we
may need to batch fetch.

* Add CHANGELOG entry
2017-10-20 09:23:07 -07:00
Michael Schneider 526a7cfb53 Fix name clash with YYText (#623) 2017-10-18 15:49:58 -07:00
Max Wang dce7ab3a9b [ASTextNode] Implement an example comparing ASTextNode 1 & 2 behavior. (#570)
* fix SIMULATE_WEB_RESPONSE not imported #449

* add constraint to using catching for layout

* Add TextNode example to test Yoga Layout

* update Yoga version

* add debugging log

* fix lisence

* clean up

* clean up

* fix lisence warning

* add shared scheme

* change sdk version

* revert some metadata

* Merge FlexLayoutExample to TextStressText.
Add flags to control different TextNode used.

* clean up

* fix lisence and syntax

* clean up

* remove xcworkspacedata

* Tiny coding style changes

* Another tiny change related to code style
2017-10-17 15:03:53 +01:00
Huy Nguyen c12509e67a [ASTextKitComponents] Make sure Main Thread Checker isn't triggered during background calculations #trivial (#612)
* Add unit test

* Make sure TextKit components can calculate size in background without upsetting Main Thread Checker
- Add a new thread-safe text view bounds.
- Temporary components stack doesn't have a text view so it can be safely deallocated off main.

* Add ASTextKitComponentsTextView

* Remove unnecessary change

* Fix minor mistake

* ASTextKitComponentsTextView has only 1 initializer

* Minor change

* Switch to atomic property

* Remove manual synthesization
2017-10-17 14:20:20 +01:00
Mustafa Besnili 1e7d46196f Fix "This block and function declaration is not a prototype" warning. (#619) 2017-10-17 14:18:23 +01:00
Derek Argueta 72d33fc88e Update Pinterest CDN URL in example code (#613) 2017-10-12 12:44:30 +01:00
Huy Nguyen 929bd4c60e [ASTextKitComponents] Temporary components can be deallocated off main (#610) 2017-10-10 16:03:30 +01:00
Garrett Moon 4dbb6441d7 Animated WebP support (#605)
* Updating to support animated WebP

* Fix a deadlock with display link

* Fix playhead issue.

* Fix up timing on iOS 10 and above

* Don't redraw the same frame over and over

* Clear out layer contents if we're an animated GIF on exit range

* Clear out cover image on exit of visible range

* Don't set cover image if we're no longer in display range.

* Don't clear out image if we're not an animated image

* Only set image if we're not already animating

* Get rid of changes to podfile

* Add CHANGELOG entry

* Update license

* Update PINRemoteImage

* Remove commented out lines in example
2017-10-09 11:48:32 -07:00
Garrett Moon 1705ec0140 Don't set download results if no longer in preload range. (#606)
Good catch by @djblake, if you scroll fast enough, you leave images
set on the image node because didExitPreloadRange (which would have
cleared it) was already called.
2017-10-09 10:13:28 -07:00
appleguy c6e3dd7a5d [ASCollectionView] Fix index space translation of Flow Layout Delegate methods. (#467)
* [ASCollectionView] Fix index space translation of Flow Layout Delegate methods.

This includes a few other cleanups, including overflow of signed integer indices.

* [ASCollectionView] Improve code sharing of UIKit size method calls; ensure delegate invalidation re-fetches supplementary sizes too.

* [ASCollectionView] Final method ordering and doc-comment for new _sizeForUIKitCellWithKind:atIndexPath: method.
2017-10-09 17:19:46 +01:00
Olcay Ertaş 550da242b7 Update layout2-layoutspec-types.md (#608)
Objective-C code sample was still showing old syntax:
spacer.flexGrow = true;
I have updated to new one:
spacer.style.flexGrow = true;
2017-10-09 08:21:20 -07:00
Flo 4a203db9fc [ASVideoNode] Time observer fix (#604)
* [ASVideoNode] Move time observer handling to player observers methods.

* Update CHANGELOG.md.
2017-10-06 15:04:36 +01:00
Michael Schneider 4379b31ac2 Add assertion in dealloc that it is on main in ASTextKitComponents (#603) 2017-10-05 09:06:50 -07:00
Michael Schneider dd90978fb6 ASTextKitComponents needs to be deallocated on main (#598) 2017-10-04 14:52:49 +01:00
appleguy 7a07d9eb88 [PINCache] Set a default .byteLimit to reduce disk usage & startup time. (#595)
* [PINCache] Set a default .byteLimit to reduce disk usage & startup time.

This default is fairly low - only 20MB - but for most apps with images
in the size range of 10-50KB, this is still 400-1000 images.

Once some optimizations land to PINCache, we'll match the PINCache
default of 50MB to ensure the default better serves users with larger
objects in the cache.

Apps should preferably set their own byteLimit to an optimal value.

@garrettmoon - one interesting question for us is the best place to
set .byteLimit as an app. Digging into the ASPINRemoteImageDownloader
and doing this type cast is a bit complicated, so a passthrough API
to get the PIN* objects directly might be worthwhile.

* [PINCache] Declare necessary APIs to avoid a direct dependency.
2017-10-03 19:32:03 -07:00
romankl 54f241e1dc update faq toc links to match the generated html id (#597)
Right now the faq- table of contents has links to the different
headlines, but some of the generated id s don't match the referencing
a tag.
2017-10-02 11:22:14 +01:00
Michael Schneider 5c6cd7c8d9 Move clearing out of ASTextKitComponents property delegates into ASTextKitComponents dealloc (#591) 2017-09-30 07:20:14 -07:00
Adlai Holler 5186a4317e Use Nil for class instead of nil (#589) 2017-09-27 20:12:18 -07:00
Michael Schneider a103bab00a Clear ivar after scheduling for main thread deallocation #trivial (#590)
* Clear ivar after scheduling for main thread deallocation

After scheduling the ivar for main thread deallocation we have clear out the ivar, otherwise we can run into a race condition where the main queue is drained earlier than this node is deallocated and the ivar is still deallocated on a background thread

* First clear and than schedule
2017-09-27 13:42:02 -07:00