Skip to content

fix(editor): fix compact line spacing not working with Milkdown#63

Open
sfarestam wants to merge 1 commit intodebuglebowski:mainfrom
sfarestam:fix/milkdown-compact-spacing
Open

fix(editor): fix compact line spacing not working with Milkdown#63
sfarestam wants to merge 1 commit intodebuglebowski:mainfrom
sfarestam:fix/milkdown-compact-spacing

Conversation

@sfarestam
Copy link
Copy Markdown
Contributor

@sfarestam sfarestam commented Apr 7, 2026

Summary

  • Compact line spacing setting (Settings > Appearance > Line spacing) had no effect after the TipTap-to-Milkdown editor migration
  • The CSS selectors targeted .ProseMirror.prose but Milkdown renders .ProseMirror as a separate element without the prose class (.prose is on a parent div)
  • Removed .prose from all compact spacing selectors so they match .prose-tight .ProseMirror

Test plan

  • Open Settings > Appearance, set Line spacing to "Compact"
  • Open a task description with multiple paragraphs and list items
  • Verify spacing is visibly tighter than "Normal" mode
  • Switch back to "Normal" — spacing should return to default

🤖 Generated with Claude Code

Greptile Summary

Fixes compact line spacing not applying in the Milkdown editor by removing the .prose class co-requirement from all five prose-tight CSS selector groups. After the TipTap→Milkdown migration, .ProseMirror no longer carries the .prose class, so the old .prose-tight .ProseMirror.prose selectors never matched Milkdown's DOM structure.

Confidence Score: 5/5

Safe to merge — minimal, targeted CSS fix with no logic changes

Single-file CSS change that broadens five selector groups from requiring .ProseMirror.prose to .ProseMirror. Fix is correct, well-scoped, and no P0/P1 issues found. All other .ProseMirror.prose selectors (editor-themed theming) are correctly left untouched.

No files require special attention

Important Files Changed

Filename Overview
packages/apps/app/src/renderer/src/assets/main.css Removes .prose class qualifier from 5 compact-spacing selector groups so they match Milkdown's .ProseMirror (which no longer carries .prose after TipTap migration)

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User sets Line Spacing: Compact] --> B[prose-tight class added to editor container]
    B --> C{Which editor?}
    C -->|TipTap| D[".ProseMirror.prose element"]
    C -->|Milkdown| E[".ProseMirror element\n.prose on parent div"]
    D --> F["OLD: .prose-tight .ProseMirror.prose ✓\nNEW: .prose-tight .ProseMirror ✓"]
    E --> G["OLD: .prose-tight .ProseMirror.prose ✗\nNEW: .prose-tight .ProseMirror ✓"]
    F --> H[Compact spacing applied]
    G --> H
Loading

Reviews (1): Last reviewed commit: "fix(editor): fix compact line spacing no..." | Re-trigger Greptile

The compact spacing CSS selectors targeted .ProseMirror.prose but
after the TipTap-to-Milkdown migration, .ProseMirror no longer has
the .prose class (it's on a parent div). Remove .prose from the
selectors so they match the Milkdown DOM structure.

Co-Authored-By: Claude Opus 4.6 (1M context) <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.

2 participants