Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci-master-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
cocoapods-lint:
env:
DEVELOPER_DIR: /Applications/Xcode_26.0.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_26.5.0.app/Contents/Developer
name: Verify that podspec lints
runs-on: macos-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pull-requests-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
buildsh:
env:
DEVELOPER_DIR: /Applications/Xcode_26.0.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_26.5.0.app/Contents/Developer
strategy:
matrix:
mode: [cocoapods-lint-default-subspecs, cocoapods-lint-other-subspecs]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
buildsh:
env:
DEVELOPER_DIR: /Applications/Xcode_26.0.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_26.5.0.app/Contents/Developer
strategy:
matrix:
mode: [tests, framework, life-without-cocoapods, carthage, examples-pt1, examples-pt2, examples-pt3, examples-pt4]
Expand Down
5 changes: 5 additions & 0 deletions Source/ASCollectionNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (nullable id<ASSectionContext>)contextForSection:(NSInteger)section AS_WARN_UNUSED_RESULT;

/**
Force a check for batch fetching. Ignores if the user is scrolling.
*/
- (void)forceCheckForBatchFetching;

@end

@interface ASCollectionNode (Deprecated)
Expand Down
5 changes: 5 additions & 0 deletions Source/ASCollectionNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,11 @@ - (nullable UICollectionViewCell *)cellForItemAtIndexPath:(NSIndexPath *)indexPa
return [self.dataController.pendingMap contextForSection:section];
}

- (void)forceCheckForBatchFetching
{
[self.view forceCheckForBatchFetching];
}

#pragma mark - Editing

- (void)registerSupplementaryNodeOfKind:(NSString *)elementKind
Expand Down
5 changes: 5 additions & 0 deletions Source/ASCollectionView.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (nullable id<ASSectionContext>)contextForSection:(NSInteger)section AS_WARN_UNUSED_RESULT NS_SWIFT_UI_ACTOR;

/**
Force a check for batch fetching. Ignores if the user is scrolling.
*/
- (void)forceCheckForBatchFetching;

@end

@interface ASCollectionView (Deprecated)
Expand Down
5 changes: 5 additions & 0 deletions Source/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1861,6 +1861,11 @@ - (void)_scheduleCheckForBatchFetchingForNumberOfChanges:(NSUInteger)changes
});
}

- (void)forceCheckForBatchFetching
{
[self _beginBatchFetchingIfNeededWithContentOffset:self.contentOffset velocity:CGPointZero];
}

- (void)_checkForBatchFetching
{
// Dragging will be handled in scrollViewWillEndDragging:withVelocity:targetContentOffset:
Expand Down
8 changes: 4 additions & 4 deletions Source/TextExperiment/Component/ASTextLayout.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1597,17 +1597,17 @@ - (ASTextPosition *)closestPositionToPoint:(CGPoint)point {

[self _insideComposedCharacterSequences:line position:position block: ^(CGFloat left, CGFloat right, NSUInteger prev, NSUInteger next) {
if (isVertical) {
position = fabs(left - point.y) < fabs(right - point.y) < (right ? prev : next);
position = fabs(left - point.y) < fabs(right - point.y) ? prev : next;
} else {
position = fabs(left - point.x) < fabs(right - point.x) < (right ? prev : next);
position = fabs(left - point.x) < fabs(right - point.x) ? prev : next;
}
}];

[self _insideEmoji:line position:position block: ^(CGFloat left, CGFloat right, NSUInteger prev, NSUInteger next) {
if (isVertical) {
position = fabs(left - point.y) < fabs(right - point.y) < (right ? prev : next);
position = fabs(left - point.y) < fabs(right - point.y) ? prev : next;
} else {
position = fabs(left - point.x) < fabs(right - point.x) < (right ? prev : next);
position = fabs(left - point.x) < fabs(right - point.x) ? prev : next;
}
}];

Expand Down
6 changes: 3 additions & 3 deletions Tests/ASDisplayNodeTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ - (void)checkValuesMatchDefaults:(ASDisplayNode *)node isLayerBacked:(BOOL)isLay
XCTAssertTrue(CGRectEqualToRect(CGRectZero, node.frame), @"default frame broken %@", hasLoadedView);
XCTAssertTrue(CGPointEqualToPoint(CGPointZero, node.position), @"default position broken %@", hasLoadedView);
XCTAssertEqual((CGFloat)0.0, node.zPosition, @"default zPosition broken %@", hasLoadedView);
XCTAssertEqual(node.isNodeLoaded && isLayerBacked ? 2.0f : 1.0f, node.contentsScale, @"default contentsScale broken %@", hasLoadedView);
XCTAssertEqual(node.isNodeLoaded && isLayerBacked ? 3.0f : 1.0f, node.contentsScale, @"default contentsScale broken %@", hasLoadedView);
XCTAssertEqual([UIScreen mainScreen].scale, node.contentsScaleForDisplay, @"default contentsScaleForDisplay broken %@", hasLoadedView);
XCTAssertTrue(CATransform3DEqualToTransform(CATransform3DIdentity, node.transform), @"default transform broken %@", hasLoadedView);
XCTAssertTrue(CATransform3DEqualToTransform(CATransform3DIdentity, node.subnodeTransform), @"default subnodeTransform broken %@", hasLoadedView);
Expand Down Expand Up @@ -2111,8 +2111,8 @@ - (void)testDebugDescription
NSString *viewDescription = [parent.view valueForKey:@"recursiveDescription"];

// Make sure string contains a, b, and c's pointer string
XCTAssertTrue(stringContainsPointer(viewDescription, a), @"Layer backed node not present");
XCTAssertTrue(stringContainsPointer(viewDescription, b), @"Layer-backed node not present");
XCTAssertTrue(stringContainsPointer(viewDescription, a.layer), @"Layer backed node not present");
XCTAssertTrue(stringContainsPointer(viewDescription, b.layer), @"Layer-backed node not present");
XCTAssertTrue(stringContainsPointer(viewDescription, c), @"View-backed node not present");

// Make sure layer names have display node in description
Expand Down
6 changes: 3 additions & 3 deletions Tests/ASStackLayoutSpecSnapshotTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1216,8 +1216,8 @@ - (void)testBaselineAlignmentWithStretchedItem
- (void)testFlexWrapWithItemSpacings
{
ASStackLayoutSpecStyle style = {
.spacing = 50,
.direction = ASStackLayoutDirectionHorizontal,
.spacing = 50,
.flexWrap = ASStackLayoutFlexWrapWrap,
.alignContent = ASStackLayoutAlignContentStart,
.lineSpacing = 5,
Expand Down Expand Up @@ -1246,8 +1246,8 @@ - (void)testFlexWrapWithItemSpacings
- (void)testFlexWrapWithItemSpacingsBeingResetOnNewLines
{
ASStackLayoutSpecStyle style = {
.spacing = 5,
.direction = ASStackLayoutDirectionHorizontal,
.spacing = 5,
.flexWrap = ASStackLayoutFlexWrapWrap,
.alignContent = ASStackLayoutAlignContentStart,
.lineSpacing = 5,
Expand Down Expand Up @@ -1327,9 +1327,9 @@ - (void)testAlignContentStretchAndOtherAlignments
{
ASStackLayoutSpecStyle style = {
.direction = ASStackLayoutDirectionHorizontal,
.alignItems = ASStackLayoutAlignItemsStart,
.flexWrap = ASStackLayoutFlexWrapWrap,
.alignContent = ASStackLayoutAlignContentStretch,
.alignItems = ASStackLayoutAlignItemsStart,
};

CGSize subnodeSize = {50, 50};
Expand Down
3 changes: 2 additions & 1 deletion Tests/ASTableViewTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ - (void)testConstrainedSizeForRowAtIndexPath
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
CGRect rect = [tableView rectForRowAtIndexPath:indexPath];
XCTAssertEqual(rect.size.width, 100); // specified width should be ignored for table
XCTAssertTrue(abs(rect.size.height - (42 + separatorHeight)) < FLT_EPSILON);
CGFloat threshold = 1e-5;
XCTAssertTrue(abs(rect.size.height - (42 + separatorHeight)) < threshold);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/ASTextKitTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ - (void)testRectsForRangeBeyondTruncationSizeReturnsNonZeroNumberOfRects
[[ASTextKitRenderer alloc]
initWithTextKitAttributes:{
.attributedString = attributedString,
.truncationAttributedString = [[NSAttributedString alloc] initWithString:@"... Continue Reading"],
.maximumNumberOfLines = 1,
.truncationAttributedString = [[NSAttributedString alloc] initWithString:@"... Continue Reading"]
}
constrainedSize:{ 100, 100 }];
XCTAssert([renderer rectsForTextRange:NSMakeRange(0, attributedString.length) measureOption:ASTextKitRendererMeasureOptionBlock].count > 0);
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading
Loading