Commit Graph
26 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek 5d868f91ac refac 2026-11-08 11:06:22 +09:00
Classic298 8eb1af85a3 fix: PDF preview shows blank pages for scanned PDFs with JPEG2000 images (#33906)
Scanned PDFs often store their pages as JPEG2000 images, which many scanning and OCR tools do by default. Opening such a file showed those pages and their thumbnails as blank white pages. The app now ships the image decoder the PDF viewer needs for that format, so those pages show up as they should.

Fixes #33905
2026-11-08 10:39:57 +09:00
G30 404a328a58 fix: PDF and Office preview zoom drifts, stalls, and loses track of its label (#33836)
Fixes several zoom problems in the Files pane preview (pdf, docx, and
pptx, which the backend converts to PDF):

- Switching tabs and back reset the page to 100% while the label kept the
  old percentage. Hidden tabs measure 0 px wide, so PdfPagesPreview
  collapsed its thumbnails; their return resized the viewer, which
  re-rendered every page. PdfPagesPreview now keeps its layout while hidden,
  so the chosen zoom stays.
- Changing slides in a pptx reset the zoom to 100% while the label kept
  the old value. A slide change now carries the zoom and position over to
  the new slide.
- A pane resize rebuilt the zoom at 100% but left the label at the old
  value. renderAllPages now resets the label with it.
- On pptx slides, zooming drifted off-center and stopped at about 244%.
  The element panzoom transforms was flex-centered inside its container,
  while panzoom measures bounds and zoom anchors from the container's
  top-left corner. That element now fills the container and centers the
  slide inside it, so the coordinates match the screen.
- Resetting from a low zoom left the page off to the side, and from a
  stalled high zoom it could leave the page enlarged under a 100% label.
  The reset moved and zoomed through panzoom's bounds check, which skips
  the scale change when it adjusts the position. The reset now rebuilds
  the panzoom instance, as every render already does.
2026-11-07 16:49:17 +09:00
Timothy Jaeryang Baek b1d3cb4a3b chore: format 2026-10-16 15:20:01 +04:00
Timothy Jaeryang Baek d12da61e5a refac 2026-10-16 14:55:40 +04:00
Timothy Jaeryang Baek c3c3087645 refac 2026-10-16 14:44:05 +04:00
Timothy Jaeryang Baek ba0b2169e1 refac 2026-10-16 03:13:13 +04:00
Classic298 1bc5648a7b fix: page scrolls up and the header goes off screen when previewing a scanned PDF (#32487)
Opening a PDF without any text, such as a scan, in the knowledge base file viewer scrolled the whole page up. The workspace tabs, the knowledge base header and the viewer toolbar went off screen and a blank block appeared at the bottom. Scanned PDFs now open with the page in place, the same as PDFs with text.

Fixes #32481
2026-10-16 03:00:24 +04:00
Timothy Jaeryang Baek f677fdbf50 refac 2026-09-03 20:22:32 -04:00
Timothy Jaeryang Baek 120409ef01 refac 2026-08-30 17:45:50 -04:00
Timothy Jaeryang Baek e4694f82eb refac 2026-08-30 17:45:18 -04:00
Timothy Jaeryang Baek b356b80f8c refac 2026-08-30 17:44:39 -04:00
Classic298 83556188f5 fix: hide file preview zoom buttons on touch devices (#29176)
On a phone the file preview zoom bar shows plus and minus buttons that duplicate pinch-to-zoom and sit on top of an already small preview. They are hidden on coarse pointers now, so touch users get the preview area back and still zoom the way they expect.

The check is the pointer type rather than the viewport width, because what matters is whether the person can pinch, not how narrow their window is. A narrow desktop window keeps the buttons, a tablet does not.

The zoom percentage doubles as the reset control and has no gesture equivalent, so it stays visible, along with all page and slide navigation. Keyboard zoom is unaffected. Word document previews are left alone: they have no pinch support at all, so hiding their buttons would remove zooming entirely.

Fixes #29152
2026-08-28 18:46:53 -04:00
Timothy Jaeryang Baek ae549d3e4a refac 2026-08-27 16:41:43 -04:00
Timothy Jaeryang Baek 5c62cc0517 chore: format 2026-08-25 16:53:53 -04:00
Timothy Jaeryang Baek fd8cc2ba4a refac 2026-08-24 18:06:59 -04:00
Timothy Jaeryang Baek d4461bd6f3 refac 2026-08-10 18:52:18 -06:00
Timothy Jaeryang Baek 060648f939 refac 2026-08-10 01:36:09 -06:00
Timothy Jaeryang Baek f9cd49443c refac 2026-08-10 01:32:29 -06:00
Timothy Jaeryang Baek aedb6bef4e refac 2026-07-14 04:15:20 -04:00
Timothy Jaeryang Baek bc4d6eef33 refac 2026-05-09 02:56:15 +09:00
Timothy Jaeryang Baek 2e8c4da17b refac 2026-03-01 14:45:35 -06:00
Timothy Jaeryang Baek ff9f761d65 refac 2026-03-01 14:44:12 -06:00
Timothy Jaeryang Baek 5645d5bccc refac 2026-03-01 14:38:10 -06:00
Timothy Jaeryang Baek 1f77691b01 refac 2026-02-25 18:16:20 -06:00
Timothy Jaeryang Baek 8b2160f2f7 refac 2026-02-25 16:13:18 -06:00