From 52ee2bb5c7a390e4d0dfebfc017d5b662bc166c3 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Thu, 6 Jun 2024 16:26:42 -0700 Subject: [PATCH] Clean up DocC and link to new migration guide in README (#3153) * Clean up DocC and link to new migration guide in README * wip --- README.md | 3 ++- .../Articles/MigrationGuides.md | 1 + ...{MigrationTo1.11.md => MigratingTo1.11.md} | 0 .../Extensions/AppStorageKey.md | 4 ++++ .../Extensions/FileStorageKey.md | 1 + .../Extensions/InMemoryKey.md | 1 + .../Documentation.docc/Extensions/Reducer.md | 1 + .../Documentation.docc/Extensions/Store.md | 3 +-- .../Extensions/SwiftUIBinding.md | 19 +++++++++++++++++++ .../Extensions/SwiftUIBindingScopeForEach.md | 8 ++++++++ .../Extensions/SwiftUIBindingScopeIfLet.md | 8 ++++++++ .../Extensions/SwiftUIBindingSubscript.md | 8 ++++++++ 12 files changed, 54 insertions(+), 3 deletions(-) rename Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/{MigrationTo1.11.md => MigratingTo1.11.md} (100%) create mode 100644 Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBinding.md create mode 100644 Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingScopeForEach.md create mode 100644 Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingScopeIfLet.md create mode 100644 Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingSubscript.md diff --git a/README.md b/README.md index 79fbfb995db5..b5e18115ef14 100644 --- a/README.md +++ b/README.md @@ -532,13 +532,14 @@ advanced usages. The documentation for releases and `main` are available here: * [`main`](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/) -* [1.10.0](https://pointfreeco.github.io/swift-composable-architecture/1.10.0/documentation/composablearchitecture/) ([migration guide](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.10)) +* [1.11.0](https://pointfreeco.github.io/swift-composable-architecture/1.11.0/documentation/composablearchitecture/) ([migration guide](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.11))
Other versions + * [1.10.0](https://pointfreeco.github.io/swift-composable-architecture/1.10.0/documentation/composablearchitecture/) ([migration guide](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.10)) * [1.9.0](https://pointfreeco.github.io/swift-composable-architecture/1.9.0/documentation/composablearchitecture/) ([migration guide](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.9)) * [1.8.0](https://pointfreeco.github.io/swift-composable-architecture/1.8.0/documentation/composablearchitecture/) ([migration guide](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.8)) * [1.7.0](https://pointfreeco.github.io/swift-composable-architecture/1.7.0/documentation/composablearchitecture/) ([migration guide](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.7)) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides.md b/Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides.md index b8859fac3a4d..2f21796b1256 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides.md @@ -14,6 +14,7 @@ APIs, and these guides contain tips to do so. ## Topics +- - - - diff --git a/Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigrationTo1.11.md b/Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigratingTo1.11.md similarity index 100% rename from Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigrationTo1.11.md rename to Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigratingTo1.11.md diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/AppStorageKey.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/AppStorageKey.md index 75f5f39268c8..12c12fc5cd01 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Extensions/AppStorageKey.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/AppStorageKey.md @@ -28,3 +28,7 @@ - ``PersistenceReaderKey/appStorage(_:)-5jsie`` - ``AppStorageKeyPathKey`` + +### Overriding app storage + +- ``Dependencies/DependencyValues/defaultAppStorage`` diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/FileStorageKey.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/FileStorageKey.md index 235f7eed1c33..93e39cda90f7 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Extensions/FileStorageKey.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/FileStorageKey.md @@ -8,6 +8,7 @@ ### Overriding storage +- ``Dependencies/DependencyValues/defaultFileStorage`` - ``FileStorage`` ### Deprecations diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/InMemoryKey.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/InMemoryKey.md index d7bb6912b3f8..882b9b1a7597 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Extensions/InMemoryKey.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/InMemoryKey.md @@ -8,4 +8,5 @@ ### Overriding storage +- ``Dependencies/DependencyValues/defaultInMemoryStorage`` - ``InMemoryStorage`` diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/Reducer.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/Reducer.md index b5fe21eafcfb..58d73a7467a2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Extensions/Reducer.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/Reducer.md @@ -33,6 +33,7 @@ - ``EmptyReducer`` - ``BindingReducer`` +- ``Swift/Optional`` ### Reducer modifiers diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/Store.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/Store.md index 3ef99676c7e9..aaaabb7497fd 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Extensions/Store.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/Store.md @@ -29,8 +29,7 @@ ### Scoping store bindings -- ``SwiftUI/Binding/scope(state:action:fileID:line:)`` -- ``SwiftUI/Binding/scope(state:action:)-35r82`` +- ``SwiftUI/Binding`` ### Combine integration diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBinding.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBinding.md new file mode 100644 index 000000000000..51befaf3fe88 --- /dev/null +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBinding.md @@ -0,0 +1,19 @@ +# ``SwiftUI/Binding`` + +Learn how SwiftUI's `Binding` type has been extended for the Composable Architecture + +## Overview + +A binding to a ``Store``is extended with several unique scoping operations that can be used to power +controls and drive navigation. + +## Topics + +### Control bindings + +- ``SwiftUI/Binding/subscript(dynamicMember:)`` + +### Navigation bindings + +- ``SwiftUI/Binding/scope(state:action:fileID:line:)`` +- ``SwiftUI/Binding/scope(state:action:)-35r82`` diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingScopeForEach.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingScopeForEach.md new file mode 100644 index 000000000000..940baa438905 --- /dev/null +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingScopeForEach.md @@ -0,0 +1,8 @@ +# ``SwiftUI/Binding/scope(state:action:)-35r82`` + +## Topics + +### Bindable + +- ``SwiftUI/Bindable/scope(state:action:)`` +- ``Perception/Bindable/scope(state:action:)`` diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingScopeIfLet.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingScopeIfLet.md new file mode 100644 index 000000000000..a0938ea0b842 --- /dev/null +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingScopeIfLet.md @@ -0,0 +1,8 @@ +# ``SwiftUI/Binding/scope(state:action:fileID:line:)`` + +## Topics + +### Bindable + +- ``SwiftUI/Bindable/scope(state:action:fileID:line:)`` +- ``Perception/Bindable/scope(state:action:fileID:line:)`` diff --git a/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingSubscript.md b/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingSubscript.md new file mode 100644 index 000000000000..60fd41d21e58 --- /dev/null +++ b/Sources/ComposableArchitecture/Documentation.docc/Extensions/SwiftUIBindingSubscript.md @@ -0,0 +1,8 @@ +# ``SwiftUI/Binding/subscript(dynamicMember:)`` + +## Topics + +### Bindable + +- ``SwiftUI/Bindable/subscript(dynamicMember:)`` +- ``Perception/Bindable/subscript(dynamicMember:)``