Skip to content

Sidebar note counts, list/editor appearance preferences, and MiniPreview card view#1961

Open
jj999 wants to merge 6 commits into
glushchenko:masterfrom
jj999:feature/sidebar-note-counts-and-dim-list
Open

Sidebar note counts, list/editor appearance preferences, and MiniPreview card view#1961
jj999 wants to merge 6 commits into
glushchenko:masterfrom
jj999:feature/sidebar-note-counts-and-dim-list

Conversation

@jj999

@jj999 jj999 commented Jul 11, 2026

Copy link
Copy Markdown

What

Quality-of-life additions for the macOS app. Everything is opt-in or adjustable via Preferences, and all defaults preserve the current appearance exactly.

1. Note counts in the sidebar (Apple Notes style)

Each folder row shows its note count right-aligned in a dim secondary color. The count label is created lazily in SidebarCellView (programmatic, 11pt, .secondaryLabelColor), so tag/system rows never allocate it and reused cells reset stale counts. Layout → Show note counts in sidebar (default on).

2. Note list appearance preferences (Layout pane)

  • Note Title Brightness slider (0.3–1.0) — alpha on the mainText color, works in light and dark appearance; 1.0 keeps today's look
  • Bold note titles checkbox (.semibold, default off)
  • Title Font Size popup (11–16pt, default 13)

3. MiniPreview — Apple Notes-style card view for the note list

Layout → MiniPreview note list (default off). Each note renders as a rounded card with a markdown-stripped content preview (emphasis/heading/link/code/blockquote markers removed, HTML entities decoded), centered title and dim date below, and an accent border for selection — no full-row highlight, like Apple Notes gallery. Tunable: preview font size (9–14pt), preview lines (4–12, drives card height) and preview brightness. Implemented as a fully programmatic MiniPreviewCellView compatible with the existing NoteCellView API, so search, keyboard navigation and context menus keep working; falls back to regular cells in horizontal orientation. Card text is cached per note version (path + modification date).

4. Editor text brightness (Editor pane)

Text Brightness slider dims the editor's base text color (alpha on NotesTextProcessor.fontColor), applied live via the same cache-reset + refill path the code theme switch uses.

Implementation notes

  • New settings follow the existing UserDefaultsManagement patterns and are platform-neutral (FSNotesCore); iOS is unaffected
  • Preferences controls follow the established pane patterns (hideDate checkbox, cellSpacing slider, previewFontSize popup)
  • Cell styling deliberately runs in attachHeaders/observers rather than draw() — mutating fonts/constraints during the drawing pass corrupts the Auto Layout engine (verified via crash reports during development, fixed in 483e551)
  • Built and manually tested with Xcode 26.6 on macOS 15 (light + dark, list + MiniPreview, pane switching, live slider updates)

🤖 Generated with Claude Code

jj999 and others added 6 commits July 11, 2026 14:47
Sidebar: each folder shows its note count right-aligned in a dim
secondary color, Apple Notes style. Toggleable via new Layout
preference "Show note counts in sidebar" (default on).

Note list: new Layout preferences for title text brightness
(slider, alpha on mainText, default 1.0 = current look), bold
titles (checkbox, default off) and title font size (popup
11-16pt, default 13). Defaults preserve the existing appearance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New "MiniPreview note list" Layout preference (default off). When
enabled, each note renders as a rounded card with a markdown-stripped
content preview, and a centered title and dim date below it, like
Apple Notes gallery cards. Selection shows an accent card border.

Preview text reuses trimMDSyntax and adds stripMarkdownSyntax()
(emphasis, links, code, blockquotes, list markers, HTML entities).
Falls back to regular cells in horizontal orientation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Editor pane: new Text Brightness slider (0.3-1.0, default 1.0)
dims the editor base text color (alpha on mainText), applied live
to open editors.

Layout pane, under the MiniPreview checkbox: preview font size
popup (9-14pt, default 10), preview lines popup (4-12, default 8,
drives card height), and preview brightness slider. Defaults
preserve the current MiniPreview look.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Layout was mutated during draw() (constraint constants, fonts),
corrupting the Auto Layout engine and crashing on tab switches and
cell teardown. Card and title styling now runs in attachHeaders and
appearance/selection observers; draw() stays empty.

Editor brightness now resets cached note attributes (same as the
code theme switch) so re-highlighting applies the new value live.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Skips the full-row highlight and row separators in MiniPreview mode,
matching Apple Notes gallery cards.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Card text is now computed once per note edit (keyed by path,
modification date and first-line-as-title) instead of re-reading
note.content on every cell render — faster, and fewer chances to
race with background content mutation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant