Skip to content

Keep PDF pages readable across compact and expanded readers - #683

Merged
kvz merged 5 commits into
mainfrom
viewer-polish
Nov 29, 2026
Merged

kvz merged 5 commits into
mainfrom
viewer-polish

Conversation

@kvz

@kvz kvz commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Why

In the post-fix user test, a reader on page 25 could see only the first digit in the compact toolbar. Switching a portrait PDF from Fit page to Fit width could leave it in a 131 px strip. Opening a separate larger reader could also lose the page and zoom. DAM-104 · Content #7696

Changes

  • Fit three page digits and the total in a single 322 px toolbar row with 44 px controls.
  • Size pages against the full viewport, center them, draw a contrasting page boundary, and paint keyboard and programmatic focus above the canvas. Compact readers shrink to the current page after fullscreen exit or a change in page orientation.
  • Keep More actions open through zoom steps. Fit choices, Download, Escape and clicking outside dismiss it.
  • Expose controlled zoom and onZoomChange alongside page and onPageChange. Fit modes adapt to the destination viewport. Manual zoom keeps the same text size. Exiting fullscreen restores the saved inline fit or scale and its zoom-step limits. Echoing a fullscreen choice through onZoomChange keeps it scoped to fullscreen. Supplying a different controlled zoom overrides both views. Choosing a fit or receiving a new host scale resets the zoom button limits.
  • Add opt-in expandOnPageTap for compact readers. Desktop page clicks request native fullscreen during the pointer gesture. Menu dismissal, text selection and touch double taps keep the reader inline.
  • Map recognized RTF monospace font families to the fixed ui-monospace, monospace stack.
  • Document the page total, --tl-viewer-page-edge and the focus ring in the Viewer changeset.

Verification

  • yarn workspace @transloadit/viewer lint:ts
  • yarn workspace @transloadit/viewer test:unit
  • yarn workspace @transloadit/viewer test:browser on Chromium and mobile WebKit, including three fullscreen zoom steps followed by inline fit restoration, a host override, native fullscreen on desktop page click, touch double-tap suppression, and pixel sampling for edge contrast and focus visibility
  • yarn verify:full

🤖 Claimed by kvz on studio1/node-sdk since 2026-11-29 · resume: codex resume 01a227ab-3084-7793-adb3-77926f878b8c

@kvz
kvz marked this pull request as ready for review November 29, 2026 14:35
@kvz
kvz merged commit bf87593 into main Nov 29, 2026
17 checks passed
@kvz
kvz deleted the viewer-polish branch November 29, 2026 14:35
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