Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- The connection form opens with the Name field focused, Return or the Down arrow in the welcome search moves to the connection list, and focus returns to the list after a sheet closes, so you can set up a connection without the mouse. (#1490)
- Escape now dismisses search-based sheets and popovers (database switcher, quick switcher, column and connection pickers). Pressing Escape clears the search text first; a second Escape closes the sheet. (#1490)
- Running `EXPLAIN` or `EXPLAIN ANALYZE` typed in the editor now opens the plan viewer instead of squashing the plan into one truncated grid cell. (#1480)
- Filtering the data grid keeps you on the keyboard. Applying or clearing a filter returns focus to the grid so you can keep moving through cells, Return applies the filter, and Escape closes the filter panel and returns to the grid. (#1490)
Expand Down
4 changes: 3 additions & 1 deletion TablePro/Views/Components/ColorPaletteView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ struct ColorPaletteView: View {
var body: some View {
HStack(spacing: size.spacing) {
ForEach(colors) { color in
let isSelected = selectedColor == color
Button { selectedColor = color } label: {
ColorSwatch(color: color, isSelected: selectedColor == color, size: size)
ColorSwatch(color: color, isSelected: isSelected, size: size)
}
.buttonStyle(.plain)
.accessibilityLabel(String(format: String(localized: "Color %@"), color.rawValue))
.accessibilityAddTraits(isSelected ? [.isSelected] : [])
}
}
}
Expand Down
1 change: 1 addition & 0 deletions TablePro/Views/Connection/HostListFieldRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct HostListFieldRow: View {
ForEach(entries) { entry in
TextField("", text: bindingForEntry(entry), prompt: Text(verbatim: "hostname:\(defaultPort)"))
.tag(entry.id)
.accessibilityLabel(String(localized: "Host"))
}
}
.listStyle(.bordered(alternatesRowBackgrounds: false))
Expand Down
2 changes: 2 additions & 0 deletions TablePro/Views/Connection/OnboardingContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,15 @@ struct OnboardingContentView: View {
}
.buttonStyle(.borderedProminent)
.controlSize(.large)
.keyboardShortcut(.defaultAction)
.transition(.opacity)
} else {
Button("Get Started") {
completeOnboarding()
}
.buttonStyle(.borderedProminent)
.controlSize(.large)
.keyboardShortcut(.defaultAction)
.transition(.opacity)
}
}
Expand Down
3 changes: 3 additions & 0 deletions TablePro/Views/Connection/WelcomeWindowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct WelcomeWindowView: View {
vm.importResultCount = count
vm.pendingImportResultCount = nil
}
focus = .connectionList
}) { sheet in
switch sheet {
case .newGroup(let parentId):
Expand Down Expand Up @@ -279,6 +280,8 @@ struct WelcomeWindowView: View {
text: $vm.searchText,
placeholder: String(localized: "Search for connection..."),
controlSize: .regular,
onMoveDown: { focus = .connectionList },
onSubmit: { focus = .connectionList },
focusTrigger: searchFocusTrigger,
maxWidth: 240
)
Expand Down
3 changes: 3 additions & 0 deletions TablePro/Views/ConnectionForm/Panes/GeneralPaneView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import UniformTypeIdentifiers

struct GeneralPaneView: View {
@Bindable var coordinator: ConnectionFormCoordinator
@FocusState private var nameFocused: Bool

private var type: DatabaseType { coordinator.network.type }
private var connectionMode: ConnectionMode {
Expand All @@ -35,13 +36,15 @@ struct GeneralPaneView: View {
text: $coordinator.network.name,
prompt: Text(String(localized: "Connection name"))
)
.focused($nameFocused)
}

connectionSection
authenticationSection
testConnectionSection
}
.formStyle(.grouped)
.defaultFocus($nameFocused, true)
}

@ViewBuilder
Expand Down
Loading