From 03c5b1d4269bc8a8032b142c928874d6f6aad741 Mon Sep 17 00:00:00 2001 From: Christian Elies Date: Sat, 16 May 2020 00:31:57 +0200 Subject: [PATCH 1/6] chore(): increased swift tools version to 5.2 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index dfb9074..5269fbe 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription From ca4dbb0c59ae1b2404bdfa7c1bfb49007b28a911 Mon Sep 17 00:00:00 2001 From: Christian Elies Date: Wed, 29 Jul 2020 22:27:04 +0200 Subject: [PATCH 2/6] docs(readme): moved migration information into expandable sections --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b8fdf16..cae2a05 100644 --- a/README.md +++ b/README.md @@ -148,8 +148,10 @@ AdvancedList(yourData, content: { item in For more examples take a look at [AdvancedList-SwiftUI](https://github.com/crelies/AdvancedList-SwiftUI). -## Migration 2.x -> 3.0 +## Migration +
+Migration 2.x -> 3.0 The `AdvancedList` was dramatically simplified and is now more like the `List` and `ForEach` SwiftUI views. 1. Delete your list service instances and directly **pass your data to the list initializer** @@ -158,6 +160,7 @@ The `AdvancedList` was dramatically simplified and is now more like the `List` a 4. **Move and delete:** Instead of setting `AdvancedListActions` on your list service just pass a `onMoveAction` and/or `onDeleteAction` block to the initializer **Before:** + ```swift import AdvancedList @@ -193,6 +196,7 @@ listService.listState = .items ``` **After:** + ```swift import AdvancedList @@ -221,12 +225,14 @@ AdvancedList(yourData, content: { item in Text("Loading ...") }, pagination: .noPagination) ``` +
-## Migration 3.0 -> 4.0 - +
+Migration 3.0 -> 4.0 Thanks to a hint from @SpectralDragon I could refactor the `onMove` and `onDelete` functionality to view modifiers. **Before:** + ```swift import AdvancedList @@ -257,6 +263,7 @@ AdvancedList(yourData, content: { item in ``` **After:** + ```swift import AdvancedList @@ -287,3 +294,4 @@ AdvancedList(yourData, content: { item in // delete me } ``` +
From af112d565b156fd039891ce354ee8a0244c9311d Mon Sep 17 00:00:00 2001 From: Christian Elies Date: Wed, 29 Jul 2020 22:29:44 +0200 Subject: [PATCH 3/6] docs(readme): added newlines --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cae2a05..ba02d89 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ For more examples take a look at [AdvancedList-SwiftUI](https://github.com/creli
Migration 2.x -> 3.0 + The `AdvancedList` was dramatically simplified and is now more like the `List` and `ForEach` SwiftUI views. 1. Delete your list service instances and directly **pass your data to the list initializer** @@ -229,6 +230,7 @@ AdvancedList(yourData, content: { item in
Migration 3.0 -> 4.0 + Thanks to a hint from @SpectralDragon I could refactor the `onMove` and `onDelete` functionality to view modifiers. **Before:** From 7b438ad28c369c79557fd44082bd232cd121dc6e Mon Sep 17 00:00:00 2001 From: Christian Elies Date: Wed, 29 Jul 2020 22:31:48 +0200 Subject: [PATCH 4/6] chore(travis): use xcode 11.6 image --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 456de05..2d55c7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: swift -osx_image: xcode11.3 +osx_image: xcode11.6 script: - swift package generate-xcodeproj - xcodebuild clean test -destination 'name=iPhone 8' -scheme AdvancedList-Package -enableCodeCoverage YES -derivedDataPath .build/derivedData -quiet From 946af9576379ae8eb2c54529fff629feceb5fad1 Mon Sep 17 00:00:00 2001 From: Christian Elies Date: Wed, 29 Jul 2020 22:39:44 +0200 Subject: [PATCH 5/6] docs(readme): swift 5.2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba02d89..51d509e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # AdvancedList -[![Swift 5](https://img.shields.io/badge/swift-5-green.svg?longCache=true&style=flat-square)](https://developer.apple.com/swift) +[![Swift 5.2](https://img.shields.io/badge/swift-5.2-green.svg?longCache=true&style=flat-square)](https://developer.apple.com/swift) [![Platforms](https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS-lightgrey.svg?longCache=true&style=flat-square)](https://www.apple.com) [![Current version](https://img.shields.io/github/v/tag/crelies/AdvancedList?longCache=true&style=flat-square)](https://github.com/crelies/AdvancedList) [![Build status](https://travis-ci.com/crelies/AdvancedList.svg?token=THnaziKxRFFz1nKcsPgz&branch=dev)](https://travis-ci.com/crelies/AdvancedList) From f7d73f2e79b59fa3527a6d49ae3371e6de32643d Mon Sep 17 00:00:00 2001 From: Christian Elies Date: Wed, 29 Jul 2020 22:57:37 +0200 Subject: [PATCH 6/6] chore(): swift 5.3; refactor(advanced list): make use of function builder enhancements --- .travis.yml | 2 +- Package.swift | 2 +- README.md | 2 +- Sources/AdvancedList/public/Views/AdvancedList.swift | 11 +++++------ 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d55c7b..b25e707 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: swift -osx_image: xcode11.6 +osx_image: xcode12 script: - swift package generate-xcodeproj - xcodebuild clean test -destination 'name=iPhone 8' -scheme AdvancedList-Package -enableCodeCoverage YES -derivedDataPath .build/derivedData -quiet diff --git a/Package.swift b/Package.swift index 5269fbe..2afc314 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/README.md b/README.md index 51d509e..ab860e8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # AdvancedList -[![Swift 5.2](https://img.shields.io/badge/swift-5.2-green.svg?longCache=true&style=flat-square)](https://developer.apple.com/swift) +[![Swift 5.3](https://img.shields.io/badge/swift-5.3-green.svg?longCache=true&style=flat-square)](https://developer.apple.com/swift) [![Platforms](https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS-lightgrey.svg?longCache=true&style=flat-square)](https://www.apple.com) [![Current version](https://img.shields.io/github/v/tag/crelies/AdvancedList?longCache=true&style=flat-square)](https://github.com/crelies/AdvancedList) [![Build status](https://travis-ci.com/crelies/AdvancedList.svg?token=THnaziKxRFFz1nKcsPgz&branch=dev)](https://travis-ci.com/crelies/AdvancedList) diff --git a/Sources/AdvancedList/public/Views/AdvancedList.swift b/Sources/AdvancedList/public/Views/AdvancedList.swift index 98e4130..08c63b7 100644 --- a/Sources/AdvancedList/public/Views/AdvancedList.swift +++ b/Sources/AdvancedList/public/Views/AdvancedList.swift @@ -41,7 +41,8 @@ public struct AdvancedList