Build the board popover — title widget, rename, styling, git slot
The window-title widget arrives as a leading titlebar accessory — a quiet chevron on board windows only, installed and removed by the window controller's own attach lifecycle — anchoring the one board-level surface as a transient popover (the board window deliberately grows no toolbar item for it). Inside: board rename editing frontmatter title only (the folder is never renamed; an empty commit removes the key and the window title falls back to the folder name), the embedded shared style editor permanently targeting the board, and the labeled Git section that this milestone only reserves — a mode-none explanation and a disabled stub where m7's add-git, branch, remote, and authentication controls land. Cmd-I (File > Board Info) toggles it per window through a focused scene value, kept apart from board-scoped transient state since a titlebar popover belongs to one window, not to the board. Escape reverts a dirty rename field and falls through to dismiss otherwise; a foreign rename resyncs the field only while unfocused. 12 new tests. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -87,6 +87,36 @@ struct BoardCreationCommands: View {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Board Info
|
||||
|
||||
/// File ▸ Board Info (⌘I) — the board popover's keyboard path (11-command-nexus.md; class **C**,
|
||||
/// whose "keyboard path is reachability (Board Info ⌘I + Tab-reachable controls), not bindings").
|
||||
///
|
||||
/// **It toggles**, because the popover's other entry point is a disclosure widget and a shortcut
|
||||
/// that could only ever open would leave the surface with no keyboard way out.
|
||||
///
|
||||
/// Two focused values, both required: the store is what makes this a *board window* item (the
|
||||
/// scope 11 gives the row), and the presentation is the window's own popover flag — see
|
||||
/// `BoardInfoPresentation` for why the flag is per window rather than per board.
|
||||
///
|
||||
/// **Validation is scope and nothing else.** Neither the read-only lock nor the focused-editor rule
|
||||
/// closes it, unlike every mutating item above: the popover is *configuration* (04-interactions.md
|
||||
/// ▸ The map's carve-out), a locked board is exactly when a user wants to read its title and
|
||||
/// styling, and the controls inside disable themselves.
|
||||
struct BoardInfoCommand: View {
|
||||
|
||||
@FocusedValue(\.boardStore) private var store
|
||||
@FocusedValue(\.boardInfo) private var presentation
|
||||
|
||||
var body: some View {
|
||||
Button("Board Info") {
|
||||
presentation?.toggle()
|
||||
}
|
||||
.keyboardShortcut("i", modifiers: .command)
|
||||
.disabled(store == nil || presentation == nil)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Rename
|
||||
|
||||
/// Board ▸ Rename — no default chord, deliberately (11-command-nexus.md: "— (cards: Return in
|
||||
|
||||
Reference in New Issue
Block a user