Skip to content

Commit 4a5d2ec

Browse files
committed
Merge remote-tracking branch 'origin/main' into binding-store
2 parents 20a38e3 + 438a795 commit 4a5d2ec

File tree

80 files changed

+107
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+107
-117
lines changed

Examples/Standups/Dependencies/DataManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ extension DataManager {
4242
}
4343

4444
static let failToWrite = Self(
45-
load: { url in Data() },
46-
save: { data, url in
45+
load: { _ in Data() },
46+
save: { _, _ in
4747
struct SaveError: Error {}
4848
throw SaveError()
4949
}
@@ -54,6 +54,6 @@ extension DataManager {
5454
struct LoadError: Error {}
5555
throw LoadError()
5656
},
57-
save: { newData, url in }
57+
save: { _, _ in }
5858
)
5959
}

Examples/Standups/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The inspiration for this application comes Apple's [Scrumdinger][scrumdinger] tu
1212
> that shows the time remaining in the meeting and creates a transcript that users can refer to
1313
> later.
1414
15-
The Scrumdinger app is one of Apple's most interesting code samples as it deals with many real world
15+
The Scrumdinger app is one of Apple's most interesting code samples as it deals with many real
1616
world problems that one faces in application development. It shows off many types of navigation,
1717
it deals with complex effects such as timers and speech recognition, and it persists application
1818
data to disk.
@@ -34,10 +34,10 @@ modern, best practices for SwiftUI development. We faithfully recreate the Scrum
3434
some key additions:
3535

3636
1. Identifiers are made type safe using our [Tagged library][tagged-gh]. This prevents us from
37-
writing non-sensical code, such as comparing a `Standup.ID` to a `Attendee.ID`.
37+
writing nonsensical code, such as comparing a `Standup.ID` to a `Attendee.ID`.
3838
2. Instead of using bare arrays in feature logic we use an "identified" array from our
3939
[IdentifiedCollections][identified-collections-gh] library. This allows you to read and modify
40-
elements of the collection via their ID rather than positional index, which can be error prone
40+
elements of the collection via their ID rather than positional index, which can be error-prone
4141
and lead to bugs or crashes.
4242
3. _All_ navigation is driven off of state, including sheets, drill-downs and alerts. This makes
4343
it possible to deep link into any screen of the app by just constructing a piece of state and
@@ -61,4 +61,4 @@ some key additions:
6161
[scrumdinger-dl]: https://docs-assets.developer.apple.com/published/1ea2eec121b90031e354288912a76357/TranscribingSpeechToText.zip
6262
[tagged-gh]: http://github.com/pointfreeco/swift-tagged
6363
[identified-collections-gh]: http://github.com/pointfreeco/swift-identified-collections
64-
[dependencies-gh]: http://github.com/pointfreeco/swift-dependencies
64+
[dependencies-gh]: http://github.com/pointfreeco/swift-dependencies

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ The following translations of this README have been contributed by members of th
613613

614614
* [Arabic](https://gist.github.com/NorhanBoghdadi/1b98d55c02b683ddef7e05c2ebcccd47)
615615
* [French](https://gist.github.com/nikitamounier/0e93eb832cf389db12f9a69da030a2dc)
616+
* [Hindi](https://gist.github.com/akashsoni01/b358ee0b3b747167964ef6946123c88d)
616617
* [Indonesian](https://gist.github.com/wendyliga/792ea9ac5cc887f59de70a9e39cc7343)
617618
* [Italian](https://gist.github.com/Bellaposa/5114e6d4d55fdb1388e8186886d48958)
618619
* [Japanese](https://gist.github.com/kalupas226/bdf577e4a7066377ea0a8aaeebcad428)

Sources/ComposableArchitecture/Documentation.docc/Articles/StackBasedNavigation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ model your domains, how to integrate features, how to test your features, and mo
77

88
Stack-based navigation is the process of modeling navigation using collections of state. This style
99
of navigation allows you to deep-link into any state of your application by simply constructing a
10-
flat collection of data, handing, handing it off to SwiftUI, and letting it take care of the rest.
10+
flat collection of data, handing it off to SwiftUI, and letting it take care of the rest.
1111
It also allows for complex and recursive navigation paths in your application.
1212

1313
* [Basics](#Basics)
@@ -102,7 +102,7 @@ struct RootFeature: ReducerProtocol {
102102

103103
That completes the steps to integrate the child and parent features together for a navigation stack.
104104

105-
Next we must integrate the child and parent views together. This is done by construct a special
105+
Next we must integrate the child and parent views together. This is done by constructing a special
106106
version of SwiftUI's `NavigationStack` view that comes with this library, called
107107
``NavigationStackStore``. This view takes 3 arguments: a store focused in on ``StackState``
108108
and ``StackAction`` in your domain, a trailing view builder for the root view of the stack, and

Sources/ComposableArchitecture/Documentation.docc/Articles/WhatIsNavigation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ few bugs in `NavigationStack`, but on average it is a lot more stable.
273273

274274
* Stack-based navigation is not a concise tool. It makes it possible to expressive navigation
275275
paths that are completely non-sensical. For example, even though it only makes sense to navigate
276-
to an edit screen from an edit screen, in a stack it would be possible to present the features
276+
to an edit screen from a detail screen, in a stack it would be possible to present the features
277277
in the reverse order:
278278

279279
```swift

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0000.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Foundation
12
import ComposableArchitecture
23

34
struct Contact: Equatable, Identifiable {
@@ -9,7 +10,7 @@ struct ContactsFeature: ReducerProtocol {
910
struct State: Equatable {
1011
var contacts: IdentifiedArrayOf<Contact> = []
1112
}
12-
enum Action {
13+
enum Action: Equatable {
1314
case addButtonTapped
1415
}
1516
var body: some ReducerProtocolOf<Self> {

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0003.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ struct AddContactFeature: ReducerProtocol {
44
struct State: Equatable {
55
var contact: Contact
66
}
7-
enum Action {
7+
enum Action: Equatable {
88
case cancelButtonTapped
99
case saveButtonTapped
1010
case setName(String)

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0000.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ struct ContactsFeature: ReducerProtocol {
22
struct State: Equatable {
33
var contacts: IdentifiedArrayOf<Contact> = []
44
}
5-
enum Action {
5+
enum Action: Equatable {
66
case addButtonTapped
77
}
88
var body: some ReducerProtocolOf<Self> {

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0001.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ struct ContactsFeature: ReducerProtocol {
33
@PresentationState var addContact: AddContactFeature.State?
44
var contacts: IdentifiedArrayOf<Contact> = []
55
}
6-
enum Action {
6+
enum Action: Equatable {
77
case addButtonTapped
88
}
99
var body: some ReducerProtocolOf<Self> {

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0002.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ struct ContactsFeature: ReducerProtocol {
33
@PresentationState var addContact: AddContactFeature.State?
44
var contacts: IdentifiedArrayOf<Contact> = []
55
}
6-
enum Action {
6+
enum Action: Equatable {
77
case addButtonTapped
88
case addContact(PresentationAction<AddContactFeature.Action>)
99
}

0 commit comments

Comments
 (0)