Commit Graph
4981 Commits
Author SHA1 Message Date
Adlai Holler b5ee7828a5 CASet the default contentsScale to screen scale, update the contents scale when the image changes 2019-07-17 15:56:02 -07:00
Michael Zuccarino 935abc4b51 Add link to Getting Started to Overview page (#1587) 2019-07-15 18:14:39 -07:00
Huy Nguyen 45f1611ccb [Dev doc] Improve title of how-to-debug.md (#1586) 2019-07-15 13:53:54 -07:00
Huy Nguyen b15bcfd6d7 [Dev docs] Update navigation bar (#1585) 2019-07-15 13:53:32 -07:00
Huy Nguyen 8640d568f4 [Dev doc] Minor updates to collection-asynchronous-updates.md 2019-07-15 12:14:21 -07:00
Hanton 88946c4b93 Update docs navigation orders (#1584) 2019-07-15 12:02:43 -07:00
Greg Bolsinga 7da85c5008 Run Import Optimizer on Texture (#1580)
* Run Import Optimizer on Texture
2019-07-11 19:19:13 -07:00
Hanton b7d64a0917 Fix the build warning in ASRangeController.mm (#1575) 2019-07-11 12:14:14 -07:00
Rahul Malik 6176aa4bc9 Bridge CTFontRef directly to UIFont when converting attributes on NSAttributedString (#1579)
In iOS13, there is an issue with the font returned from "-[UIFontj fontWithName:size:]". When asking for "SFUI-Regular" returns "Times New Roman" font.

It isn't clear why we were trying to create a new font instance when CTFontRef toll-free bridges to UIFont. This appears to pass tests both internally at Pinterest and Texture so I feel like the change is pretty safe and should also solve the iOS 13 regression users are experiencing.
2019-07-11 11:54:33 -07:00
Sterlingster 901f4dd97f Fixes accessibilityLabel bug on ASButtonNode that has no title (#1573) 2019-07-10 20:03:39 -07:00
Hanton 00d76ceee3 [Dev doc] Add Carthage version (#1578) 2019-07-10 20:00:44 -07:00
Hanton 083f081634 Update CONTRIBUTING.md (#1574)
* Change namespace `ASDN` to `AS`
2019-07-10 10:55:08 -07:00
Michael Schneider 18e55277dc Fix truncation token is wrong after attributed string is changing with different foreground color (#1550) 2019-07-02 06:56:50 -07:00
Huy Nguyen 6e46d9bcd5 [ASDataController] Add an experiment that avoids flushing editing queue before starting the data pipeline pipeline (#1564)
* [ASDataController] Avoid flushing editing queue before starting data controller pipeline

Step 1 of the pipeline is on main thread and needs pendingMap which was updated by the end of step 1 of the run. And step 1 operates on data source index space. So it should be ok to start it ASAP -- without waiting for any running work on the background editing queue.

One potential race condition after this change is that it's possible for main thread to query the data source (step 1) while the editing queue consumes the last change set (step 3). However, as long as the client's each nodeBlock and the node's layout code capture/reference an individual model object (as opposed to the whole data set) -- which is what clients are supposed to do anyways, then everything should be fine.

The benefit of this diff is that the pipeline will be able to accept many more change sets within a short time window, for example when clients submit a burst of separate small updates.

I tested this diff against our test suite several times and smoke tested it in our code base without any issues.

* Wrap in an experiment

* Enable experiment in tests

* Minor change
2019-06-30 21:08:06 -07:00
LiuJian 59ab0e8773 Fix placeholder (#1555)
* Fix placeholder

* [Unit Tests] Add Placeholder Test (#1555)
2019-06-28 10:40:45 -07:00
Huy Nguyen d4c0d74fc9 [Dev doc] Add overview and explain repository structure (#1562) 2019-06-27 14:25:27 -07:00
Michael Zuccarino 45df8d755f [dev doc] Layout Specs (#1557) 2019-06-27 11:00:27 -07:00
Michael Zuccarino d835fb3f2b [dev docs] Remove redundant page (#1563) 2019-06-27 11:00:02 -07:00
Michael Schneider d7239baaa4 Fix ASTextNode2 supportsLayerBacking (#1545)
`[NSAttributedString enumerateAttribute:inRange:options:usingBlock]` can be called multiple times with a value of nil. The current logic didn't consider this to find out if a links is present within the attributed string.
2019-06-25 15:03:12 -07:00
Huy Nguyen a11c08497b [Dev doc] Collections and asynchronous updates (#1558) 2019-06-25 12:52:41 -07:00
Huy Nguyen e274e5dac5 Remove ivar of ASCellNode.owningNode (#1559) 2019-06-25 10:58:43 -07:00
Huy Nguyen ba1e0acb1e Restore call pattern where UIView methods drive __enterHierarchy and __exitHierarchy for view-backed nodes (#1561)
After #1396, some view-backed nodes in our app stop responding to tap events. I tracked it down to [this change](https://github.com/TextureGroup/Texture/pull/1396/files#diff-7fbc7d84a259cbfbee7546a5310dddcfR162) which suggests that the order of execution matters.

This diff attempts to fix the issue by restoring the previous call order where `__enterHierarchy` and `__exitHierarchy` are driven by `_ASDisplayView`'s `-willMoveToWindow:` and `-didMoveToWindow` if the node is view-backed. Layer-backed nodes will still call `__enterHierarchy`/`__exitHierarchy` when they get `kCAOnOrderIn`/`kCAOnOrderOut`.

This maintains the layer-action support introduced in #1396.
2019-06-25 10:58:13 -07:00
Huy Nguyen 533c7eba1c [Dev docs] Node Lifecycle (#1536)
* [Dev docs] Node Lifecycle

Here is my draft on a new documentation aims at people interested in learning about technical details of the lifecycle of ASDisplayNode, as well as its interface and loading states. Hopefully it'd be useful for others who want to ramp up and hopefully start contributing to the framework.

Let me know if there are other topics I should cover, or anything I should explain more/dig deeper, or something that is wrong/no longer valid (imposter syndrome much!). Cheers!

* Update node-lifecycle.md

* Address comments
2019-06-20 13:56:10 -07:00
Garrett Moon 71d6238fed #trivial fix development sidebar in docs (#1554) 2019-06-17 11:04:01 -07:00
Greg Bolsinga c67acab290 Remove ASExperimentalTransactionOperationRetainCycle (#1547)
* Remove ASExperimentalTransactionOperationRetainCycle
2019-06-13 15:42:24 -07:00
Garrett Moon 2de8eec67e Upgrade Xcode and Cocoapods (#1552)
* Upgrade Xcode

* Update examples for new cocoapods / swift

* Fix carthage mode in build.sh
2019-06-12 18:41:54 -07:00
Garrett Moon ef06cfe843 Update how to contribute docs (#1553) 2019-06-12 16:29:32 -07:00
Huy Nguyen 9b8120656b [Dev docs] How to develop with Texture (#1538) 2019-06-11 16:59:10 -07:00
Michael Schneider 172614855a Adjust how AS_ENABLE_TEXT_NODE is used to fix Xcode cmd+click & editor support. (#1546) 2019-06-10 15:17:37 -07:00
Michael Zuccarino a6a03c638b [Dev docs] Debugging documentation (#1328)
* Starting doc skeleton and debugging UIKit crash document

* Iterate Debugging docs

* Scope to only debug, include Weaver

* Typos
2019-06-10 10:40:54 -07:00
Wu Zhong 1cb2334cf0 NetworkingImageNode: update URL if we found image in assets (#1473) 2019-06-07 16:00:25 -07:00
Adlai Holler 731db8c9ee In text measurement, don't eagerly create arrays for attachments since we don't usually have attachments. (#1535)
PRESUBMIT=passed
R=mcudich,wiseoldduck
CC=maxwang,yt-elements-eng+cl
APPROVED=mcudich
REQUIRED_REVIEW=1
DELTA=25 (11 added, 8 deleted, 6 changed)
DELTA_BY_EXTENSION=mm=17
OCL=242501658
NO_SQ=Test failures are unrelated.


P4 change: 242514626
2019-06-06 07:50:19 -07:00
Michael Schneider 19fb1240ad Fix multiple issues around accessibility handlinig (#1537)
* Improve Accessibility Implementation

- Fixes calculations for accessibilityFrame of ASAccessibilityCustomAction and ASAccessibilityElement
- Fix crash for accessibility elements within layer backed nodes
- Fix accessibility action label updating after other actions change the accessibility label of the corresponding node

* Address comments
2019-06-05 13:51:25 -07:00
Michael Schneider ab8ea069ea Add support for basic ASTextNode2 link highlighting (#1518)
* Add support for basic ASTextNode2 link highlighting

* Add approach to fix line highlighting

* Enable proper highlighting for first row

* Fix snapshot highlighting test for ASTextNode2

* Update screenshot again

* Address comments
2019-06-03 08:57:31 -07:00
Adam Bell 1b4b6a3f02 Fix Opting-Out of Linking with Photos Framework (#1519) 2019-06-03 08:56:48 -07:00
Garrett Moon a3f25d05f9 Remove the text rendering experiment. (#1531)
* Remove the text rendering experiment. It decreased rendering speeds at a negligible improvement to OOMs.

* Adopt new ASGraphicsCreateImageWithOptions API
2019-06-03 08:56:31 -07:00
Michael Schneider 62e5a8e86c Use flag for responder chain methods between view and node dispatching (#1522)
* Use flag for responder chain methods between view and node dispatching

* Use bitfields
2019-05-30 07:18:07 -07:00
Michael Schneider a2abd00276 Fixes UIKit version of ASDKGram (#1521)
* Several fixes for UIKit version of ASDKGram

* Remove PhotoCollectionViewCell
2019-05-29 10:32:21 -07:00
Michael Schneider 08d5e81e3b Remove ASExperimentalDisableAccessibilityCache (#1515)
* Remove ASExperimentalDisableAccessibilityCache

* Some more removal
2019-05-29 09:38:01 -07:00
Michael Schneider 8f69334b4c Assign accessibilityElements to _accessibilityElements (#1516) 2019-05-24 11:16:48 -07:00
Michael Schneider b621c63241 Small cleanup to remove unnecessary internal import (#1517) 2019-05-23 10:07:50 -07:00
Huy Nguyen e1859a1029 Ship ASExperimentalImageDownloaderPriority (#1480) 2019-05-21 22:23:24 -07:00
Adlai Holler 0a3a37e8ca Reclaim pending display nodes memory once the subtree is finished drawing (#1509) 2019-05-10 16:31:54 -07:00
Adlai Holler 27fe219d14 Reclaim CALayer asyncTransactions set, use NSMutableSet instead of heavy/slow NSHashTable (#1510) 2019-05-10 16:31:24 -07:00
Greg Bolsinga 7fb427e0f3 Shrink LayoutSpec classes (#1502)
- Resize enums to make `ASStackLayoutSpec` 40 bytes smaller. This applies to the subclasses too.
2019-05-09 20:19:07 -07:00
Kevin 409bc4811c Cleanup whitespace #trivial (#1507)
(It's easier to deal with these as silly oneoffs IMO than to
have them conflated with real work)
2019-05-09 16:01:52 -07:00
Greg Bolsinga e35db6bb0f Shrink ASLayout (#1503)
- Shrink the enum. Save 8 bytes. There are 1000s of these in the heap after running Pinterest for 10 minutes.
2019-05-09 07:49:07 -07:00
Adlai Holler 4cd8e82996 ASSignpost: Add support for the os_signpost API, fixes (#1501)
* ASSignpost: Add support for the os_signpost API

- Removes support for colored intervals. These weren't really useful and they aren't part of the signpost api.
- Fixes an issue with range controller interval logging.
- Adds an interval for interface orientation changes.

* Rename

* Support Xcode 9

* Commentary
sync-base-05-09-19
2019-05-08 19:59:13 -07:00
Greg Bolsinga 6e1600571c Shrink ASEditableTextNode by 16 bytes (#1500)
Just shuffle some BOOLs around and explicitly declare an ivar so it is grouped with the others.
2019-05-07 21:02:03 -07:00
Greg Bolsinga 83389d92e2 Shrink ASCellNode by 8 bytes (#1499)
Group the BOOLs together, since there are only 4 (and there are no other auto-generated ivars that are < 64 bits) this is sufficient and keeps the properties `atomic`.
2019-05-07 20:14:40 -07:00