Sidebar note counts, list/editor appearance preferences, and MiniPreview card view#1961
Open
jj999 wants to merge 6 commits into
Open
Sidebar note counts, list/editor appearance preferences, and MiniPreview card view#1961jj999 wants to merge 6 commits into
jj999 wants to merge 6 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
mainTextcolor, works in light and dark appearance; 1.0 keeps today's look.semibold, default off)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
MiniPreviewCellViewcompatible with the existingNoteCellViewAPI, 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
UserDefaultsManagementpatterns and are platform-neutral (FSNotesCore); iOS is unaffectedattachHeaders/observers rather thandraw()— mutating fonts/constraints during the drawing pass corrupts the Auto Layout engine (verified via crash reports during development, fixed in 483e551)🤖 Generated with Claude Code