The sidebar's Actions section retires — Delete and Reveal in Finder move to the card window's toolbar
Actions is gone from the trailing sidebar. Its two rows land on the card
window's toolbar instead: Delete Card is a new default item (trash SF
Symbol), and Reveal in Finder joins the customizable catalog. The sidebar's
final order is now Style, Details, Attachments — no fourth section.
Delete Card is a push button gated by the same read-only predicate the
sidebar button carried, and it fires the identical write
(BoardStore.deleteCard(_:)) — same bracket, same stamps, no confirmation,
matching the delete flow exactly: recovery is the board's trash lane, so
there is nothing here for an alert to guard. It sits behind a trailing
flexibleSpace in the default set, apart from the four creation/view items
ahead of it, the HIG separation Mail.app's own toolbar Delete models —
one-click, no-confirm, recoverable by trash.
Reveal in Finder is catalog-only: it already had a menu-bar twin with no
default chord (File ▸ Reveal in Finder / RevealInFinderCommand), so nothing
was unreachable before this — the toolbar item is Customize's shortcut to
the same computation (CardAttachments.revealURLs), not a new path.
Delete Card needed a menu-row twin of its own before it could sit on the
toolbar at all ("toolbars are pure enhancement: every function they host
already has a menu item + shortcut" — 03-board-ui.md ▸ Toolbar). File ▸
Delete Card is that row: distinctly titled from the board-scope File ▸
Delete (whose title 11-command-nexus.md calls out as the ⌘⌫ chord's
singleton), and deliberately chord-less — an enabled delete-key equivalent
in the card window would steal delete-to-line-start from its text surfaces,
the same reason the board's own ⌘⌫ was never extended here in the first
place. A new small handle, CardWindowActions, carries the wiring through the
focus system the way CardAttachments and CardPrintSubject already do for
their own single-purpose seams — kept separate from CardAttachments on
purpose, since a delete has nothing to do with the attachments section that
type is scoped to.
CardToolbarTests grows the BoardToolbarTests split (defaults vs. catalog,
now that they differ) plus two new suites: Delete Card firing the wired
write under the lock, and Reveal in Finder's enablement mirroring the menu
row's own card-window computation.
05-card-window.md's Actions section and 11-command-nexus.md's File-menu
inventory are now stale; both amendments are owed and tracked on the card's
own thread rather than made here.
Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
@@ -69,12 +69,14 @@ struct CardWindowView: View {
|
||||
/// The board this card belongs to.
|
||||
///
|
||||
/// The one place in this window a whole store is handed to a view rather than a narrow seam, and
|
||||
/// the sidebar is why: the Style section hosts the **shared** style editor, whose API is
|
||||
/// store-shaped by design (it reads the target set's current values and writes through the one
|
||||
/// `applyStyle` bracket every anchor shares), and the Actions section's Delete is the store's own
|
||||
/// move-to-trash. Routing either through a closure of this window's own would be a second
|
||||
/// card-styling or card-deleting path to keep in step with the first — exactly what "one
|
||||
/// component, one behavior" and "exactly the ⌫ delete" forbid.
|
||||
/// the Style section is why: it hosts the **shared** style editor, whose API is store-shaped by
|
||||
/// design (it reads the target set's current values and writes through the one `applyStyle`
|
||||
/// bracket every anchor shares). Routing it through a closure of this window's own would be a
|
||||
/// second card-styling path to keep in step with the first — exactly what "one component, one
|
||||
/// behavior" forbids. Delete moved off the sidebar's own Actions section and onto the card
|
||||
/// window's toolbar (`CardToolbar`, `CardWindowActions`) — still the store's own move-to-trash,
|
||||
/// still "exactly the ⌫ delete", just reached through the host's toolbar wiring rather than this
|
||||
/// view.
|
||||
let store: BoardStore
|
||||
/// The app-wide quick-style recents the embedded editor feeds (03-board-ui.md ▸ Styling ▸
|
||||
/// Controls) — app state, not board state, which is why it arrives beside the store rather than
|
||||
@@ -398,21 +400,23 @@ struct CardWindowView: View {
|
||||
|
||||
// MARK: - Attributes sidebar
|
||||
|
||||
/// The sidebar's sections, **reordered 2026-08-09** (Pipeline card 8f26b029) so **Attachments
|
||||
/// sits at the bottom of the stack**: Style, Details, Actions, Attachments. Section internals are
|
||||
/// untouched — this is ordering only, and it is exactly the `VStack`'s child order, so keyboard
|
||||
/// Tab order and VoiceOver's reading order follow it for free; ⇧⌘A (`AddAttachmentCommand`)
|
||||
/// still opens the same file panel regardless of where the section sits in the stack, since it
|
||||
/// reaches the window through the focus system rather than through this view's layout.
|
||||
/// The sidebar's sections: **Style, Details, Attachments** — Attachments at the bottom of the
|
||||
/// stack (reordered 2026-08-09, Pipeline card 8f26b029), Actions gone entirely (retired the same
|
||||
/// day, Pipeline card bcd3b323): its Delete and Reveal in Finder are now the card window's own
|
||||
/// toolbar items (`CardToolbar`), reachable from Customize and, for Delete, on by default. This
|
||||
/// is exactly the `VStack`'s child order, so keyboard Tab order and VoiceOver's reading order
|
||||
/// follow it for free; ⇧⌘A (`AddAttachmentCommand`) still opens the same file panel regardless of
|
||||
/// where Attachments sits in the stack, since it reaches the window through the focus system
|
||||
/// rather than through this view's layout.
|
||||
///
|
||||
/// 05-card-window.md ▸ The attributes sidebar still documents the pathfinder's original order
|
||||
/// (Attachments, Style, Details, Actions) — an owed amendment, tracked on that card's own thread
|
||||
/// rather than made here.
|
||||
/// 05-card-window.md ▸ The attributes sidebar still documents the pathfinder's four-section order
|
||||
/// with Actions at the bottom — an owed amendment, tracked on the two cards' own threads rather
|
||||
/// than made here.
|
||||
///
|
||||
/// One of the four is conditional, and the condition is the section's own rather than a rule
|
||||
/// restated here: **Details** renders nothing when the card carries no unknown frontmatter keys
|
||||
/// ("shown only when any exist"). Everything else in the stack is unconditional, so the
|
||||
/// composition a user learns on one card is the composition they get on the next.
|
||||
/// One of the two remaining sections is conditional, and the condition is the section's own
|
||||
/// rather than a rule restated here: **Details** renders nothing when the card carries no unknown
|
||||
/// frontmatter keys ("shown only when any exist"). Style and Attachments are unconditional, so
|
||||
/// the composition a user learns on one card is the composition they get on the next.
|
||||
///
|
||||
/// The History section that once sat between Details and Actions left with app-managed git
|
||||
/// (strategy/01-git-excision.md, 2026-08-08); View ▸ History (`FutureCommands.swift`) is the only
|
||||
@@ -426,8 +430,6 @@ struct CardWindowView: View {
|
||||
// keys and their order included, and `Card` has carried it since (`BoardModel`).
|
||||
CardDetailsSection(rows: CardDetails.rows(of: card.document))
|
||||
|
||||
CardActionsSection(store: store, cardID: card.id, cardFolder: cardFolder)
|
||||
|
||||
CardAttachmentsSection(attachments: attachments, thumbnails: thumbnails)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
Reference in New Issue
Block a user