Merge pull request 'fix: single keyboard Done toolbar on Complete Task (closes #5)' (#8) from fix/5-double-done-button into master
Android UI Tests / ui-tests (push) Has been cancelled
Android UI Tests / ui-tests (push) Has been cancelled
Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
@@ -120,7 +120,6 @@ struct CompleteTaskView: View {
|
|||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
.padding(.leading, 12)
|
.padding(.leading, 12)
|
||||||
.keyboardDismissToolbar()
|
|
||||||
.accessibilityIdentifier(AccessibilityIdentifiers.Task.actualCostField)
|
.accessibilityIdentifier(AccessibilityIdentifiers.Task.actualCostField)
|
||||||
} label: {
|
} label: {
|
||||||
Label(L10n.Tasks.actualCost, systemImage: "dollarsign.circle")
|
Label(L10n.Tasks.actualCost, systemImage: "dollarsign.circle")
|
||||||
@@ -142,7 +141,6 @@ struct CompleteTaskView: View {
|
|||||||
TextEditor(text: $notes)
|
TextEditor(text: $notes)
|
||||||
.frame(minHeight: 100)
|
.frame(minHeight: 100)
|
||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.keyboardDismissToolbar()
|
|
||||||
.accessibilityIdentifier(AccessibilityIdentifiers.Task.notesField)
|
.accessibilityIdentifier(AccessibilityIdentifiers.Task.notesField)
|
||||||
}
|
}
|
||||||
} footer: {
|
} footer: {
|
||||||
@@ -289,6 +287,12 @@ struct CompleteTaskView: View {
|
|||||||
.background(WarmGradientBackground())
|
.background(WarmGradientBackground())
|
||||||
.navigationTitle(L10n.Tasks.completeTask)
|
.navigationTitle(L10n.Tasks.completeTask)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
// ONE keyboard "Done" toolbar at the form root — per-field
|
||||||
|
// `.keyboardDismissToolbar()` modifiers each install a
|
||||||
|
// separate `ToolbarItemGroup(placement: .keyboard)`, and
|
||||||
|
// SwiftUI stacks them on the responder chain so any focused
|
||||||
|
// field renders multiple Done buttons side-by-side (issue #5).
|
||||||
|
.keyboardDismissToolbar()
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .cancellationAction) {
|
ToolbarItem(placement: .cancellationAction) {
|
||||||
Button(L10n.Common.cancel) {
|
Button(L10n.Common.cancel) {
|
||||||
|
|||||||
Reference in New Issue
Block a user