Skip to content
Merged

0.1.3 #121

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
fce124f
Make representations available for initialization from code (#119)
v-volod May 12, 2025
fc120c9
fix shape tests
Sep 10, 2025
497dfbd
add shadows declaration
Sep 10, 2025
e600bc1
add ShadowTests
Sep 10, 2025
c95f082
add ShadowsViewer to settings/tokens
Sep 10, 2025
82cb09c
add action and card shadows to example app and used it for particular…
Sep 10, 2025
66d805a
add SnappThemingShadowModifier
Sep 11, 2025
2665230
Merge pull request #120 from Snapp-Mobile/feature/shadow
kolomiiets-oleksii Sep 11, 2025
bcdc9ea
add missed dependency to SnappThemingSwiftUIHelpers and swift-format …
Sep 11, 2025
5c99dd9
fix typo
Sep 11, 2025
795ef7c
Update swift.yml
kolomiiets-oleksii Sep 22, 2025
c24b92c
Update swift.yml
kolomiiets-oleksii Sep 22, 2025
ba24757
Update SnappTheming.md
kolomiiets-oleksii Oct 6, 2025
7a1e7af
Merge pull request #124 from Snapp-Mobile/fix/broken-resources-path
kolomiiets-oleksii Oct 6, 2025
a5cbb10
Update swift.yml
kolomiiets-oleksii Oct 28, 2025
551500f
Update swift.yml
kolomiiets-oleksii Oct 28, 2025
4e08db6
Downgrade swift-coverage-action to version 0.1.1
kolomiiets-oleksii Oct 28, 2025
e6ba4be
refresh logo
Oct 28, 2025
1a9f394
Update GitHub Actions workflow for Swift tests
kolomiiets-oleksii Oct 28, 2025
7a0b62b
Fix formatting in swift.yml for pull_request branches
kolomiiets-oleksii Oct 28, 2025
d51615e
Add PR template
kolomiiets-oleksii Oct 28, 2025
2ce7818
Fix formatting in swift.yml for pull_request branches
kolomiiets-oleksii Oct 28, 2025
f73ba4f
Merge pull request #126 from Snapp-Mobile/feature/fresh-logo
kolomiiets-oleksii Oct 28, 2025
74cdeb6
Merge pull request #127 from Snapp-Mobile/feature/pr-template
kolomiiets-oleksii Oct 28, 2025
19953a7
example app warnings: app icons
Oct 29, 2025
7a6a081
sdk warnings: fix swift-format warnings
Oct 29, 2025
aa5e43a
fix app con fox example watch os target
Oct 29, 2025
814e8f2
string updates
Oct 29, 2025
3233509
change shadow view so it's better visible with dark mode and on small…
Oct 29, 2025
b1c917e
Migrate the example apps to Swift 6
Oct 29, 2025
b864eb7
Merge remote-tracking branch 'origin/next' into 118-add-support-of-in…
Nov 3, 2025
e29f479
change `@ShapeBuilder var shape: some Shape` to `@InsettableShapeBuil…
Nov 3, 2025
54093a9
Fix LICENSE: update copyright to Snapp Mobile Germany GmbH
kolomiiets-oleksii Nov 4, 2025
7cadf87
Merge pull request #131 from Snapp-Mobile/fix/license
stinger Nov 4, 2025
9f4253b
replace local swift format linting plugin with `SwiftFormatLintPlugin`
Nov 4, 2025
a84dbe8
ignore Package.resolved
Nov 4, 2025
5f5fd36
Merge pull request #132 from Snapp-Mobile/feature/foormat-plugin
kolomiiets-oleksii Nov 4, 2025
80c19a6
change action link to snap one
Nov 4, 2025
7b6d823
remove script since all logic is in separate repo
Nov 4, 2025
9b98f2c
moved MainActor to whole enum
Nov 4, 2025
5aa3c0d
leftovers
Nov 4, 2025
1e80956
more leftovers
Nov 4, 2025
1741068
remove SnappThemingSVGSupport usage from exaple
Nov 4, 2025
4a5d5c1
Merge pull request #133 from Snapp-Mobile/fix/remove-svg-support-from…
kolomiiets-oleksii Nov 4, 2025
66e66b4
Merge pull request #128 from Snapp-Mobile/fix/formatting-warnings
kolomiiets-oleksii Nov 5, 2025
77d4e02
Merge pull request #123 from Snapp-Mobile/feature/workflow-reused
kolomiiets-oleksii Nov 5, 2025
d4c1acc
Merge pull request #129 from Snapp-Mobile/feature/swift-6
kolomiiets-oleksii Nov 5, 2025
2c334b8
remove ShapeBuilder
Nov 5, 2025
8307bd8
Merge pull request #130 from Snapp-Mobile/118-add-support-of-insettab…
kolomiiets-oleksii Nov 5, 2025
fb652c7
Support url context for image processing (#135)
kolomiiets-oleksii Nov 6, 2025
4439b7f
Image manager tests (#136)
kolomiiets-oleksii Nov 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 6 additions & 26 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
#### ✨ This PR Will:
<!--- List new features, improvements, or fixes introduced in this PR. --->
- <!--- add support for XYZ --->
- <!--- improved performance of ABC --->
- <!--- fix issue #123 where XYZ was not working --->
## What
<!-- What was changed -->

#### 🎯 Purpose
<!--- Explain why this change is needed and what problem it solves. --->
- <!--- This update enhances user experience by... --->
- <!--- Fixes a bug that caused... --->
## Why
<!-- Why this change was needed -->

#### 🧪 Unit Tests
<!--- Mention if unit tests were added. If not, briefly explain why. --->
- <!--- added unit tests for XYZ functionality. --->
- <!--- no new tests were needed because... --->

#### 📸 Screenshots
<!--- Add screenshots or GIFs if relevant. --->
- <!--- Before / After comparison screenshots --->

#### 💻 Code Snippets
<!--- Include important code snippets if needed. --->
<!--- ```swift --->
<!--- // Example Swift code snippet --->
<!--- func exampleFunction() { --->
<!--- print("Hello, PR!") --->
<!--- } --->
<!--- ``` --->
## Changes
<!-- List affected files/modules -->
37 changes: 0 additions & 37 deletions .github/scripts/extract_coverage.sh

This file was deleted.

94 changes: 14 additions & 80 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,14 @@
name: Package Test

env:
EXTRACT_COVERAGE: '.github/scripts/extract_coverage.sh'
XCODE_PATH: '/Applications/Xcode_16.2.app/Contents/Developer'
COVERAGE_SUMMARY_FILE: 'pr_coverage_summary.txt'
BOT_COMMENT_HEADER: '### 🛡️ Code Coverage Report'

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: List Xcode installations
run: sudo ls -1 /Applications | grep "Xcode"

- name: Select Xcode 16.2
run: sudo xcode-select -s ${{ env.XCODE_PATH }}

- name: Run Swift Tests with Coverage
run: |
swift test --enable-swift-testing --enable-code-coverage
CODECOV_PATH=$(swift test --enable-code-coverage --show-codecov-path)
echo $CODECOV_PATH

- name: Run Coverage Extraction Script
run: bash ${{ env.EXTRACT_COVERAGE }}

- name: Comment on Pull Request
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const coverageOutput = fs.readFileSync('${{ env.COVERAGE_SUMMARY_FILE }}', 'utf8');

const newComment = `
${{ env.BOT_COMMENT_HEADER }}

${coverageOutput}

_Generated by GitHub Actions._
`;

// Fetch existing comments
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
});

// Identify and delete previous bot comments
const botComments = comments.data.filter(comment =>
comment.body.includes("${{ env.BOT_COMMENT_HEADER }}")
);

for (const botComment of botComments) {
await github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
});
}

// Create a comment on the pull request
await github.rest.issues.createComment({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: newComment,
});
name: Package Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "next" ]

jobs:
coverage:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: Snapp-Mobile/swift-coverage-action@v1.0.1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ fastlane/test_output
.DS_Store
Example/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm
/**/*.docc/.docc-build
.swiftpm
.swiftpm
Package.resolved
35 changes: 8 additions & 27 deletions Example/Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
Modules/ThemeViewer/Images/ImagesViewer.swift,
Modules/ThemeViewer/Images/ImageViewer.swift,
Modules/ThemeViewer/Metrics/MetricsViewer.swift,
Modules/ThemeViewer/Shadows/ShadowsViewer.swift,
Modules/ThemeViewer/Shapes/ShapesViewer.swift,
Modules/ThemeViewer/ThemeViewer.swift,
Modules/ThemeViewer/Typography/TypographyViewer.swift,
Expand Down Expand Up @@ -117,9 +118,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CEF2CF432D5369890012251C /* SnappThemingSVGSupport in Frameworks */,
53F240072D36753400264B36 /* Lottie in Frameworks */,
CEF2CC1A2D4A685E0012251C /* SnappThemingSVGSupport in Frameworks */,
53679CA12D3FA147002F2787 /* SnappTheming in Frameworks */,
53679CA32D3FA147002F2787 /* SnappThemingSwiftUIHelpers in Frameworks */,
);
Expand Down Expand Up @@ -188,8 +187,6 @@
53F240062D36753400264B36 /* Lottie */,
53679CA02D3FA147002F2787 /* SnappTheming */,
53679CA22D3FA147002F2787 /* SnappThemingSwiftUIHelpers */,
CEF2CC192D4A685E0012251C /* SnappThemingSVGSupport */,
CEF2CF422D5369890012251C /* SnappThemingSVGSupport */,
);
productName = Example;
productReference = 53F233062D31511E00264B36 /* Example.app */;
Expand Down Expand Up @@ -246,7 +243,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1620;
LastUpgradeCheck = 1620;
LastUpgradeCheck = 2600;
TargetAttributes = {
53F233052D31511E00264B36 = {
CreatedOnToolsVersion = 16.2;
Expand All @@ -271,7 +268,6 @@
packageReferences = (
53F240032D3674F900264B36 /* XCRemoteSwiftPackageReference "lottie-ios" */,
53679C9F2D3FA147002F2787 /* XCLocalSwiftPackageReference "../../../SnappTheming" */,
CEF2CF412D5369890012251C /* XCRemoteSwiftPackageReference "SnappThemingSVGSupport" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 53F233072D31511E00264B36 /* Products */;
Expand Down Expand Up @@ -415,6 +411,7 @@
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
Expand Down Expand Up @@ -471,6 +468,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -509,7 +507,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2,3,7";
TVOS_DEPLOYMENT_TARGET = 18.0;
XROS_DEPLOYMENT_TARGET = 2.0;
Expand Down Expand Up @@ -549,7 +547,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = "1,2,3,7";
TVOS_DEPLOYMENT_TARGET = 18.0;
XROS_DEPLOYMENT_TARGET = 2.0;
Expand Down Expand Up @@ -580,7 +578,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 11.2;
};
Expand Down Expand Up @@ -610,7 +608,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 11.2;
};
Expand Down Expand Up @@ -701,14 +699,6 @@
minimumVersion = 4.5.0;
};
};
CEF2CF412D5369890012251C /* XCRemoteSwiftPackageReference "SnappThemingSVGSupport" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Snapp-Mobile/SnappThemingSVGSupport";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.0.2;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
Expand All @@ -725,10 +715,6 @@
package = 53F240032D3674F900264B36 /* XCRemoteSwiftPackageReference "lottie-ios" */;
productName = Lottie;
};
CEF2CC192D4A685E0012251C /* SnappThemingSVGSupport */ = {
isa = XCSwiftPackageProductDependency;
productName = SnappThemingSVGSupport;
};
CEF2CF242D5363E00012251C /* SnappTheming */ = {
isa = XCSwiftPackageProductDependency;
package = 53679C9F2D3FA147002F2787 /* XCLocalSwiftPackageReference "../../../SnappTheming" */;
Expand All @@ -739,11 +725,6 @@
package = 53679C9F2D3FA147002F2787 /* XCLocalSwiftPackageReference "../../../SnappTheming" */;
productName = SnappThemingSwiftUIHelpers;
};
CEF2CF422D5369890012251C /* SnappThemingSVGSupport */ = {
isa = XCSwiftPackageProductDependency;
package = CEF2CF412D5369890012251C /* XCRemoteSwiftPackageReference "SnappThemingSVGSupport" */;
productName = SnappThemingSVGSupport;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 53F232FE2D31511E00264B36 /* Project object */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1620"
LastUpgradeVersion = "2600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
},
{
"filename" : "9262DB8E-2A17-4EE6-B5B7-60F85F33CB7F 1.png",
"idiom" : "universal",
"platform" : "watchos",
"size" : "1024x1024"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"images" : [
{
"filename" : "tv_top_shelf_image_wide.png",
"idiom" : "tv",
"scale" : "1x"
},
{
"filename" : "tv_top_shelf_image_wide@2x.png",
"idiom" : "tv",
"scale" : "2x"
}
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.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"images" : [
{
"filename" : "tv_top_shelf_image.png",
"idiom" : "tv",
"scale" : "1x"
},
{
"filename" : "tv_top_shelf_image@2x.png",
"idiom" : "tv",
"scale" : "2x"
}
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.
9 changes: 0 additions & 9 deletions Example/Example/Example/ExampleApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import OSLog
import SnappTheming
import SwiftUI

#if !os(visionOS)
import SnappThemingSVGSupport
#endif

@main
struct ExampleApp: App {
@State var theme: Theme
Expand All @@ -21,11 +17,6 @@ struct ExampleApp: App {
private let storage: SettingsManager.Storage

init() {
#if !os(visionOS)
// Do this for turning the SVG processor on
SnappThemingImageProcessorsRegistry.shared.register(.svg)
#endif

storage = .userDefaults()

settingsManager = SettingsManager(storage: .userDefaults(), fallbackColorSchema: .light)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ struct ActionsContainer<Content: View>: View {
ForEach(
sections: content,
content: { section in
let items = section.content.enumerated().map(Item.init(index:subview:))
let items = section.content.enumerated()
.map { Item(index: $0, subview: $1) }
ForEach(items, id: \.index) { item in
item.subview
if item.index != section.content.endIndex - 1 {
Spacer()
}
}
})
}
)
}
.padding(.horizontal, 7)
.frame(maxWidth: .infinity)
Expand Down
Loading