Skip to content

Commit 2796c8e

Browse files
committed
[Accessibility] Ship ASExperimentalDoNotCacheAccessibilityElements (TextureGroup#1888)
We did not notice any effect on performance of the Pinterest app by not caching `accessibilityElements` in `_ASDisplayView`. By not caching the elements, we can be sure that the elements will be correct even when nodes change visibility state. There will be a performance impact when voice over is enabled, but providing the correct elements for the current state of a view is more important than performance in this case. TextureGroup#1853 Remove background deallocation helper code (TextureGroup#1890) * Remove background deallocation helper code Last use removed in Texture with TextureGroup#1840, now PINS no longer uses it either. Less OOMs is so nice. * remove methods from docs Call will / did display node for ASTextNode. Fixes TextureGroup#1680 (TextureGroup#1893) Do not expose tgmath.h to all clients of Texture (TextureGroup#1900) * Do not expose tgmath.h to all clients of Texture - tgmath.h #undef the `log` macro for mathematical reasons. Code that may also use a log name (such as CocoaLumberjack) will get confused by this when they try to use `NS_SWIFT_NAME` with `log` as part of the name. - `ABS` from NSObjCRuntime.h is what is typically used for abs on `CGFloat`. - Note: removing tgmath.h from the Texture umbrella header may expose clients that implicitly depended upon it being imported. Sources may have to be updated after this to `#import <tgmath.h>` explicitly. Disable text kit lock (TextureGroup#1910) * Add experiment to disable global textkit lock * Forgot the bang Add an experiment that makes ASDataController to do everything on main thread (TextureGroup#1911) * Add an experiment that makes ASDataController to do everything on main thread Under this experiment, ASDataController will allocate and layout all nodes on the main thread. This helps to avoid deadlocks that would otherwise occur if some of the node allocations or layouts caused ASDataController's background queue to block on main thread. As a bonus, this experiment also helps to measure how much performance wins we get from doing the work off main. * Remove ASSERT_ON_EDITING_QUEUE More on ASDataController's main-thread-only mode (TextureGroup#1915) Follow up on TextureGroup#1911: it's not enough to execute step 3 on the main thread because -_allocateNodesFromElements: uses ASDispatchApply to offload the work to other threads. So this diff adds a flag to tell that method to do everything serially on the calling thread. Fix failing ASConfigurationTests (TextureGroup#1923) * Fix failing ASConfigurationTests * Update configuration.json as well Fix hit point when ASCollectionNode inverted set to true (TextureGroup#1781) * Account for possible inverted transform during hit test When ASCollectionNode has the `inverted` flag set, a transform gets set on the cell node. We need to make sure that we account for that when dealing in the view coordinates. * Store self.node and self.node.view in local variables for better readability. * Add a test for hit testing in an inverted ASCollectionNode Ship ASExperimentalDispatchApply (TextureGroup#1924) Closes TextureGroup#1850. [ASTextNode2] Make some ASTextNode2 layout files public (TextureGroup#1939) * Trying to make ASTextLinePositionModifier public * d’oh * be a little more restrictive on the files we pull into the pod * Never mind, I guess we need all of these * update the project file as well * try this again * I think this will work this time. Set ASTableView isAccessibilityElement, accessibilityElementsHidden properties from its Element's node (TextureGroup#1941) Update CocoaPods to use the CDN instead of the old trunk repo. (TextureGroup#1957) Remove redundant assignment. (TextureGroup#1960) Fix mutation of variable that is never read. (TextureGroup#1961) use https for slack link (TextureGroup#1950) fix missing hidden class (TextureGroup#1952) Fix WKWebView Accessibility (TextureGroup#1955) * Return nil instead of empty array when no accessibility elements are found. Fixes TextureGroup#1954. * Use nullability annotations to fix static analyzer warnings. * Add UI test target. * Add UI test to make sure web view stays accessible. * Revert "Add UI test to make sure web view stays accessible." This reverts commit 00253f4. * Revert "Add UI test target." This reverts commit 288b5e0. * Add unit test to make sure accessibility elements are correct when a WKWebView is wrapped in an ASDisplayNode. Update asdkGram swift sample to swift version 5.3 (TextureGroup#1962) Fix order-dependent ASTextNodeTests (TextureGroup#1963) Exposes a new option in ASImageDownloaderProtocol to retry image downloads (TextureGroup#1948) * Exposes a new option in ASImageDownloaderProtocol to retry image downloads At the moment the ASBasicImageDownloader does not automatically retry image downloads if the remote host is unreachable. On the contrary the ASPINRemoteImageDownloader automatically retries. Retrying is something that ultimately clients need to be able to control, for example to fail fast to an alternative image rather than keep retrying for more than one minute while not displaying any image. This change exposes a new option in the ASImageDownloaderProtocol to retry image downloads. It also uses this new option in both ASNetworkImageNode and also ASMultiplexImageNode, setting it to YES to preserve the current behaviour. * Fixes a failing test in ASMultiplexImageNodeTests * Fixes ScreenNode.m ScreenNode.m is implementing ASImageDownloaderProtocol and needs to be fixed to reflect changes in the latter. Add experiment to ensure ASCollectionView's range controller updates on changeset updates (TextureGroup#1976) This experiment makes sure a ASCollectionView's `rangeController` updates when a changeset WITH updates is applied. Currently it is possible for nodes inserted into the preload range to not get preloaded when performing a batch update. For example, suppose a collection node has: - Tuning parameters with a preload range of 1 screenful for the given range mode. - Nodes A and B where A is visible and B is off screen. Currently if node B is deleted and a new node C is inserted in its place, node C will not get preloaded until the collection node is scrolled. This is because the preloading mechanism relies on a `setNeedsUpdate` call on the range controller as part of the `-collectionView:willDisplayCell:forItemAtIndexPath:` delegate method when the batch update is submitted. However, in the example outlined above, this sometimes doesn't happen automtically, causing the range update to be delayed until the next the view scrolls. Remove Facebook and shift everything around, add Remix by Buffer (TextureGroup#1978) Expand ASExperimentalRangeUpdateOnChangesetUpdate to ASTableView (TextureGroup#1979) A previous commit (TextureGroup@8f7444e) aimed to fix a preloading bug for ASCollectionView. This commit expands this fix to ASTableView as the bug occurs there too. Previous commit message for context: This experiment makes sure a ASCollectionView's `rangeController` updates when a changeset WITH updates is applied. Currently it is possible for nodes inserted into the preload range to not get preloaded when performing a batch update. For example, suppose a collection node has: - Tuning parameters with a preload range of 1 screenful for the given range mode. - Nodes A and B where A is visible and B is off screen. Currently if node B is deleted and a new node C is inserted in its place, node C will not get preloaded until the collection node is scrolled. This is because the preloading mechanism relies on a `setNeedsUpdate` call on the range controller as part of the `-collectionView:willDisplayCell:forItemAtIndexPath:` delegate method when the batch update is submitted. However, in the example outlined above, this sometimes doesn't happen automtically, causing the range update to be delayed until the next the view scrolls. Remove trailing semicolons between method parameters and body (TextureGroup#1973) Having a semi-colon between a method parameters list and a method body is not not correct and is usually caused by a copy and paste error while creating the method definition from its declaration. Fixes the following compilation warnings when building with -Wsemicolon-before-method-body (which is part of -Wextra): ASPINRemoteImageDownloader.mm:230:85: error: semicolon before method body is ignored [-Werror,-Wsemicolon-before-method-body] - (id <ASImageContainerProtocol>)synchronouslyFetchedCachedImageWithURL:(NSURL *)URL; ^ ASPINRemoteImageDownloader.mm:275:76: error: semicolon before method body is ignored [-Werror,-Wsemicolon-before-method-body] completion:(ASImageDownloaderCompletion)completion; ^ 2 errors generated. Fixes applied to both code, examples and samples in documentation. [Layout] Add RTL support to LayoutSpecs (TextureGroup#1983) * [Layout] Add RTL support to LayoutSpecs This is largely a slight update for TextureGroup#1805. If RTL is enabled, `calculateLayoutLayoutSpec:` will flip the origin of all sublayouts. The new part of the diff is that ASBatchFetching now supports proper fetching on RTL horizontal scrollViews. * Fix build and add RTL batch fetching tests [RTL/Batching] Make ASDisplayShouldFetchBatchForScrollView aware of flipped CV layouts (TextureGroup#1985) * [RTL/Batching] Make ASDisplayShouldFetchBatchForScrollView aware of flipped CV layouts UICollectionViewLayout has a property called `flipsHorizontallyInOppositeLayoutDirection`. If this is set to `YES` then a RTL collectionView’s contentOffset behaves like it does in LTR. In other words, the first item is at contentOffset 0. In this case, the existing logic for `ASDisplayShouldFetchBatchForScrollView` works in RTL. If you don’t override `flipsHorizontallyInOppositeLayoutDirection` to be `YES`, then it means that in RTL languages the first item in your collectionView will actually be at x offset `collectionView.contentSize.width - collectionView.frame.size.width`. As you scroll to the right, the content offset will decrease until you reach the end of the data at a content offset of 0,0. In this case, `ASDisplayShouldFetchBatchForScrollView` needs to know that you are in RTL and the layout is not flipped. It can then use the contentOffset as the `remainingDistance` to determine when to fetch. * fix indentation * assert that we are on main when accessing CV layout [RTL] Guard access of flipsHorizontallyInOppositeLayoutDirection for iOS >= 11 (TextureGroup#2003) `flipsHorizontallyInOppositeLayoutDirection` is available in iOS11 and greater. Texture still supports iOS9 so we need to make sure not to call this it in those cases. Rename ASNavigationController to ASDKNavigationController to fix name collision (TextureGroup#2020) As of iOS15 the AuthenticationServices framework has a class named `ASNavigationController`. We need to rename our `ASNavigationController` to protect against undefined behavior. Note: This change was based on this PR TextureGroup#2014. We were slow in merging it and the author has not replied, so I'm making a new one to get this landed. [3.1.0] Create new version of ASDK (TextureGroup#2021) With the breaking change of renaming ASNavigationController to ASDKNavigationController, we have released a new version of Texture. Please see `ThreeMigrationGuide.md` for how to handle the breaking changes in 3.1.0. [3.1.0] Update CHANGELOG [3.1.0] Update .github_changelog_generator Update RELEASE.md Remove AssetsLibrary dependency for tvOS (TextureGroup#2034) - The framework isn't available on tvOS. This causes CocoaPods linting to fail which prevented me from pushing the new release out. - One way to fix this is to have a different `default_subspecs` for tvOS that doesn't have AssetsLibrary subspec, but per-platform `default_subspecs` doesn't seem to be supported by CocoaPods. So I updated the subspec itself to only depend on the framework for iOS. This means the subspec is empty/useless for tvOS (and other platforms FWIW). - Tested with `pod spec lint Texture.podspec`. - Fixes TextureGroup#1992 and part of TextureGroup#1549. Also unblocks 3.1.0 release. - For the long term, we can remove the subspec entirely when iOS 9 is deprecated (TextureGroup#1828).
1 parent afd8037 commit 2796c8e

118 files changed

Lines changed: 1159 additions & 507 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github_changelog_generator

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
issues=false
2-
since-tag=3.0.0-rc.2
3-
future-release=3.0.0
2+
since-tag=3.1.0
3+
future-release=3.2.0

AsyncDisplayKit.xcodeproj/project.pbxproj

Lines changed: 111 additions & 107 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# Changelog
22

3+
## [3.1.0](https://github.com/TextureGroup/Texture/tree/3.1.0) (2021-09-09)
4+
5+
[Full Changelog](https://github.com/TextureGroup/Texture/compare/3.0.0...3.1.0)
6+
7+
**Fixed bugs:**
8+
9+
- Fix hit point when ASCollectionNode inverted set to true [\#1781](https://github.com/TextureGroup/Texture/pull/1781) ([bdolman](https://github.com/bdolman))
10+
11+
**Merged pull requests:**
12+
13+
- \[Minor Breaking API\] Rename ASNavigationController to ASDKNavigationController to fix name collision [\#2020](https://github.com/TextureGroup/Texture/pull/2020) ([rcancro](https://github.com/rcancro))
14+
- \[RTL\] Guard access of flipsHorizontallyInOppositeLayoutDirection for iOS \>= 11 [\#2003](https://github.com/TextureGroup/Texture/pull/2003) ([rcancro](https://github.com/rcancro))
15+
- \[RTL/Batching\] Make ASDisplayShouldFetchBatchForScrollView aware of flipped CV layouts [\#1985](https://github.com/TextureGroup/Texture/pull/1985) ([rcancro](https://github.com/rcancro))
16+
- \[Layout\] Add RTL support to LayoutSpecs [\#1983](https://github.com/TextureGroup/Texture/pull/1983) ([rcancro](https://github.com/rcancro))
17+
- Expand ASExperimentalRangeUpdateOnChangesetUpdate to ASTableView [\#1979](https://github.com/TextureGroup/Texture/pull/1979) ([rqueue](https://github.com/rqueue))
18+
- Docs: Remove Facebook and shift everything around, add Remix by Buffer [\#1978](https://github.com/TextureGroup/Texture/pull/1978) ([ay8s](https://github.com/ay8s))
19+
- Add experiment to ensure ASCollectionView's range controller updates … [\#1976](https://github.com/TextureGroup/Texture/pull/1976) ([rqueue](https://github.com/rqueue))
20+
- Remove trailing semicolons between method parameters and body [\#1973](https://github.com/TextureGroup/Texture/pull/1973) ([sdefresne](https://github.com/sdefresne))
21+
- Fix order-dependent ASTextNodeTests [\#1963](https://github.com/TextureGroup/Texture/pull/1963) ([tjaneczko](https://github.com/tjaneczko))
22+
- Update asdkGram swift sample to swift version 5.3 [\#1962](https://github.com/TextureGroup/Texture/pull/1962) ([MussaCharles](https://github.com/MussaCharles))
23+
- Fix mutation of variable that is never read [\#1961](https://github.com/TextureGroup/Texture/pull/1961) ([ZevEisenberg](https://github.com/ZevEisenberg))
24+
- Remove redundant assignment [\#1960](https://github.com/TextureGroup/Texture/pull/1960) ([ZevEisenberg](https://github.com/ZevEisenberg))
25+
- Podfile improvements [\#1957](https://github.com/TextureGroup/Texture/pull/1957) ([ZevEisenberg](https://github.com/ZevEisenberg))
26+
- Fix WKWebView Accessibility [\#1955](https://github.com/TextureGroup/Texture/pull/1955) ([ZevEisenberg](https://github.com/ZevEisenberg))
27+
- fix missing hidden class [\#1952](https://github.com/TextureGroup/Texture/pull/1952) ([joprice](https://github.com/joprice))
28+
- use https for slack link [\#1950](https://github.com/TextureGroup/Texture/pull/1950) ([joprice](https://github.com/joprice))
29+
- Exposes a new option in ASImageDownloaderProtocol to retry image downloads [\#1948](https://github.com/TextureGroup/Texture/pull/1948) ([chggr](https://github.com/chggr))
30+
- All ASCellNode nodes to be non accessible if needed [\#1941](https://github.com/TextureGroup/Texture/pull/1941) ([decim92](https://github.com/decim92))
31+
- \[ASTextNode2\] Make some ASTextNode2 layout files public [\#1939](https://github.com/TextureGroup/Texture/pull/1939) ([rcancro](https://github.com/rcancro))
32+
- Ship ASExperimentalDispatchApply [\#1924](https://github.com/TextureGroup/Texture/pull/1924) ([nguyenhuy](https://github.com/nguyenhuy))
33+
- Fix failing ASConfigurationTests [\#1923](https://github.com/TextureGroup/Texture/pull/1923) ([nguyenhuy](https://github.com/nguyenhuy))
34+
- More on ASDataController's main-thread-only mode [\#1915](https://github.com/TextureGroup/Texture/pull/1915) ([nguyenhuy](https://github.com/nguyenhuy))
35+
- Add an experiment that makes ASDataController to do everything on main thread [\#1911](https://github.com/TextureGroup/Texture/pull/1911) ([nguyenhuy](https://github.com/nguyenhuy))
36+
- Disable text kit lock [\#1910](https://github.com/TextureGroup/Texture/pull/1910) ([garrettmoon](https://github.com/garrettmoon))
37+
- Do not expose tgmath.h to all clients of Texture [\#1900](https://github.com/TextureGroup/Texture/pull/1900) ([bolsinga](https://github.com/bolsinga))
38+
- Call will / did display node for ASTextNode. Fixes \#1680 [\#1893](https://github.com/TextureGroup/Texture/pull/1893) ([garrettmoon](https://github.com/garrettmoon))
39+
- Remove background deallocation helper code [\#1890](https://github.com/TextureGroup/Texture/pull/1890) ([bolsinga](https://github.com/bolsinga))
40+
- \[Accessibility\] Ship ASExperimentalDoNotCacheAccessibilityElements [\#1888](https://github.com/TextureGroup/Texture/pull/1888) ([rcancro](https://github.com/rcancro))
41+
342
## [3.0.0](https://github.com/TextureGroup/Texture/tree/3.0.0) (2020-07-15)
443

544
[Full Changelog](https://github.com/TextureGroup/Texture/compare/3.0.0-rc.2...3.0.0)

Podfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
source 'https://github.com/CocoaPods/Specs.git'
2-
31
platform :ios, '9.0'
42

53
target :'AsyncDisplayKitTests' do

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ DEPENDENCIES:
77
- OCMock (~> 3.6)
88

99
SPEC REPOS:
10-
https://github.com/CocoaPods/Specs.git:
10+
trunk:
1111
- iOSSnapshotTestCase
1212
- OCMock
1313

1414
SPEC CHECKSUMS:
1515
iOSSnapshotTestCase: 9ab44cb5aa62b84d31847f40680112e15ec579a6
1616
OCMock: 29f6e52085b4e7d9b075cbf03ed7c3112f82f934
1717

18-
PODFILE CHECKSUM: ff1a1777e31f49e6e4b7b148d0f10e504db7fa26
18+
PODFILE CHECKSUM: 1b4ea0e8ab7d94a46b1964a2354686c2e599c8c2
1919

2020
COCOAPODS: 1.10.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ As the framework has grown, many features have been added that can save develope
3636

3737
## Getting Help
3838

39-
We use Slack for real-time debugging, community updates, and general talk about Texture. [Signup](http://asdk-slack-auto-invite.herokuapp.com) yourself or email textureframework@gmail.com to get an invite.
39+
We use Slack for real-time debugging, community updates, and general talk about Texture. [Signup](https://asdk-slack-auto-invite.herokuapp.com) yourself or email textureframework@gmail.com to get an invite.
4040

4141
## Release process
4242

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This document describes the process for a public Texture release.
88
### Process
99
- Run `github_changelog_generator` in Texture project directory: `github_changelog_generator --token <generated personal token> --user TextureGroup --project Texture`. To avoid hitting rate limit, the generator will replace the entire file with just the changes from this version – revert that giant deletion to get the entire new changelog.
1010
- Update `spec.version` within `Texture.podspec` and the `since-tag` and `future-release` fields in `.github_changelog_generator`.
11-
- Create a new PR with the updated `Texture.podspec` and the newly generated changelog.
11+
- Create a new PR with the updated `Texture.podspec` and `.github_changelog_generator`, and the newly generated changelog.
1212
- After merging in the PR, [create a new GitHub release](https://github.com/TextureGroup/Texture/releases/new). Use the generated changelog for the new release.
1313
- Push to Cocoapods with `pod trunk push`
1414

Schemas/configuration.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"items": {
1414
"type": "string",
1515
"enum": [
16-
"exp_graphics_contexts",
1716
"exp_text_node",
1817
"exp_interface_state_coalesce",
1918
"exp_infer_layer_defaults",
@@ -22,8 +21,10 @@
2221
"exp_skip_clear_data",
2322
"exp_did_enter_preload_skip_asm_layout",
2423
"exp_dispatch_apply",
25-
"exp_oom_bg_dealloc_disable",
26-
"exp_do_not_cache_accessibility_elements",
24+
"exp_drawing_global",
25+
"exp_optimize_data_controller_pipeline",
26+
"exp_disable_global_textkit_lock",
27+
"exp_main_thread_only_data_controller",
2728
]
2829
}
2930
}

Source/ASCellNode.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ - (void)setHighlighted:(BOOL)highlighted
159159
}
160160
}
161161

162-
- (void)__setSelectedFromUIKit:(BOOL)selected;
162+
- (void)__setSelectedFromUIKit:(BOOL)selected
163163
{
164164
// Note: Race condition could mean redundant sets. Risk is low.
165165
if (ASLockedSelf(_selected != selected)) {
@@ -169,7 +169,7 @@ - (void)__setSelectedFromUIKit:(BOOL)selected;
169169
}
170170
}
171171

172-
- (void)__setHighlightedFromUIKit:(BOOL)highlighted;
172+
- (void)__setHighlightedFromUIKit:(BOOL)highlighted
173173
{
174174
// Note: Race condition could mean redundant sets. Risk is low.
175175
if (ASLockedSelf(_highlighted != highlighted)) {

Source/ASCollectionNode.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ - (void)moveItemAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)
11681168

11691169
#pragma mark - ASRangeControllerUpdateRangeProtocol
11701170

1171-
- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode;
1171+
- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode
11721172
{
11731173
if ([self pendingState]) {
11741174
_pendingState.rangeMode = rangeMode;

0 commit comments

Comments
 (0)