Build the attachments sidebar section
The card's complete file inventory: compact QuickLook-thumbnail rows over Card.attachments — no reference tracking, subfolders tolerated and unsurfaced — with a quiet header add affordance and the drop hint empty state. The whole window is the file-drop surface, Edit mode included (the editor's drag types were already filtered; now tested), sharing the board's folder-refusal semantics literally: FinderDrop moved verbatim into its own file so both windows run the same partition and loss row. Dragged text still lands at the caret and is inert elsewhere — the window delegate accepts file payloads only. Rows open on double-click or Return, drag out their file URL, and Remove is a bracketed write through FileManager.trashItem — the system Trash, never a hard delete, returning the in-Trash URL so the promise is testable; the attachment listing is the guard, so traversal and subfolder names refuse in one line. Keyboard-native per 05: the section is one Tab stop, arrows walk rows by name, Space toggles the shared QuickLook panel, Backspace removes. File > Add Attachment (shift-cmd-A) comes alive through the same import path. Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -52,27 +52,10 @@ struct SaveAsTemplateCommand: View {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - File ▸ Add Attachment…
|
||||
|
||||
/// File ▸ Add Attachment… (⇧⌘A) — card window only (11-command-nexus.md).
|
||||
///
|
||||
// m6-card-window: the menu-bar twin of the attachments section's quiet add affordance
|
||||
// (05-card-window.md § Attachments) and of a whole-window Finder file drop. Validation will be scope
|
||||
// alone — a card window in front, the read-only lock aside — `BoardInfoCommand`'s shape for its own
|
||||
// scope-only item.
|
||||
//
|
||||
// m5-context-menus, m6-card-window: the attachment row's own context menu is a second thing this
|
||||
// milestone owes — Open, Remove (system Trash), Reveal in Finder (11-command-nexus.md ▸ Context
|
||||
// menus' Attachment row), twinning the focused section's grammar keys (Return open / ⌫ remove — 05
|
||||
// ▸ Attachments) and Reveal in Finder's attachments-focused scope, exactly the way this milestone's
|
||||
// card and lane menus twin their own grammar and menu-bar commands: no new store method, no parallel
|
||||
// implementation. There is no row view to hang a `.contextMenu` off yet, so nothing scaffolds here
|
||||
// beyond this marker.
|
||||
struct AddAttachmentCommand: View {
|
||||
var body: some View {
|
||||
FutureCommand(title: "Add Attachment…", key: "a", modifiers: [.shift, .command])
|
||||
}
|
||||
}
|
||||
// File ▸ Add Attachment… (⇧⌘A) was the scaffold here and is now live, beside the focused value it
|
||||
// reads (`AddAttachmentCommand`, in `CardAttachments.swift`) — the diff this file predicts: the
|
||||
// title and the chord did not move, the validation and the action filled in. The attachment row's
|
||||
// context menu (Open / Remove / Reveal in Finder) shipped with it, on the row view that now exists.
|
||||
|
||||
// MARK: - Edit ▸ Find Next / Find Previous
|
||||
|
||||
|
||||
Reference in New Issue
Block a user