Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2c48a0c
refresh logo icon
oleksiikolomiietssnapp Nov 6, 2025
79bacc6
Replace custom coverage workflow with swift-coverage-action
oleksiikolomiietssnapp Nov 4, 2025
4c7738a
Replace local plugin with package dependency and fix compiler warning
oleksiikolomiietssnapp Nov 4, 2025
2d4f5ac
adopt image object update to use url or fallback to data during initi…
oleksiikolomiietssnapp Nov 6, 2025
d023b11
add example app
oleksiikolomiietssnapp Nov 6, 2025
6c54b70
Simplify PR template with What/Why/Changes sections
oleksiikolomiietssnapp Nov 6, 2025
beb42cd
Update README.md
oleksiikolomiietssnapp Nov 6, 2025
de48e1c
Update README.md
oleksiikolomiietssnapp Nov 6, 2025
4a1269b
Update run_tests.yml
oleksiikolomiietssnapp Nov 6, 2025
42c8892
Merge pull request #13 from Snapp-Mobile/feature/local-plugin-to-package
oleksiikolomiietssnapp Nov 6, 2025
6e91fd1
Merge pull request #14 from Snapp-Mobile/feature/swift-coverage-action
oleksiikolomiietssnapp Nov 6, 2025
40e6d0d
Merge pull request #15 from Snapp-Mobile/feature/adopt-image-object-url
oleksiikolomiietssnapp Nov 6, 2025
9f00bca
Merge pull request #16 from Snapp-Mobile/feature/add-example-app
oleksiikolomiietssnapp Nov 6, 2025
d85c187
Merge pull request #17 from Snapp-Mobile/feature/refresh-logo-icon
oleksiikolomiietssnapp Nov 6, 2025
80b01a4
Merge pull request #18 from Snapp-Mobile/feature/simplify-pr-template
oleksiikolomiietssnapp Nov 6, 2025
deaeb6b
bump up SnappTheming version to 0.1.3
oleksiikolomiietssnapp Nov 11, 2025
99555d7
improve documentation main page and update old doc comments
oleksiikolomiietssnapp Nov 11, 2025
517a9d2
Merge pull request #22 from Snapp-Mobile/docc/style-and-leftovers
oleksiikolomiietssnapp Nov 11, 2025
73cb0e3
Merge pull request #21 from Snapp-Mobile/dependencies/snapp-theming-v…
oleksiikolomiietssnapp 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
30 changes: 6 additions & 24 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
#### ✨ 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... --->

#### 🧪 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... --->
## Why
<!-- Why this change was needed -->

#### 📸 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 -->
49 changes: 0 additions & 49 deletions .github/scripts/extract_coverage.sh

This file was deleted.

77 changes: 3 additions & 74 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,14 @@
# This workflow will test a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: Package Test

env:
EXTRACT_COVERAGE: '.github/scripts/extract_coverage.sh'
CREATE_COMMENT: '.github/scripts/create_pr_comment.js'
COVERAGE_REPORT_PATH: './coverage/coverage.xcresult'
XCODE_VERSION: 'Xcode_16.2.app'
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:
coverage:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

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

- name: Select Xcode
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=${CODECOV_PATH}" >> $GITHUB_ENV

- 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,
});
- uses: actions/checkout@v4
- uses: Snapp-Mobile/swift-coverage-action@v1.0.1
32 changes: 20 additions & 12 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

Expand All @@ -10,26 +9,29 @@ let package = Package(
.macOS(.v13),
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "SnappThemingSVGSupport",
targets: ["SnappThemingSVGSupport"])
targets: ["SnappThemingSVGSupport"]
),
.executable(
name: "ExampleApp",
targets: ["ExampleApp"]
),
],
dependencies: [
.package(url: "https://github.com/SVGKit/SVGKit.git", from: "3.0.0"),
.package(url: "https://github.com/Snapp-Mobile/SnappTheming", from: "0.1.2"),
.package(url: "https://github.com/Snapp-Mobile/SnappTheming", exact: "0.1.3"),
.package(url: "https://github.com/Snapp-Mobile/SwiftFormatLintPlugin.git", exact: "1.0.4"),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "SnappThemingSVGSupport",
dependencies: [
"SVGKit",
"SnappTheming",
],
plugins: [
.plugin(name: "SnappThemingSVGSupportSwiftFormatPlugin")
.plugin(name: "Lint", package: "SwiftFormatLintPlugin")
]
),
.testTarget(
Expand All @@ -43,11 +45,17 @@ let package = Package(
.copy("Resources/images.json")
]
),
.plugin(
name: "SnappThemingSVGSupportSwiftFormatPlugin",
capability: .buildTool(),
path: "Plugins/SnappThemingSVGSupportSwiftFormatPlugin"
.executableTarget(
name: "ExampleApp",
dependencies: [
"SnappThemingSVGSupport",
"SnappTheming",
],
resources: [
.copy("ExampleApp/Resources/light.json"),
.copy("ExampleApp/Resources/dark.json"),
.copy("ExampleApp/Resources/pink.json"),
]
),

]
)

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# SnappThemingSVGSupport

<p align="center">
<img src="Sources/SnappThemingSVGSupport/SnappThemingSVGSupport.docc/Resources/logo%402x.png">
<img src="Sources/SnappThemingSVGSupport/SnappThemingSVGSupport.docc/Resources/logo.png">
<br /><br />
<a href="https://github.com/Snapp-Mobile/SnappThemingSVGSupport/tags" target="_blank"><img src="https://img.shields.io/github/v/tag/Snapp-Mobile/SnappThemingSVGSupport?color=yellow&label=version" alt="Latest Version"></a>
<a href="https://github.com/Snapp-Mobile/SnappThemingSVGSupport/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Snapp-Mobile/SnappThemingSVGSupport" alt="License Badge"></a>
<br />
<a href="https://img.shields.io/badge/swift--tools--version-6.0-red" target="_blank"><img src="https://img.shields.io/badge/swift--tools--version-6.0-red" alt="Swift Tools Version 6.0"></a>
<a href="https://img.shields.io/badge/Platforms-_iOS_|_macOS_|_tvOS_-green" target="_blank"><img src="https://img.shields.io/badge/Platforms-_iOS_|_macOS_|_tvOS_-green" alt="Supported Platforms"></a>
<p/>
`SnappThemingSVGSupport` is a library that enables support for SVG asset handling in `SnappTheming`

This library enables support for SVG asset handling in **SnappTheming**

Enabling the SVG support is as easy as adding one line to your codebase.

Expand Down
Loading