From 0c1d0c8f7121ba35ca5b6c3763f5b79360db1210 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Wed, 25 Mar 2026 00:57:48 +0700 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20welcome=20window=20UX=20polish=20?= =?UTF-8?q?=E2=80=94=20Escape,=20focus,=20Cmd+A,=20Return=20hint,=20menu?= =?UTF-8?q?=20colors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Connection/WelcomeWindowView.swift | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/TablePro/Views/Connection/WelcomeWindowView.swift b/TablePro/Views/Connection/WelcomeWindowView.swift index a295c41b..e46aacf2 100644 --- a/TablePro/Views/Connection/WelcomeWindowView.swift +++ b/TablePro/Views/Connection/WelcomeWindowView.swift @@ -115,6 +115,7 @@ struct WelcomeWindowView: View { .frame(minWidth: 650, minHeight: 400) .onAppear { loadConnections() + focus = .search } .confirmationDialog( connectionsToDelete.count == 1 @@ -241,6 +242,7 @@ struct WelcomeWindowView: View { // Footer hints HStack(spacing: 16) { SyncStatusIndicator() + KeyboardHint(keys: "↵", label: "Connect") KeyboardHint(keys: "⌘N", label: "New") KeyboardHint(keys: "⌘,", label: "Settings") } @@ -302,6 +304,13 @@ struct WelcomeWindowView: View { connectSelectedConnections() return .handled } + .onKeyPress(.escape) { + if !searchText.isEmpty { + searchText = "" + } + focus = .connectionList + return .handled + } .onKeyPress(characters: .init(charactersIn: "\u{7F}\u{08}"), phases: .down) { keyPress in guard keyPress.modifiers.contains(.command) else { return .ignored } let toDelete = selectedConnections @@ -418,6 +427,17 @@ struct WelcomeWindowView: View { showDeleteConfirmation = true return .handled } + .onKeyPress(characters: .init(charactersIn: "a"), phases: .down) { keyPress in + guard keyPress.modifiers.contains(.command) else { return .ignored } + selectedConnectionIds = Set(flatVisibleConnections.map(\.id)) + return .handled + } + .onKeyPress(.escape) { + if !selectedConnectionIds.isEmpty { + selectedConnectionIds = [] + } + return .handled + } .onKeyPress(characters: .init(charactersIn: "jn"), phases: [.down, .repeat]) { keyPress in guard keyPress.modifiers.contains(.control) else { return .ignored } moveToNextConnection() @@ -661,17 +681,11 @@ struct WelcomeWindowView: View { Button { moveConnections(targets, toGroup: group.id) } label: { - HStack { - if !group.color.isDefault { - Circle() - .fill(group.color.color) - .frame(width: 8, height: 8) - } + if !group.color.isDefault { + Label(group.name, systemImage: "circle.fill") + .foregroundStyle(group.color.color) + } else { Text(group.name) - if currentGroupId == group.id { - Spacer() - Image(systemName: "checkmark") - } } } .disabled(currentGroupId == group.id) From 56192815e09b50b711d8b6092247147c015d9cd7 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Wed, 25 Mar 2026 00:59:42 +0700 Subject: [PATCH 2/2] fix: restore checkmark indicator for current group in Move to Group menu --- TablePro/Views/Connection/WelcomeWindowView.swift | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/TablePro/Views/Connection/WelcomeWindowView.swift b/TablePro/Views/Connection/WelcomeWindowView.swift index e46aacf2..c3793e18 100644 --- a/TablePro/Views/Connection/WelcomeWindowView.swift +++ b/TablePro/Views/Connection/WelcomeWindowView.swift @@ -681,11 +681,16 @@ struct WelcomeWindowView: View { Button { moveConnections(targets, toGroup: group.id) } label: { - if !group.color.isDefault { - Label(group.name, systemImage: "circle.fill") - .foregroundStyle(group.color.color) - } else { + HStack { + if !group.color.isDefault { + Image(systemName: "circle.fill") + .foregroundStyle(group.color.color) + } Text(group.name) + if currentGroupId == group.id { + Spacer() + Image(systemName: "checkmark") + } } } .disabled(currentGroupId == group.id)