A picture off the pasteboard becomes a card's file, its hero, or the board's backdrop
⌘V grows an image-data branch, below the app's own clipboard format and refused outright while a file URL is on the pasteboard: a screenshot or a browser's Copy Image lands as "Pasted Image.png" in the anchor card's attachments/, through the very import path Finder file drops and ⇧⌘A take — one bracket, one Finder-style collision ladder, one set of banners, and the same silence a drop's arrival has. A card window's ⌘V pastes onto its own card; a focused text field still wins the selector natively. A file-shaped flavor travels byte for byte, PNG preferred when several are offered; TIFF and BMP are re-encoded to PNG, being interchange encodings rather than files anyone wants in a folder. The hero key gets the setter it was born owing: "Set as Hero" on any image row of the attachment list, "Remove Hero" on the row that holds it, with menu-bar twins so the context entry is nobody's only home. It writes as a restyle — one key, one bracket, one invertible step on the window's own stack — and replaces rather than refusing, because a card has one hero and the row that has it says Remove instead. Edit ▸ Paste as Board Background is the same payload's other destination, taking the existing background.image convention at its word: the picture into the board folder as "Pasted Background.png", the colour subkey untouched, the generator's overwrite-our-own-name rule inherited and its echo memo taught to tell the two producers apart. Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
+20
-5
@@ -219,6 +219,11 @@ struct KanbanApp: App {
|
||||
ShareBoardCommand(appModel: appModel)
|
||||
RevealInFinderCommand()
|
||||
AddAttachmentCommand()
|
||||
// The attachment row's hero pair, as the menu-bar twins 11-command-nexus.md's
|
||||
// context-menu contract requires ("no function's only home"). Two rows rather than one
|
||||
// that renames itself, for titles-are-API's reason (`SetAsHeroCommand`).
|
||||
SetAsHeroCommand()
|
||||
RemoveHeroCommand()
|
||||
AddCommentCommand()
|
||||
|
||||
Divider()
|
||||
@@ -233,12 +238,22 @@ struct KanbanApp: App {
|
||||
// (`UndoCommands.swift`).
|
||||
UndoRedoCommands()
|
||||
|
||||
// The Edit menu: Find (⌘F), then its card-window stepping twins, placed after the standard
|
||||
// Cut/Copy/Paste/Select All group, which is where macOS puts Find. The clipboard items above
|
||||
// them stay the system's, answered by the board as a responder (`ClipboardCommands.swift`) —
|
||||
// a second item sharing one of those titles is what titles-are-API forbids. Undo and Redo
|
||||
// were the system's too until the latch (the group just above).
|
||||
// The Edit menu: Paste as Board Background, then Find (⌘F) and its card-window stepping
|
||||
// twins, placed after the standard Cut/Copy/Paste/Select All group, which is where macOS puts
|
||||
// Find. The clipboard items above them stay the system's, answered by the board as a
|
||||
// responder (`ClipboardCommands.swift`) — a second item sharing one of those titles is what
|
||||
// titles-are-API forbids. Undo and Redo were the system's too until the latch (the group just
|
||||
// above).
|
||||
//
|
||||
// **Paste as Board Background joined 2026-08-09** with the image-data paste branch: it sits
|
||||
// directly under the system's Paste because it is the one paste this app has that ⌘V could
|
||||
// not carry — a backdrop has no selection to target, so it needs a name rather than a
|
||||
// modifier (`PasteBoardBackgroundCommand`). No default chord, like Welcome's row.
|
||||
CommandGroup(after: .pasteboard) {
|
||||
PasteBoardBackgroundCommand(clipboard: appModel.clipboard)
|
||||
|
||||
Divider()
|
||||
|
||||
FindCommand()
|
||||
FindSteppingCommands()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user