Skip to content

Commit

Permalink
Merge pull request #76 from dscyrescotti/develop
Browse files Browse the repository at this point in the history
Release Version 2.1.3
  • Loading branch information
dscyrescotti authored Aug 5, 2023
2 parents 1c564cc + beace08 commit e0e7073
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 42 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
- uses: actions/checkout@v2
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.4.1'
xcode-version: '14.2'
- name: Build
run: swift build -v
- name: Build (iOS)
run: xcrun xcodebuild -derivedDataPath "../.derivedData" clean build -scheme "ShuffleIt" -destination "generic/platform=ios"
- name: Build (macOS)
run: xcrun xcodebuild -derivedDataPath "../.derivedData" clean build -scheme "ShuffleIt" -destination "generic/platform=macos"
- name: Build (tvOS)
run: xcrun xcodebuild -derivedDataPath "../.derivedData" clean build -scheme "ShuffleIt" -destination "generic/platform=tvos"
- name: Build (watchOS)
run: xcrun xcodebuild -derivedDataPath "../.derivedData" clean build -scheme "ShuffleIt" -destination "generic/platform=watchos"
# - name: Build (iOS)
# run: xcrun xcodebuild -derivedDataPath "../.derivedData" clean build -scheme "ShuffleIt" -destination "generic/platform=ios"
# - name: Build (macOS)
# run: xcrun xcodebuild -derivedDataPath "../.derivedData" clean build -scheme "ShuffleIt" -destination "generic/platform=macos"
# - name: Build (tvOS)
# run: xcrun xcodebuild -derivedDataPath "../.derivedData" clean build -scheme "ShuffleIt" -destination "generic/platform=tvos"
# - name: Build (watchOS)
# run: xcrun xcodebuild -derivedDataPath "../.derivedData" clean build -scheme "ShuffleIt" -destination "generic/platform=watchos"
- name: Run tests
run: swift test --enable-code-coverage
- name: Convert code coverage
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
.package(url: "https://github.com/nalexn/ViewInspector.git", from: "0.9.2"),
.package(url: "https://github.com/nalexn/ViewInspector.git", from: "0.9.7"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ To explore more about **ShuffleStack**, check out the [documentation](https://ds
Add it as a dependency within your Package.swift.
```
dependencies: [
.package(url: "https://github.com/dscyrescotti/ShuffleIt.git", from: "2.1.2")
.package(url: "https://github.com/dscyrescotti/ShuffleIt.git", from: "2.1.3")
]
```

Expand Down
5 changes: 0 additions & 5 deletions Sources/CarouselStack/View/CarouselStack+Inspectable.swift

This file was deleted.

12 changes: 7 additions & 5 deletions Sources/CarouselStack/View/CarouselStack.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Utils
import SwiftUI
#if canImport(ViewInspector)
#if canImport(UtilsForTest)
import UtilsForTest
import ViewInspector
#endif
Expand Down Expand Up @@ -83,7 +83,7 @@ public struct CarouselStack<Data: RandomAccessCollection, Content: View>: View {
internal let data: Data
internal let content: (Data.Element, CGFloat) -> Content

#if canImport(ViewInspector)
#if canImport(UtilsForTest)
internal let inspection = Inspection<Self>()
#endif

Expand All @@ -105,8 +105,10 @@ public struct CarouselStack<Data: RandomAccessCollection, Content: View>: View {
.padding(.horizontal, padding)
.frame(minHeight: size.height)
.onPreferenceChange(SizePreferenceKey.self) { size in
DispatchQueue.main.async {
self.size = size
if size != .zero {
DispatchQueue.main.async {
self.size = size
}
}
}
.onReceive(carouselTrigger) { direction in
Expand Down Expand Up @@ -138,7 +140,7 @@ public struct CarouselStack<Data: RandomAccessCollection, Content: View>: View {
}
}
}
#if canImport(ViewInspector)
#if canImport(UtilsForTest)
.onReceive(inspection.notice) {
self.inspection.visit(self, $0)
}
Expand Down
5 changes: 0 additions & 5 deletions Sources/ShuffleDeck/View/ShuffleDeck+Inspectable.swift

This file was deleted.

15 changes: 10 additions & 5 deletions Sources/ShuffleDeck/View/ShuffleDeck.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Utils
import SwiftUI
#if canImport(ViewInspector)
#if canImport(UtilsForTest)
import UtilsForTest
import ViewInspector
#endif
Expand Down Expand Up @@ -86,7 +86,7 @@ public struct ShuffleDeck<Data: RandomAccessCollection, Content: View>: View {
internal let data: Data
internal let content: (Data.Element, CGFloat) -> Content

#if canImport(ViewInspector)
#if canImport(UtilsForTest)
internal let inspection = Inspection<Self>()
#endif

Expand All @@ -110,13 +110,18 @@ public struct ShuffleDeck<Data: RandomAccessCollection, Content: View>: View {
GeometryReader { proxy in
Color.clear
.preference(key: SizePreferenceKey.self, value: proxy.size)
.onAppear {
self.size = proxy.size
}
}
}
}
.frame(maxWidth: .infinity, minHeight: size.height)
.onPreferenceChange(SizePreferenceKey.self) { size in
DispatchQueue.main.async {
self.size = size
if size != .zero {
DispatchQueue.main.async {
self.size = size
}
}
}
.onChange(of: isActiveGesture) { value in
Expand Down Expand Up @@ -146,7 +151,7 @@ public struct ShuffleDeck<Data: RandomAccessCollection, Content: View>: View {
shuffleDeckTranslation?(translation)
}
}
#if canImport(ViewInspector)
#if canImport(UtilsForTest)
.onReceive(inspection.notice) {
self.inspection.visit(self, $0)
}
Expand Down
5 changes: 0 additions & 5 deletions Sources/ShuffleStack/View/ShuffleStack+Inspectable.swift

This file was deleted.

15 changes: 10 additions & 5 deletions Sources/ShuffleStack/View/ShuffleStack.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Utils
import SwiftUI
#if canImport(ViewInspector)
#if canImport(UtilsForTest)
import UtilsForTest
import ViewInspector
#endif
Expand Down Expand Up @@ -85,7 +85,7 @@ public struct ShuffleStack<Data: RandomAccessCollection, StackContent: View>: Vi
internal let data: Data
internal let stackContent: (Data.Element, CGFloat) -> StackContent

#if canImport(ViewInspector)
#if canImport(UtilsForTest)
internal let inspection = Inspection<Self>()
#endif

Expand All @@ -98,15 +98,20 @@ public struct ShuffleStack<Data: RandomAccessCollection, StackContent: View>: Vi
GeometryReader { proxy in
Color.clear
.preference(key: SizePreferenceKey.self, value: proxy.size)
.onAppear {
self.size = proxy.size
}
}
}
}
.frame(maxWidth: .infinity)
.padding(.horizontal, padding + offset)
.frame(minHeight: size.height)
.onPreferenceChange(SizePreferenceKey.self) { size in
DispatchQueue.main.async {
self.size = size
if size != .zero {
DispatchQueue.main.async {
self.size = size
}
}
}
.onReceive(shuffleTrigger) { direction in
Expand All @@ -126,7 +131,7 @@ public struct ShuffleStack<Data: RandomAccessCollection, StackContent: View>: Vi
performRestoring()
}
}
#if canImport(ViewInspector)
#if canImport(UtilsForTest)
.onReceive(inspection.notice) {
self.inspection.visit(self, $0)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/ShuffleItTests/Utils/ColorView.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftUI
import ViewInspector

struct ColorView: View, Inspectable {
struct ColorView: View {
let color: Color
var body: some View {
color
Expand Down

0 comments on commit e0e7073

Please sign in to comment.