Skip to content

Commit

Permalink
Release 1.0.2 (#8)
Browse files Browse the repository at this point in the history
Release `1.0.2`
  • Loading branch information
ns-vasilev authored Jul 19, 2024
2 parents 244e392 + ea76704 commit 4052b08
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 18 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ jobs:
DIFF_BASE: ${{ github.base_ref }}
Latest:
name: Test Latest (iOS, macOS, tvOS, watchOS)
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/Xcode_15.1.app/Contents/Developer"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=16.1,name=iPhone 14 Pro"
- destination: "OS=17.0,name=iPhone 14 Pro"
name: "iOS"
sdk: iphonesimulator
- destination: "OS=16.1,name=Apple TV"
- destination: "OS=17.2,name=Apple TV"
name: "tvOS"
sdk: appletvsimulator
- destination: "OS=9.1,name=Apple Watch Series 8 (45mm)"
Expand All @@ -59,11 +59,11 @@ jobs:

discover-typos:
name: Discover Typos
runs-on: macOS-12
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Discover typos
run: |
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@
All notable changes to this project will be documented in this file.

#### 1.x Releases
- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101)
- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101) | [1.0.2](#102)

## [1.0.2](https://github.com/space-code/skeleton-ui/releases/tag/1.0.2)
Released on 2024-07-19.

#### Added
- Add an index to each view
- Added in Pull Request[#6](https://github.com/space-code/skeleton-ui/pull/6).

#### Updated
- Update the masking logic
- Updated in Pull Request [#7](https://github.com/space-code/skeleton-ui/pull/7).
- Update the snapshot tests
- Updated in Pull Request [#8](https://github.com/space-code/skeleton-ui/pull/8).

## [1.0.1](https://github.com/space-code/skeleton-ui/releases/tag/1.0.1)
Released on 2024-01-14.
Expand Down
6 changes: 3 additions & 3 deletions Sources/SkeletonUI/Classes/Core/SkeletonConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public enum SkeletonConstants {
/// Default gradient for the skeleton view.
public static let gradient: Gradient = .init(
stops: [
.init(color: .black.opacity(.opacity), location: 0.8),
.init(color: .black, location: 0.9),
.init(color: .black.opacity(.opacity), location: 1.0),
.init(color: .gray.opacity(.opacity), location: 0.8),
.init(color: .gray, location: 0.9),
.init(color: .gray.opacity(.opacity), location: 1.0),
]
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public struct ShimmerViewModifier: ViewModifier {
// MARK: ViewModifier

public func body(content: Content) -> some View {
content
.mask(GradientAnimationView(gradient: gradient, animation: animation))
GradientAnimationView(gradient: gradient, animation: animation)
.mask(content)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public struct SkeletonViewModifier<ContentView: View>: ViewModifier {
content(index)
.frame(width: (configuration.scales[safe: index] ?? 1) * geometry.size.width)
}
.shimmering(isActive: true, gradient: configuration.gradient, animation: configuration.animation)
}
.shimmering(isActive: true, gradient: configuration.gradient, animation: configuration.animation)
}
.padding(configuration.insets)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/SkeletonUI/Classes/Core/Views/SkeletonView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public struct SkeletonView<
>: View where Data.Element: Identifiable {
// MARK: Types

public typealias ContentBuilder = (_ data: Data.Element?) -> Content
public typealias ContentBuilder = (_ data: Data.Element?, _ index: Int) -> Content

// MARK: Properties

Expand Down Expand Up @@ -78,7 +78,7 @@ public struct SkeletonView<

public var body: some View {
containerView(viewType) { index in
builder(data.isEmpty ? nil : Array(data)[safe: index])
builder(data.isEmpty ? nil : Array(data)[safe: index], index)
.skeleton(
isEnabled: isEnabled,
configuration: configuration,
Expand Down
4 changes: 2 additions & 2 deletions Tests/SkeletonUITests/SnapshotTests/SkeletonUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final class SkeletonUITests: XCTestCase {
spacing: .spacing,
insets: EdgeInsets(top: .spacing, leading: .spacing, bottom: .spacing, trailing: .spacing)
),
builder: { text in Text(text?.text ?? "") }
builder: { text, _ in Text(text?.text ?? "") }
),
as: [.image(layout: .device(config: config), traits: .dark)],
testName: #function + prefix
Expand Down Expand Up @@ -109,7 +109,7 @@ final class SkeletonUITests: XCTestCase {
// MARK: Private

@ViewBuilder
private func builder(_ item: Item?) -> some View {
private func builder(_ item: Item?, index _: Int) -> some View {
item.map { Text($0.text) }
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4052b08

Please sign in to comment.