Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.0.0 #38

Merged
merged 5 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 12 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: Build

on:
push:
Expand All @@ -7,22 +7,23 @@ on:
branches: [main]

jobs:
swiftlint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: swiftlint
uses: norio-nomura/[email protected]
build:
runs-on: macos-latest

strategy:
matrix:
platform: [iOS, tvOS, watchOS, macOS, mac-catalyst]

steps:
- name: checkout
uses: actions/checkout@v2
- name: build
- name: Checkout repository
uses: actions/checkout@v4

- name: Run swiftlint
uses: cirruslabs/swiftlint-action@v1
with:
version: latest

- name: Run xcodebuild
run: |
PLATFORM=${{ matrix.platform }}
if [[ $PLATFORM == iOS ]]; then
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/docc.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: docc
name: DocC documentation

on:
push:
tags:
- '*'
push:
tags:
- "*"

jobs:
docbuild:
runs-on: macos-latest

steps:
- name: checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: docc
run: ./toastui docc deploy

- name: Deploy documentation
run: ./toastui docc deploy
112 changes: 112 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# SwiftFormat config compliant with Google Swift Guideline
# https://google.github.io/swift/#control-flow-statements

# Specify version used in a project

--swiftversion 5.10

# Rules explicitly required by the guideline

--rules \
blankLinesAroundMark, \
blankLinesAtEndOfScope, \
blankLinesAtStartOfScope, \
blankLinesBetweenScopes, \
braces, \
consecutiveBlankLines, \
consecutiveSpaces, \
duplicateImports, \
elseOnSameLine, \
emptyBraces, \
enumNamespaces, \
extensionAccessControl, \
hoistPatternLet, \
indent, \
leadingDelimiters, \
linebreakAtEndOfFile, \
markTypes, \
organizeDeclarations, \
redundantInit, \
redundantParens, \
redundantPattern, \
redundantRawValues, \
redundantType, \
redundantVoidReturnType, \
semicolons, \
sortImports, \
sortSwitchCases, \
spaceAroundBraces, \
spaceAroundBrackets, \
spaceAroundComments, \
spaceAroundGenerics, \
spaceAroundOperators, \
spaceAroundParens, \
spaceInsideBraces, \
spaceInsideBrackets, \
spaceInsideComments, \
spaceInsideGenerics, \
spaceInsideParens, \
todos, \
trailingClosures, \
trailingCommas, \
trailingSpace, \
typeSugar, \
void, \
wrap, \
wrapArguments, \
wrapAttributes, \
#
#
# Additional rules not mentioned in the guideline, but helping to keep the codebase clean
# Quoting the guideline:
# Common themes among the rules in this section are:
# avoid redundancy, avoid ambiguity, and prefer implicitness over explicitness
# unless being explicit improves readability and/or reduces ambiguity.
#
#
andOperator, \
isEmpty, \
redundantBackticks, \
redundantBreak, \
redundantExtensionACL, \
redundantGet, \
redundantLetError, \
redundantNilInit, \
redundantObjc, \
redundantOptionalBinding, \
redundantReturn, \
redundantSelf, \
strongifiedSelf

# Options for basic rules

--extensionacl on-declarations
--funcattributes prev-line
--indent 2
--maxwidth 100
--typeattributes prev-line
--funcattributes prev-line
--storedvarattrs same-line
--computedvarattrs prev-line
--complexattrs prev-line
--voidtype void
--wraparguments before-first
--wrapparameters before-first
--wrapcollections before-first
--wrapreturntype if-multiline
--wrapconditions after-first

# Option for additional rules

--self init-only

--organizationmode type
--markcategories false
--marktypes never
--markextensions never

# Excluded folders

--exclude Pods,**/UNTESTED_TODO,vendor,fastlane

# https://github.com/NoemiRozpara/Google-SwiftFormat-Config
2 changes: 1 addition & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/ToastUI.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1230"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. `ToastUI` adheres to [Semantic Versioning](https://semver.org/).

#### 4.x Releases

* `4.0.x` Releases - [4.0.0](#400)

#### 3.x Releases

* `3.0.x` Releases - [3.0.0](#300) | [3.0.1](#301)
Expand All @@ -19,14 +23,36 @@ All notable changes to this project will be documented in this file. `ToastUI` a

---

## [4.0.0](https://github.com/quanshousio/ToastUI/releases/tag/4.0.0)

Released on 2024-08-10.

#### Changed

* Minimum required version for Swift is 5.7.

#### Added

* Support for visionOS. Minimum required version for visionOS is 1.0.

#### Updated

* Refactor the core implementation.
* Toasts now dismiss immediately, even during transitions.
* Documentation to use new DocC version.
* Remove padding from the background in DefaultToastView.
* Update GitHub actions.

---

## [3.0.1](https://github.com/quanshousio/ToastUI/releases/tag/3.0.1)

Released on 2022-07-19.

#### Updated

* Remove `fixedSize` modifier from `Label` in `DefaultToastView`.
* Add new AppIcon.
* Add a new AppIcon.

## [3.0.0](https://github.com/quanshousio/ToastUI/releases/tag/3.0.0)

Expand Down Expand Up @@ -57,7 +83,7 @@ Released on 2022-04-11.

#### Added

* Support for watchOS. Minimum required version for watchOS is 7.0
* Support for watchOS. Minimum required version for watchOS is 7.0.
* Static property/function for all built-in styles to leverage the new static member lookup functionality.
* `toastDimmedBackground` modifier for enabling or disabling the dimmed background.
* `IconToastViewStyle` style for showing a toast with an icon and a headline text label.
Expand Down
14 changes: 4 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
// swift-tools-version:5.5
// swift-tools-version:5.7

import PackageDescription

let package = Package(
name: "ToastUI",
platforms: [
.iOS(.v14), .tvOS(.v14), .watchOS(.v7), .macOS(.v11)
],
products: [
.library(name: "ToastUI", targets: ["ToastUI"])
],
targets: [
.target(name: "ToastUI")
]
platforms: [.iOS(.v14), .tvOS(.v14), .watchOS(.v7), .macOS(.v11)],
products: [.library(name: "ToastUI", targets: ["ToastUI"])],
targets: [.target(name: "ToastUI")]
)
Loading