git.iko.soy/parseable-macos
on master help sign in
Refactor connection selector to use Picker instead of Menu (#23)

* Replace ellipsis.circle icon with chevron selector in instance switcher Swap the three-dots-in-a-circle menu icon for a standard chevron.up.chevron.down disclosure indicator on the connection selector button in the sidebar. https://claude.ai/code/session_01AgvgRrMvWwhjxZTrVbdWCH * Replace instance selector with native Picker dropdown Change the connection selector from a custom Menu with an icon label to a standard SwiftUI Picker with .menu style, giving a native macOS dropdown appearance. The green/red status circle is preserved, and connection management actions (add, edit, disconnect) are moved to a separate gear icon menu. https://claude.ai/code/session_01AgvgRrMvWwhjxZTrVbdWCH --------- Co-authored-by: Claude <noreply@anthropic.com>

commitb3a700aa9d6861e2c14b422ac07cd46a58d5fba4 authoriko <mail@iko.soy> dateSun 15 Feb 2026, 18:57 (8 months ago) parent5ef360a
1 file changed+15−13
ParseableViewer/Views/SidebarView.swift+15−13
ParseableViewer/Views/SidebarView.swift+15−13
@@ -208,17 +208,23 @@ struct ConnectionStatusView: View {
208208 .fill(appState.isConnected ? .green : .red)
209209 .frame(width: 8, height: 8)
210210 .accessibilityLabel(appState.isConnected ? "Connected" : "Disconnected")
211− Text(connection.name)
212− .font(.headline)
213− .lineLimit(1)
214− Spacer()
215− Menu {
216− ForEach(appState.connections) { conn in
217− Button(conn.name) {
211+ Picker("Connection", selection: Binding<UUID>(
212+ get: { connection.id },
213+ set: { newID in
214+ if let conn = appState.connections.first(where: { $0.id == newID }) {
218215 Task { await appState.connect(to: conn) }
219216 }
220217 }
221− Divider()
218+ )) {
219+ ForEach(appState.connections) { conn in
220+ Text(conn.name).tag(conn.id)
221+ }
222+ }
223+ .labelsHidden()
224+ .pickerStyle(.menu)
225+ .accessibilityLabel("Connection selector")
226+ Spacer()
227+ Menu {
222228 Button("Add Connection...") {
223229 appState.editingConnection = nil
224230 appState.showConnectionSheet = true
@@ -232,16 +238,12 @@ struct ConnectionStatusView: View {
232238 appState.disconnect()
233239 }
234240 } label: {
235− Image(systemName: "ellipsis.circle")
241+ Image(systemName: "gear")
236242 }
237243 .menuStyle(.borderlessButton)
238244 .frame(width: 24)
239245 .accessibilityLabel("Connection options")
240246 }
241− Text(connection.url)
242− .font(.caption)
243− .foregroundStyle(.secondary)
244− .lineLimit(1)
245247 } else if appState.isConnecting {
246248 HStack {
247249 ProgressView()