Skip to content

Commit 46cff31

Browse files
author
Kyle Van Essen
committed
Merge remote-tracking branch 'origin/main' into kve/display-hooks-for-headerfooters
* origin/main: build: set up tuist (#584) Bumping versions to 16.3.0 (#589) Reset scroll position if list identifier changes (#588) Bumping versions to 16.2.0 (#587) Adding a completion handler to the `scrollToSection` API. (#585) Adding a programmatic scroll completion handler (#582) Remove iOS 19 (26) cap of the collection view first responder workaround (#581) Bumping versions to 16.1.0 (#583) Update for Blueprint 6.0.0 (#580) Bumping versions to 16.0.4. (#579) Update the first responder resignation workaround to be enabled by default and cap at < iOS 19 [UI-8849] (#578) Bumping versions to 16.0.3 (#577) Bottom gravity and autoscroll improvements (#576) Bumping versions to 16.0.2 (#574) Addressing an AutoScrollAction issue when using VerticalLayoutGravity.bottom (#572) release: Prepare 16.0.1 release (#569) Fix reordering crash introduced in 16.0 (#568)
2 parents df8595c + 13a2095 commit 46cff31

563 files changed

Lines changed: 8045 additions & 3472 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/workflows/env.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
xcode_version=16.2
2+
TUIST_TEST_DEVICE=iPhone SE (3rd generation)
3+
TUIST_TEST_PLATFORM=iOS

.github/workflows/run_tests.yml

Lines changed: 28 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,102 +5,70 @@
55
name: Tests
66

77
on:
8+
push:
9+
branches:
10+
- main
811
pull_request:
912

1013
jobs:
1114
spm:
12-
name: Swift Package Manager
13-
14-
runs-on: macos-15-xlarge
15-
16-
steps:
17-
18-
- name: Checkout repository
19-
uses: actions/checkout@v1
20-
21-
- name: Read env
22-
run: cat .github/workflows/env.properties >> $GITHUB_ENV
23-
24-
- name: Switch to Xcode ${{ env.xcode_version }}
25-
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app
26-
27-
- name: Setup Ruby
28-
uses: ruby/setup-ruby@v1
29-
with:
30-
# Uses version specified in .ruby_version
31-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
32-
33-
- name: Install xcodes
34-
run: brew install aria2 xcodesorg/made/xcodes
35-
36-
- name: Install iOS 17.2
37-
run: sudo xcodes runtimes install "iOS 17.2"
38-
39-
# Build
40-
41-
- name: Build
42-
run: xcodebuild -scheme "Listable-Package" -destination "platform=iOS Simulator,OS=17.2,name=iPhone SE (3rd generation)" -sdk iphonesimulator build
43-
44-
test:
45-
name: "iOS ${{ matrix.sdk }}"
15+
name: "Build & Test All - iOS ${{ matrix.sdk }}"
4616

4717
runs-on: macos-15-xlarge
4818

4919
strategy:
20+
fail-fast: false # Don’t fail-fast so that we get all snapshot test changes
5021
matrix:
5122
include:
5223
- sdk: "15.4"
53-
simulator_name: iPhone SE (3rd generation)
24+
simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-15-4"
5425
installation_required: true
5526

5627
- sdk: "16.2"
57-
simulator_name: iPhone SE (3rd generation)
28+
simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-16-2"
5829
installation_required: true
5930

6031
- sdk: "17.2"
61-
simulator_name: iPhone SE (3rd generation)
32+
simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-17-2"
6233
installation_required: true
6334

6435
steps:
6536

6637
- name: Checkout repository
67-
uses: actions/checkout@v1
38+
uses: actions/checkout@v4
39+
40+
- name: Set up Mise
41+
uses: jdx/mise-action@v2
6842

6943
- name: Read env
7044
run: cat .github/workflows/env.properties >> $GITHUB_ENV
7145

7246
- name: Switch to Xcode ${{ env.xcode_version }}
7347
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app
7448

75-
- name: Setup Ruby
76-
uses: ruby/setup-ruby@v1
77-
with:
78-
# Uses version specified in .ruby_version
79-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
80-
8149
- name: Install xcodes
82-
if: ${{ matrix.installation_required }}
8350
run: brew install aria2 xcodesorg/made/xcodes
8451

8552
- name: Install iOS ${{ matrix.sdk }}
8653
if: ${{ matrix.installation_required }}
8754
run: sudo xcodes runtimes install "iOS ${{ matrix.sdk }}"
8855

89-
# Build Caching
90-
91-
- name: Cache Cocoapods
92-
uses: actions/cache@v4
93-
with:
94-
path: Pods
95-
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
96-
restore-keys: |
97-
${{ runner.os }}-pods-
56+
- name: Build
57+
run: |
58+
xcodebuild \
59+
-scheme "Listable-Package" \
60+
-destination "platform=${{ env.TUIST_TEST_PLATFORM }} Simulator,OS=${{ matrix.sdk }},name=${{ env.TUIST_TEST_DEVICE }}" \
61+
-sdk iphonesimulator build
9862
99-
# Install & Build
63+
- name: Install Tuist dependencies for Development
64+
run: tuist install --path Development/
10065

101-
- name: Pod Install
102-
run: bundle exec pod install --repo-update
66+
- name: Test All
67+
run: tuist test ListableDevelopment-Workspace --path Development/ --os ${{ matrix.sdk }} --result-bundle-path TestResult.xcresult
10368

104-
- name: Build & Test
105-
run: |
106-
xcodebuild -workspace Demo/Demo.xcworkspace -scheme "Demo" -destination "platform=iOS Simulator,OS=${{ matrix.sdk }},name=${{ matrix.simulator_name }}" build test
69+
- name: Upload TestResult
70+
uses: actions/upload-artifact@v4
71+
if: ${{ failure() }}
72+
with:
73+
name: TestResult.xcresult
74+
path: TestResult.xcresult

.gitignore

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ playground.xcworkspace
4040
# Package.resolved
4141
.build/
4242

43-
# CocoaPods
44-
#
45-
# We recommend against adding the Pods directory to your .gitignore. However
46-
# you should judge for yourself, the pros and cons are mentioned at:
47-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
48-
#
49-
Demo/Demo.xcworkspace
50-
Pods/
51-
gen/
52-
5343
# Carthage
5444
#
5545
# Add this line if you want to avoid checking in source code from Carthage dependencies.
@@ -68,3 +58,14 @@ fastlane/report.xml
6858
fastlane/Preview.html
6959
fastlane/screenshots/**/*.png
7060
fastlane/test_output
61+
62+
# Tuist
63+
/Derived
64+
/*.xcodeproj
65+
/*.xcworkspace
66+
/Development/Derived
67+
/Development/*.xcodeproj
68+
/Development/*.xcworkspace
69+
70+
# Test results
71+
/*.xcresult

.mise.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[tools]
2+
tuist = "4.23.0"
3+
swiftformat = "0.50.8"
4+
5+
[settings]
6+
# do not try to read versions from .nvmrc, .ruby-version, etc.
7+
legacy_version_file = false

BlueprintUILists.podspec

Lines changed: 0 additions & 42 deletions
This file was deleted.

BlueprintUILists/Resources/.gitkeep

Whitespace-only changes.

BlueprintUILists/Sources/List.swift

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -190,28 +190,8 @@ extension List {
190190
case .fillParent:
191191
if let max = constraint.width.constrainedValue {
192192
return max
193-
} else if case .caffeinated = layoutMode {
194-
return .infinity
195193
} else {
196-
fatalError(
197-
"""
198-
`List` is being used with the `.fillParent` measurement option, which takes \
199-
up the full width it is afforded by its parent element. However, \
200-
the parent element provided the `List` an unconstrained width, which is meaningless.
201-
202-
How do you fix this?
203-
--------------------
204-
1) This usually means that your `List` itself has been \
205-
placed in a `ScrollView` or other element which intentionally provides an \
206-
unconstrained measurement to its content. If your `List` is in a `ScrollView`, \
207-
remove the outer scroll view – `List` manages its own scrolling. Two `ScrollViews` \
208-
that are nested within each other is generally meaningless unless they scroll \
209-
in different directions (eg, horizontal vs vertical).
210-
211-
2) If your `List` is not in a `ScrollView`, ensure that the element
212-
measuring it is providing a constrained `SizeConstraint`.
213-
"""
214-
)
194+
return .infinity
215195
}
216196
case .natural:
217197
return size.naturalWidth ?? size.contentSize.width
@@ -223,31 +203,11 @@ extension List {
223203
case .fillParent:
224204
if let max = constraint.height.constrainedValue {
225205
return max
226-
} else if case .caffeinated = layoutMode {
227-
return .infinity
228206
} else {
229-
fatalError(
230-
"""
231-
`List` is being used with the `.fillParent` measurement option, which takes \
232-
up the full height it is afforded by its parent element. However, \
233-
the parent element provided the `List` an unconstrained height, which is meaningless.
234-
235-
How do you fix this?
236-
--------------------
237-
1) This usually means that your `List` itself has been \
238-
placed in a `ScrollView` or other element which intentionally provides an \
239-
unconstrained measurement to its content. If your `List` is in a `ScrollView`, \
240-
remove the outer scroll view – `List` manages its own scrolling. Two `ScrollViews` \
241-
that are nested within each other is generally meaningless unless they scroll \
242-
in different directions (eg, horizontal vs vertical).
243-
244-
2) If your `List` is not in a `ScrollView`, ensure that the element
245-
measuring it is providing a constrained `SizeConstraint`.
246-
"""
247-
)
207+
return .infinity
248208
}
249209
case .natural:
250-
if case .caffeinated = layoutMode, let maxHeight = constraint.height.constrainedValue {
210+
if let maxHeight = constraint.height.constrainedValue {
251211
return min(size.contentSize.height, maxHeight)
252212
}
253213
return size.contentSize.height

CHANGELOG.md

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,67 @@
1414

1515
### Internal
1616

17+
- CocoaPods has been removed and local development environment is now driven by Tuist.
18+
1719
# Past Releases
1820

21+
# [16.3.0] - 2025-07-17
22+
23+
### Changed
24+
25+
- Changing a List's `identifier` now automatically resets the scroll position.
26+
27+
# [16.2.0] - 2025-07-02
28+
29+
### Added
30+
31+
- Added a completion handler to ListView's `scrollTo(item:position:animated:completion:)` and `scrollToSection(with:sectionPosition:scrollPosition:animated:completion:)` APIs.
32+
33+
### Misc
34+
35+
- The `IOS16_4_First_Responder_Bug_CollectionView` workaround is no longer capped to iOS versions less than 19.0. It was verified as required in the iOS 19 beta.
36+
37+
### Internal
38+
39+
- Added the `ScrollCompletionHandlerViewController` demo to showcase the new completion handlers with different layout configurations.
40+
41+
# [16.1.0] - 2025-06-17
42+
43+
### Changed
44+
45+
- Blueprint dependency updated to 6.0.
46+
47+
# [16.0.4] - 2025-06-06
48+
49+
### Misc
50+
51+
- The `IOS16_4_First_Responder_Bug_CollectionView` workaround has been capped to OS versions _less_ than iOS 19.0 until the fix has been verified as required and functioning.
52+
- The interpretation of the `Listable.EnableIOS164FirstResponderWorkaround` user defaults flag now defaults to `true` if no value has been set.
53+
54+
# [16.0.3] - 2025-05-20
55+
56+
### Internal
57+
58+
- Improving how `AutoScrollAction` and `VerticalLayoutGravity.bottom` work together by temporarily ignoring the bottom gravity logic while autoscrolling.
59+
60+
# [16.0.2] - 2025-05-09
61+
62+
### Fixed
63+
64+
- Fixed an issue with `AutoScrollAction.OnInsertedItem` and `AutoScrollAction.Pin` that caused the scrolled offset to be reset to the bottom when using `VerticalLayoutGravity.bottom`.
65+
- Fixed issue with the `didPerform` closures of `AutoScrollAction.OnInsertedItem` and `AutoScrollAction.Pin`, where the visible items were stale after adjusting the offset with no animation.
66+
67+
### Internal
68+
69+
- Adding new demos to showcase mixing `AutoScrollAction.OnInsertedItem` and `AutoScrollAction.Pin` with `VerticalLayoutGravity.bottom`.
70+
- Adding a new `AutoScrollAction.Behavior` protocol.
71+
72+
# [16.0.1] - 2025-04-16
73+
74+
### Fixed
75+
76+
- Fixed a crash that would occur when a user would reorder / move items between sections.
77+
1978
# [16.0.0] - 2025-04-04
2079

2180
### Added
@@ -1141,7 +1200,14 @@ listActions.scrolling.scrollToSection(
11411200
Earlier releases were ad-hoc and not tracked. To see all changes, please reference [closed PRs on Github](https://github.com/kyleve/Listable/pulls?q=is%3Apr+is%3Aclosed).
11421201

11431202

1144-
[Main]: https://github.com/square/Listable/compare/16.0.0...main
1203+
[Main]: https://github.com/square/Listable/compare/16.3.0...main
1204+
[16.3.0]: https://github.com/square/Listable/compare/16.3.0...16.2.0
1205+
[16.2.0]: https://github.com/square/Listable/compare/16.2.0...16.1.0
1206+
[16.1.0]: https://github.com/square/Listable/compare/16.1.0...16.0.4
1207+
[16.0.4]: https://github.com/square/Listable/compare/16.0.4...16.0.3
1208+
[16.0.3]: https://github.com/square/Listable/compare/16.0.3...16.0.2
1209+
[16.0.2]: https://github.com/square/Listable/compare/16.0.2...16.0.1
1210+
[16.0.1]: https://github.com/square/Listable/compare/16.0.1...16.0.0
11451211
[16.0.0]: https://github.com/square/Listable/compare/16.0.0...15.0.2
11461212
[15.0.2]: https://github.com/square/Listable/compare/15.0.2...15.0.1
11471213
[15.0.1]: https://github.com/square/Listable/compare/15.0.1...15.0.0

0 commit comments

Comments
 (0)