Fix: Transfer leadingScreensForBatching from pending state on node load#2130
Merged
rcancro merged 5 commits intoTextureGroup:masterfrom Nov 19, 2025
Merged
Conversation
|
Gianmarco seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
e7aab67 to
1d63a8c
Compare
GianmarcoFolchi
commented
Nov 18, 2025
rcancro
reviewed
Nov 18, 2025
rcancro
approved these changes
Nov 19, 2025
3a4oT
pushed a commit
to 3a4oT/Texture
that referenced
this pull request
Mar 29, 2026
…ad (TextureGroup#2130) * Fix: Transfer leadingScreensForBatching from pending state on node load and add tests * Address PR comments * try to fix build * Adding whitespace to see if builds run * Revert prev commit to check if builds are working --------- Co-authored-by: Gianmarco <gfolchi@pinterest.com>
3a4oT
added a commit
to 3a4oT/Texture
that referenced
this pull request
Apr 1, 2026
…#7) * Fix: Transfer leadingScreensForBatching from pending state on node load (TextureGroup#2130) * Fix: Transfer leadingScreensForBatching from pending state on node load and add tests * Address PR comments * try to fix build * Adding whitespace to see if builds run * Revert prev commit to check if builds are working --------- Co-authored-by: Gianmarco <gfolchi@pinterest.com> * Update CI workflow for Xcode 26 and actions checkout version - Updated DEVELOPER_DIR to Xcode_26.0.1 in all CI workflows - Updated build.sh SDK from iphonesimulator17.4 to iphonesimulator26.0 - Updated simulator device from iPhone SE (3rd generation) to iPhone 17 - Updated actions/checkout from v2 to v4 - Changed runs-on from macos-latest to macos-15 for explicit versioning - Verified all build configurations (framework, carthage, tests, examples) * Add Swift Package Manager support with IGListKit integration Add comprehensive SPM support using Swift 6.2 package traits for modular features. Core features: - Package.swift with AsyncDisplayKit and TextureIGListKitExtensions products - Default traits (Video, MapKit, Photos, AssetsLibrary) match CocoaPods defaults - Optional IGListKit trait with pure Swift implementation - TextNode2 (modern TextNode) enabled by default - PINRemoteImage always included IGListKit integration: - Pure Swift implementation (traits don't work with Objective-C #if directives) - ListAdapter.setCollectionNode(_:) replaces Objective-C setASDKCollectionNode: - Uses IGListKit 5.0+ (breaking changes from 4.x in CocoaPods/Carthage) - Runtime protocol conformance for ASCollectionDataSourceInterop Infrastructure: - SPM source layout generation script (scripts/generate_spm_sources_layout.swift) - Symlinks from Source/ to spm/Sources/AsyncDisplayKit/ - Build script modes: spm-texture-basic and spm-texture-iglistkit - CI jobs for both configurations with layout validation Testing: - SPMBasic example: 15 tests for core AsyncDisplayKit + PINRemoteImage - SPMWithIGListKit example: 4 tests for IGListKit integration - All tests passing Documentation: - README with usage examples and CocoaPods migration table - CONTRIBUTING with SPM layout regeneration instructions - Comprehensive TextureIGListKitExtensions guide Reference implementations: Source/IGListAdapter+AsyncDisplayKit.mm, Source/Private/ASIGListAdapterBasedDataSource.mm * Add iOS app integration example and improve SPM documentation - Add ASIGListKitSPM example demonstrating local package wrapper approach for iOS apps - Update TextureIGListKitExtensions README with iOS/tvOS app integration guide - Add spm-app-iglistkit build mode to test iOS app integration - Improve SPM test strategy: spm-texture-basic tests committed files, spm-texture-iglistkit tests generation script - Update example READMEs with clear documentation structure * Update Swift tools version to 6.1 and add SPM badge - Change swift-tools-version from 6.2 to 6.1 in all Package.swift files - Package Traits feature was introduced in Swift 6.1 (SE-0450) - Update documentation to reflect Swift 6.1+ requirement - Add Swift Package Manager badge to README * Remove deprecated AssetsLibrary and non-functional Video/MapKit/Photos SPM traits - Remove AssetsLibrary (deprecated iOS 9.0) - Remove Video/MapKit/Photos traits that don't work with Swift via SPM - Update documentation explaining SPM limitations with conditional compilation - Recommend CocoaPods/Carthage for users needing these features Technical details: Objective-C classes wrapped in preprocessor conditionals (#if AS_USE_VIDEO) are not exported in Swift module interface, making these traits non-functional for Swift users even when enabled. Tests: spm-texture-basic and spm-texture-iglistkit pass * Add Swift wrapper for IGListKit supplementary views - Add SupplementaryViewSourceMethods enum with viewForSupplementaryElement and sizeForSupplementaryView - Replaces unavailable ASIGListSupplementaryViewSourceMethods for SPM users - Comprehensive documentation with step-by-step examples - Migration guide from Objective-C implementation Fixes issue where ASIGListSupplementaryViewSourceMethods is inaccessible from Swift when using SPM with traits due to #if AS_IG_LIST_KIT wrapping. * Update SPM sources layout script and add symlinks for ASDefaultImageDownloader * Refactor SPM integration and remove UICoreKit example - Updated Package.swift to enhance SPM source distribution for Texture, including detailed documentation on IGListKit integration and limitations. - Removed deprecated UICoreKit example, including its Package.swift, source files, and tests, to streamline the project. - Added module.modulemap for AsyncDisplayKit to eliminate umbrella header warnings. - Adjusted build settings in project.pbxproj to reflect the removal of UICoreKit and ensure proper integration of TextureIGListKitExtensions. * - Improved structure and clarity of the README to facilitate better understanding for developers integrating with iOS/tvOS projects. * Update CI workflow and project configuration for AsyncDisplayKit integration - Removed the custom module.modulemap for AsyncDisplayKit to prevent issues with C++ headers, allowing SPM to generate its own automatically. * [Xcode 26] Fix chained comparison errors in ASTextLayout.mm Replace 'a < b < c' with correct ternary 'a < b ? prev : next' in -insideComposedCharacterSequences and -insideEmoji blocks. Clang in Xcode 26 now treats chained comparisons as a hard error (-Wparentheses). * Update CI workflow and build.sh to Xcode 26.4 - Updated DEVELOPER_DIR to Xcode_26.4 in all CI workflows - Updated runs-on from macos-15 to macos-26 - Updated build.sh SDK from iphonesimulator26.0 to iphonesimulator26.4 - Updated simulator OS from 26.0 to 26.4 * Add SectionControllerMethods to TextureIGListKitExtensions Swift equivalent of ASIGListSectionControllerMethods for SPM builds: - cellForItem(at:sectionController:) dequeues _ASCollectionViewCell via context - sizeForItem(at:) returns .zero (AsyncDisplayKit handles sizing) * Fix CI: use iOS 26.2 simulator and Xcode 26.3 (26.4 runtime not installed on runner) * Fix CI: use iPhone 17 with iOS 26.2 simulator (iPhone 16 not available on runner) * Fix SPMWithIGListKit: remove IGListKit trait (now always included in Texture) --------- Co-authored-by: Gianmarco <53410676+GianmarcoFolchi@users.noreply.github.com> Co-authored-by: Gianmarco <gfolchi@pinterest.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When
leadingScreensForBatchingis set onASCollectionNodeorASTableNodebefore the node loads, the value is not properly transferred to the underlying view. This causes the property to retain the default value of2.0instead of the configured value.Root Cause
It looks like
leadingScreensForBatchingwas accidentally omitted when transferring the pendingState to the view in thedidLoadfunction.Examples
Broken Example
Result: leadingScreensForBatching stays at 2.0
Working Example
Result: leadingScreensForBatching is correctly set to 2.4 since the view had already been loaded.
leadingScreensForBatchingsetter: leadingScreensForBatching goes to pendingState if it exists else it goes to the underlying view. The pendingState value wasn't being transferred to the underlying view on view creation.