Skip to content

Commit 3dec256

Browse files
authored
Update for Blueprint 6.0.0 (#580)
- Removed obsolete layout mode switching - Updated the dependency to 6.0
1 parent 305cf93 commit 3dec256

File tree

4 files changed

+8
-46
lines changed

4 files changed

+8
-46
lines changed

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Changed
1010

11+
- Blueprint dependency updated to 6.0.
12+
1113
### Misc
1214

1315
### Internal

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
),
2121
],
2222
dependencies: [
23-
.package(url: "https://github.com/square/Blueprint", from: "5.0.0"),
23+
.package(url: "https://github.com/square/Blueprint", from: "6.0.0"),
2424
],
2525
targets: [
2626
.target(

0 commit comments

Comments
 (0)