Skip to content

Checked-task treatment knobs (strikethrough gate, label ink, checkbox tints) - #125

Draft
dylandeheer wants to merge 2 commits into
nodes-app:mainfrom
GetWeeve:feature/task-styling
Draft

Checked-task treatment knobs (strikethrough gate, label ink, checkbox tints)#125
dylandeheer wants to merge 2 commits into
nodes-app:mainfrom
GetWeeve:feature/task-styling

Conversation

@dylandeheer

Copy link
Copy Markdown

Motivation

Completing a task always strikes the label through in body ink, and the drawn checkbox tints are fixed (bodyText checked / mutedText unchecked). Designs that mark completion by muting the label instead of striking it, or that tint the checked box in an accent color, can't be expressed.

What's added

  • TaskCheckboxStyle.strikethroughCompletedTasks: Bool — gates the completed label's strikethrough. Default true, preserving today's rendering exactly.
  • MarkdownEditorTheme.completedTaskText: NSColor? — foreground for a checked task's label. nil (the default) keeps body ink. Inline constructs inside the label (links, code, extension spans) keep their own colors, same layering as everywhere else.
  • MarkdownEditorTheme.taskCheckboxChecked / taskCheckboxUnchecked: NSColor? — tints for the drawn checkbox symbol. nil keeps the historical bodyText / mutedText.

Tests

Tests/MarkdownEngineTests/TaskStylingTests.swift (5 tests): strikethrough present by default and absent when gated off; completedTaskText colors checked labels only (unchecked untouched, inline constructs keep their ink); checkbox tint slots default to nil and carry custom inks.

swift build / swift test green locally (the two ScrollingHeaderController animation-timing failures are pre-existing/environmental).

Notes

Stacks on #121 (branched from feature/heading-font-and-color; the diff over #121 is this feature only).

Made with Cursor

dylandeheer and others added 2 commits August 3, 2026 22:59
The theme can recolor every element except heading text (it inherits
bodyText), and the heading config covers every metric except the face —
so an embedder that wants serif display headings over a sans body has
to fork. HeadingStyle.fontName picks a PostScript face for headings,
honored exactly so the chosen weight survives; an unresolvable name
falls back to the stock bold base font, like TaskCheckboxStyle's symbol
fallback. MarkdownEditorTheme.headingText colors heading text while the
`#` glyphs stay on headingMarker and inline constructs inside a heading
keep their own ink. Emphasis inside a heading still composes on top of
the configured face (traits added, family and per-level size kept).
Both knobs default to nil, which keeps styling identical to before.

Co-authored-by: Cursor <cursoragent@cursor.com>
…tints)

Completed tasks were hardwired to a single look: label struck through
in strikethroughColor, checkbox tinted bodyText checked / mutedText
unchecked. Designs that mark completion by ink alone had no seam.

TaskCheckboxStyle.strikethroughCompletedTasks gates the strikethrough
(default on, as before). MarkdownEditorTheme.completedTaskText colors
the checked label (nil = body ink; inline constructs append later and
keep their own colors, the same layering headingText relies on).
MarkdownEditorTheme.taskCheckboxChecked/-Unchecked tint the drawn
symbols (nil = the historical defaults).

Co-authored-by: Cursor <cursoragent@cursor.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