fix: keep notes formatting controls visible

This commit is contained in:
2026-10-19 21:22:12 +02:00
parent 70c224e6f1
commit c22881b9d1
2 changed files with 3 additions and 14 deletions
+2 -2
View File
@@ -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 |
| --- | --- |
+1 -12
View File
@@ -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 }