feat(reader): add reading zoom controls and Windows shortcuts #13

Open
opened 2026-10-11 05:59:09 +00:00 by KofTwentyTwo · 1 comment
KofTwentyTwo commented 2026-10-11 05:59:09 +00:00 (Migrated from github.com)

Implement the reading zoom behavior present in pinned markdownViewr 6d08bc9d27d7d7b2c2fa95bb282da330b8cf9021 (ContentView.swift documentViewCommands and MarkdownViewrApp.swift View commands).

The current Windows viewer has no native Zoom In/Zoom Out/Actual Size controls. The reference starts at 100%, multiplies/divides by 1.1 and clamps to 30%–500%. Provide native menu/toolbar controls with Windows Ctrl+plus, Ctrl+minus and Ctrl+0 equivalents, retaining normal native find/editor/theme text entry and modifier/focus ownership. Reference audit: zoom is per ContentView window, not an AppStorage preference. Its native segmented control has minus, a rounded percentage/Actual Size, and plus; the overflow submenu contains Zoom Out/Actual Size/Zoom In, with no fixed percentage choices. Keep that per-window behavior.

ThemeManager.swift lines 358�413 implement zoom by scaling body, all six heading and code font-size variables, plus the optional content-width calculation through --zoom; line-height and images are not whole-browser zoomed. WinUI WebView2 exposes no public ZoomFactor/controller in the installed SDK. Extend the existing validated theme CSS generator for these host-computed sizes instead of assuming a WPF-only controller API. Zoom must visibly change the real rendered text/layout, retain reading position and chosen theme across reload/theme navigation, keep source/outline widths usable and preserve heading/source/find/collapse mapping. Printing needs Standard (100%) versus Match Screen (see the print task).

Require deterministic bounds/state tests and actual hosted physical-key/rendered glyph/layout/viewport acceptance in native, published and both installed channels. Do not use saved numbers alone as proof of visible scaling; malicious document/remote resource boundaries and existing keyboard ownership remain. No local desktop input without a fresh reservation, no dependency or authored-script bridge unless documented and justified.

Refs #1. Full PRODUCT.md remains the port objective.

Implement the reading zoom behavior present in pinned markdownViewr 6d08bc9d27d7d7b2c2fa95bb282da330b8cf9021 (ContentView.swift documentViewCommands and MarkdownViewrApp.swift View commands). The current Windows viewer has no native Zoom In/Zoom Out/Actual Size controls. The reference starts at 100%, multiplies/divides by 1.1 and clamps to 30%–500%. Provide native menu/toolbar controls with Windows Ctrl+plus, Ctrl+minus and Ctrl+0 equivalents, retaining normal native find/editor/theme text entry and modifier/focus ownership. Reference audit: zoom is per ContentView window, not an AppStorage preference. Its native segmented control has minus, a rounded percentage/Actual Size, and plus; the overflow submenu contains Zoom Out/Actual Size/Zoom In, with no fixed percentage choices. Keep that per-window behavior. ThemeManager.swift lines 358�413 implement zoom by scaling body, all six heading and code font-size variables, plus the optional content-width calculation through --zoom; line-height and images are not whole-browser zoomed. WinUI WebView2 exposes no public ZoomFactor/controller in the installed SDK. Extend the existing validated theme CSS generator for these host-computed sizes instead of assuming a WPF-only controller API. Zoom must visibly change the real rendered text/layout, retain reading position and chosen theme across reload/theme navigation, keep source/outline widths usable and preserve heading/source/find/collapse mapping. Printing needs Standard (100%) versus Match Screen (see the print task). Require deterministic bounds/state tests and actual hosted physical-key/rendered glyph/layout/viewport acceptance in native, published and both installed channels. Do not use saved numbers alone as proof of visible scaling; malicious document/remote resource boundaries and existing keyboard ownership remain. No local desktop input without a fresh reservation, no dependency or authored-script bridge unless documented and justified. Refs #1. Full PRODUCT.md remains the port objective.
KofTwentyTwo commented 2026-10-11 06:29:40 +00:00 (Migrated from github.com)

Checkpoint: cleaned2639e2d / CI38121762124 passed49 native/published and48 installed stable/dev, zero failures/skips. Retained actual TRXs at artifacts/source-clean-verified-installed-38121762124. Repeated heading activation, physical bidirectional source/reader positions, named editor-list/file-folder behavior and basic glyph/key/reload zoom pass in all channels. Installed JSON confirms AppKit apply/restart, expected stable0.4.0/dev0.3.0-beta.2 and no before/after check/apply errors; synthetic unsigned fixtures do not prove production signing.

New print implementation28c295f and signed correction41a687d are pushed on draft PR#3. Local363 core/100% measured lines,55 scripts, build/format/hooks pass. First print run passed Windows print-dialog cancel; native/published50/52 reproduce incorrect fixture find IDs and missing expected PDF path. Current correction uses established find IDs and physical filename readback; filtered38124425486 and fullCI38124425924 pending. No PDF output acceptance claim.

Full PRODUCT scope remains active: raw-heading audit, broader zoom/theme/find/collapse and print output/layout/state proof, windows/recents/activation, remaining theme/render/link parity, standards inventory and deferred exact signed artifacts. No merge, tag/release, Azure retry, local GUI input or fabricated human review.

Checkpoint: cleaned2639e2d / CI38121762124 passed49 native/published and48 installed stable/dev, zero failures/skips. Retained actual TRXs at artifacts/source-clean-verified-installed-38121762124. Repeated heading activation, physical bidirectional source/reader positions, named editor-list/file-folder behavior and basic glyph/key/reload zoom pass in all channels. Installed JSON confirms AppKit apply/restart, expected stable0.4.0/dev0.3.0-beta.2 and no before/after check/apply errors; synthetic unsigned fixtures do not prove production signing. New print implementation28c295f and signed correction41a687d are pushed on draft PR#3. Local363 core/100% measured lines,55 scripts, build/format/hooks pass. First print run passed Windows print-dialog cancel; native/published50/52 reproduce incorrect fixture find IDs and missing expected PDF path. Current correction uses established find IDs and physical filename readback; filtered38124425486 and fullCI38124425924 pending. No PDF output acceptance claim. Full PRODUCT scope remains active: raw-heading audit, broader zoom/theme/find/collapse and print output/layout/state proof, windows/recents/activation, remaining theme/render/link parity, standards inventory and deferred exact signed artifacts. No merge, tag/release, Azure retry, local GUI input or fabricated human review.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/MarkdownViewr.Windows#13