Skip to content

feat(preview): toggle between standard and condensed style in live preview #45

@jscaltreto

Description

@jscaltreto

Summary

Add a toggle to switch between standard and condensed manuscript format in the live preview panel.

Context

The live preview currently renders HTML using the standard style only. The condensed renderer exists for PDF output (half-letter, tighter margins, smaller font) but has no HTML equivalent.

Proposed approach

  1. Add a downstage.preview.style setting (default: "standard")
  2. Add a downstage.togglePreviewStyle command (and optionally a status bar item)
  3. Build a condensed HTML renderer that mirrors the condensed PDF layout
  4. Wire the style through the existing preview render path (openLivePreview already reads getRenderStyleSetting())

Notes

  • The setting key constants added in chore: code quality cleanup and consistency (#24) #44 make step 1 straightforward
  • The main work is building the condensed HTML renderer — the condensed PDF renderer in internal/render/pdf/condensed.go can serve as a reference for layout values
  • Embedding the PDF in the preview iframe was considered but would lose the data-source-line scroll-to-line feature

Priority

Low — nice-to-have. Good candidate for an outside contributor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions