From c22881b9d147894aca6a97ac8c554fc4bb1edf31 Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Mon, 19 Oct 2026 21:22:12 +0200 Subject: [PATCH] fix: keep notes formatting controls visible --- README.md | 4 ++-- Sources/Conjure/NotesController.swift | 13 +------------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 4786e65..ea00a0e 100644 --- a/README.md +++ b/README.md @@ -143,9 +143,9 @@ Notes uses a standard macOS window with system-inherited appearance and only the Actions (Command-K) opens the same searchable popup style used throughout Conjure, with **Browse Notes** (Command-P), **New Note** (Command-N), and **Delete Note**. Delete Note asks for confirmation before permanently deleting the currently selected note and its embedded images. Delete is focused by default: Return confirms and Escape cancels; deletion cannot be undone. After deletion, Notes selects a remaining note or creates a fresh blank note if none remain. Save or deletion failures preserve the current note and editor buffer. Command-N creates a note while the editor or either popup is focused. Command-P toggles Browse Notes even while its title-bar controls are covered. Escape or clicking outside closes an open popup and returns focus to the editor without leaving Notes; another Escape dismisses the launcher. Control-J/K navigates only while a popup is open, preserving normal editor commands when it is closed. -The bottom strip applies Markdown headings, bold, italic, strikethrough, inline code, links, fenced code blocks, quotes, numbered lists, bullet lists, and checklists. Formatting preserves embedded images and supports Undo. List buttons convert existing list types; clicking the current type removes its marker. The strip’s × hides formatting controls; the text-format icon restores them. Successful autosaves stay unobtrusive; only save, load, or deletion errors appear below the editor. +The bottom strip applies Markdown headings, bold, italic, strikethrough, inline code, links, fenced code blocks, quotes, numbered lists, bullet lists, and checklists. Formatting preserves embedded images and supports Undo. List buttons convert existing list types; clicking the current type removes its marker. The formatting strip is always visible. Successful autosaves stay unobtrusive; only save, load, or deletion errors appear below the editor. -Formatting shortcuts use the same actions as the bottom strip and work while it is hidden. They apply to the editor’s current selection or caret, never to text in an open picker. Hover over a formatting button to see its shortcut. Command-K remains Actions. +Formatting shortcuts use the same actions as the bottom strip. They apply to the editor’s current selection or caret, never to text in an open picker. Hover over a formatting button to see its shortcut. Command-K remains Actions. | Formatting | Shortcut | | --- | --- | diff --git a/Sources/Conjure/NotesController.swift b/Sources/Conjure/NotesController.swift index 5775fc7..2d1c3ca 100644 --- a/Sources/Conjure/NotesController.swift +++ b/Sources/Conjure/NotesController.swift @@ -97,13 +97,9 @@ final class NotesController: NSViewController, NSTextViewDelegate { formatting.addArrangedSubview(button) } formatting.spacing = 8 - let toggle = iconButton("xmark.circle.fill", label: "Hide formatting", action: #selector(toggleFormatting(_:))) - let separator = NSBox() - separator.boxType = .separator - let footer = NSStackView(views: [formatting, NSView(), separator, toggle]) + let footer = NSStackView(views: [formatting, NSView()]) footer.alignment = .centerY footer.spacing = 8 - separator.heightAnchor.constraint(equalToConstant: 22).isActive = true editor.delegate = self editor.isRichText = true editor.importsGraphics = true @@ -196,13 +192,6 @@ final class NotesController: NSViewController, NSTextViewDelegate { } - @objc private func toggleFormatting(_ sender: NSButton) { - formatting.isHidden.toggle() - sender.image = NSImage(systemSymbolName: formatting.isHidden ? "textformat" : "xmark.circle.fill", accessibilityDescription: nil) - sender.toolTip = formatting.isHidden ? "Show formatting" : "Hide formatting" - sender.setAccessibilityLabel(sender.toolTip) - focusEditor() - } @objc private func formatNote(_ sender: NSButton) { guard editor.isEditable else { return }