Skip to content

feat: add a preview to the quote composer - #1029

Merged
xHeaven merged 3 commits into
dev-null-sh:productionfrom
Rolf-Smit:feat/quote-preview
Oct 23, 2026
Merged

xHeaven merged 3 commits into
dev-null-sh:productionfrom
Rolf-Smit:feat/quote-preview

Conversation

@Rolf-Smit

Copy link
Copy Markdown
Contributor

Summary

The commit and reply composers both have a preview (⌘/Ctrl+Shift+P), but the quote composer didn't, so there was no way to check how code blocks, mentions or images would look before quoting. This PR adds the same preview to the quote dialog: an eye button next to the image picker swaps the textarea for the rendered draft. The shortcut works the same, Esc goes back to editing, and ⌘/Ctrl+Enter submits the quote, also while previewing.

Changes

  • QuoteComposer now uses the shared useComposerPreview, PreviewToggle and ComposerPreviewBody, in the same way as the commit composer (preview stacked over the textarea in a grid, image thumbnails hidden while previewing). The preview shows the first link as the link card, since quotes can't pick another one.
  • Mocked useComposerPreview in QuoteDraft.test.tsx, which calls the composer outside React.
  • Updated KNOWLEDGE_BASE.md, which said the quote composer has no preview.

Validation

  • test:types, test:lint (0 errors), test:unit (128/128): pass
  • Draft image component tests (tests/draft-images.config.ts, 353/353): pass
  • Manual: signed in locally, previewed and quoted a commit
  • Manual: checked in both dark and light mode, on desktop and mobile (actual device)
  • PHP checks and Pest not run; no PHP changed

Visual evidence

No before image, since that should be quite obvious.

Quote writing (light)
Screenshot 2026-10-23 at 14 29 34

Quote Preview (light)
Screenshot 2026-10-23 at 14 29 42

Quote Writing (dark)
Screenshot 2026-10-23 at 14 29 16

Quote Preview (dark)
Screenshot 2026-10-23 at 14 29 07

Light also shows how a draft/stash appears.

And finally one with a URL (in light mode):
Screenshot 2026-10-23 at 14 46 26

Device verification

  • MacBook Pro (M3 Max), macOS 27.0.1, Chrome 155.0.8059.85
  • Pixel 10, Android 17, Chrome 155.0.8059.84

@xHeaven
xHeaven merged commit fab3279 into dev-null-sh:production Oct 23, 2026
5 checks passed
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