Skip to content

Commit

Permalink
Start using Xcode 15.
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Nov 27, 2023
1 parent 59166ac commit 7caacae
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 20 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ jobs:
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive


- name: Configure Xcode 15
run: |
sudo xcode-select -s /Applications/Xcode_15.0.1.app
echo "Creating Runtimes folder if needed..."
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
echo "Creating symlink of the iOS 16.4 runtime..."
sudo ln -s /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 16.4.simruntime
xcrun simctl create "iPhone 14" "com.apple.CoreSimulator.SimDeviceType.iPhone-14" "com.apple.CoreSimulator.SimRuntime.iOS-16-4"
- name: Run tests
run: xcodebuild test -scheme 'Compound' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.4' -skipPackagePluginValidation

2 changes: 1 addition & 1 deletion Inspector/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '14.0'
platform :ios, '16.0'

target 'Compound Inspector' do
# Comment the next line if you don't want to use dynamic frameworks
Expand Down
4 changes: 2 additions & 2 deletions Inspector/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ SPEC REPOS:
SPEC CHECKSUMS:
HyperioniOS: 4412ec61a390caadffcaaf3364733b06e103cf63

PODFILE CHECKSUM: cdc3ea5d438863bd13b397f381780eb2a46ac1a4
PODFILE CHECKSUM: 30e97949fb1de5c74fc24378bbfdbbace5bd8b80

COCOAPODS: 1.12.1
COCOAPODS: 1.14.3
46 changes: 31 additions & 15 deletions Sources/Compound/BaseStyles/CompoundButtonStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,22 +140,21 @@ public struct CompoundButtonStyle_Previews: PreviewProvider, PrefireProvider {
Section {
states(.large)
} header: {
Text("Large")
.foregroundStyle(.compound.textSecondary)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading)
Header(title: "Large")
}

Section {
states(.medium)
} header: {
Text("Medium")
.foregroundStyle(.compound.textSecondary)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading)
Header(title: "Medium")
}

Section {
plain
} header: {
Header(title: "Plain")
}
}
.padding(.horizontal)
}

public static func states(_ size: CompoundButtonStyle.Size) -> some View {
Expand All @@ -179,16 +178,33 @@ public struct CompoundButtonStyle_Previews: PreviewProvider, PrefireProvider {
Button("Disabled") { }
.buttonStyle(.compound(.secondary, size: size))
.disabled(true)

}
.padding(.horizontal)
}

static var plain: some View {
HStack(spacing: 20) {
Button("Plain") { }
.buttonStyle(.compound(.plain, size: size))

.buttonStyle(.compound(.plain))
Button("Destructive", role: .destructive) { }
.buttonStyle(.compound(.plain, size: size))

.buttonStyle(.compound(.plain))
Button("Disabled") { }
.buttonStyle(.compound(.plain, size: size))
.buttonStyle(.compound(.plain))
.disabled(true)
}
}

struct Header: View {
let title: String

var body: some View {
Text(title)
.foregroundStyle(.compound.textSecondary)
.frame(maxWidth: .infinity, alignment: .leading)
.padding([.leading, .top])
.padding(.leading )
}
}
}
2 changes: 1 addition & 1 deletion Tests/CompoundTests/__Snapshots__

0 comments on commit 7caacae

Please sign in to comment.