Skip to content

Commit fb3ece2

Browse files
committed
feat(toolbar): make connection selectors navigational and move refresh/save to the trailing side
1 parent abf34b1 commit fb3ece2

4 files changed

Lines changed: 212 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
- Connection list rows show the database name after the host, so connections that share a name and host are easier to tell apart. (#1535)
2121
- Save as Favorite uses Cmd+D again. The Cmd+Control+D set in 0.47.0 is reserved by macOS for Look Up, so it never fired.
2222
- Editor toolbar buttons show their keyboard shortcut in the tooltip, and it updates if you rebind the shortcut.
23+
- Window toolbar layout: the connection and database selectors are now navigation items pinned to the left, and the Refresh and Save buttons move to the right next to the tab and query controls. Toolbars customized before this change reset once to the new layout.
2324

2425
### Fixed
2526

TablePro/Core/Services/Infrastructure/MainWindowToolbar.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import TableProPluginKit
1313
internal final class MainWindowToolbar: NSObject, NSToolbarDelegate {
1414
private static let lifecycleLogger = Logger(subsystem: "com.TablePro", category: "NativeTabLifecycle")
1515

16-
internal static let toolbarIdentifier = NSToolbar.Identifier("com.TablePro.main.toolbar")
16+
internal static let toolbarIdentifier = NSToolbar.Identifier("com.TablePro.main.toolbar.v2")
1717

1818
weak var coordinator: MainContentCoordinator?
1919

@@ -77,9 +77,9 @@ internal final class MainWindowToolbar: NSObject, NSToolbarDelegate {
7777
Self.sidebarToggle,
7878
.sidebarTrackingSeparator,
7979
Self.connectionGroup,
80-
Self.refreshSaveGroup,
8180
Self.principal,
8281
.flexibleSpace,
82+
Self.refreshSaveGroup,
8383
Self.quickSwitcher,
8484
Self.newTab,
8585
Self.previewSQL,
@@ -110,7 +110,7 @@ internal final class MainWindowToolbar: NSObject, NSToolbarDelegate {
110110
case Self.sidebarToggle:
111111
return makeSidebarToggleItem(coordinator: coordinator)
112112
case Self.connectionGroup:
113-
return makeGroup(
113+
let group = makeGroup(
114114
id: itemIdentifier,
115115
label: String(localized: "Connection"),
116116
subitems: [subitemConnection(), subitemDatabase()],
@@ -119,6 +119,8 @@ internal final class MainWindowToolbar: NSObject, NSToolbarDelegate {
119119
DatabaseToolbarButton(coordinator: coordinator)
120120
}
121121
)
122+
group.isNavigational = true
123+
return group
122124
case Self.principal:
123125
let item = hostingItem(
124126
id: itemIdentifier,

0 commit comments

Comments
 (0)