-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix focus in tutorial #3072
Fix focus in tutorial #3072
Changes from 6 commits
e51dee0
bcf06b9
e61b84a
0c67f8d
5f35f35
e78dc7a
786ee7e
efb80ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ struct SyncUpForm { | |
case .binding: | ||
return .none | ||
|
||
case let .onDeleteAttendees(indexSet): | ||
state.syncUp.attendees.remove(atOffsets: indexSet) | ||
case let .onDeleteAttendees(indices): | ||
state.syncUp.attendees.remove(atOffsets: indices) | ||
Comment on lines
-24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. settling on |
||
if state.syncUp.attendees.isEmpty { | ||
state.syncUp.attendees.append( | ||
Attendee(id: Attendee.ID()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,10 +39,9 @@ struct SyncUpDetail { | |
Reduce { state, action in | ||
switch action { | ||
case .alert(.presented(.confirmButtonTapped)): | ||
return .run { send in | ||
await send(.delegate(.deleteSyncUp(id: state.syncUp.id))) | ||
await dismiss() | ||
} | ||
@Shared(.fileStorage(.syncUps)) var syncUps: IdentifiedArrayOf<SyncUp> = [] | ||
syncUps.remove(id: state.syncUp.id) | ||
return .run { _ in await dismiss() } | ||
Comment on lines
-42
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was brought up in an email, but we had some old delegate code in the tutorial still. |
||
|
||
case .alert(.dismiss): | ||
return .none | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,6 @@ struct SyncUpDetail { | |
case destination(PresentationAction<Destination.Action>) | ||
case doneEditingButtonTapped | ||
case editButtonTapped | ||
@CasePathable | ||
enum Alert { | ||
Comment on lines
-28
to
-29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was also brought up in an email. we have some extra |
||
case confirmButtonTapped | ||
} | ||
} | ||
|
||
@Dependency(\.dismiss) var dismiss | ||
|
@@ -37,10 +33,9 @@ struct SyncUpDetail { | |
Reduce { state, action in | ||
switch action { | ||
case .alert(.presented(.confirmButtonTapped)): | ||
return .run { send in | ||
await send(.delegate(.deleteSyncUp(id: state.syncUp.id))) | ||
await dismiss() | ||
} | ||
@Shared(.fileStorage(.syncUps)) var syncUps: IdentifiedArrayOf<SyncUp> = [] | ||
syncUps.remove(id: state.syncUp.id) | ||
return .run { _ in await dismiss() } | ||
|
||
case .alert(.dismiss): | ||
return .none | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's just drop the tagged digression. it's causing too much confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It helped me to re-discover tagged again. I agree - it can be confusing for junior devs, but it's a pity.