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
24 changes: 11 additions & 13 deletions Glint/Chrome/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -405,20 +405,15 @@ struct ToolbarHeader: View {
GlintBrandMark()
.padding(.trailing, 10)

// With the sidebar collapsed the workspace switcher joins
// the leading capsule (Photos-style cluster) instead of
// floating as its own island; a hairline seam separates it
// from the brand.
if store.sidebarCollapsed {
if floating {
Rectangle()
.fill(Theme.overlay(0.10))
.frame(width: 1, height: 16)
}
WorkspaceSwitcher()
.padding(.leading, floating ? 0 : 6)
.transition(.opacity.combined(with: .move(edge: .leading)))
// Keep the current workspace available in both sidebar
// layouts, including its stable accessibility identity.
if floating {
Rectangle()
.fill(Theme.overlay(0.10))
.frame(width: 1, height: 16)
}
WorkspaceSwitcher()
.padding(.leading, floating ? 0 : 6)
}
.liquidGlass(enabled: floating, cornerRadius: 19, tint: Theme.glassTint)
.arrowPointer()
Expand Down Expand Up @@ -1699,6 +1694,9 @@ private struct WorkspaceSwitcher: View {
.fixedSize()
}
.buttonStyle(.plain)
.accessibilityIdentifier("current-workspace")
.accessibilityLabel(Text(verbatim: currentName))
.accessibilityValue(Text(verbatim: currentName))
.onHover { hover = $0 }
.popover(isPresented: $isOpen, arrowEdge: .bottom) {
WorkspaceSwitcherPopover { isOpen = false }
Expand Down
3 changes: 2 additions & 1 deletion Glint/Chrome/SidebarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,8 @@ private struct WorkspaceCard: View {
// name (verbatim — user data); value = the same status line the
// card renders visually, with the elapsed time spelled out.
.accessibilityElement(children: .combine)
.accessibilityAddTraits(.isButton)
.accessibilityAddTraits(active ? [.isButton, .isSelected] : [.isButton])
.accessibilityIdentifier("workspace-\(ws.id.uuidString)")
.accessibilityLabel(Text(verbatim: ws.displayName))
.accessibilityValue(Text(verbatim: archived
? String(localized: "Archived")
Expand Down
Loading