Issue Feature Under Review

#111079Add device preview with zoom and pan to the preview module

Benjamin Kott 10/15/26, 11:35 updated 11/10/26, 10:22

Description

Problem

The module “Content > Preview” shows a page in a box of the chosen screen size, at 100 %:

  • A screen wider than the module, such as a desktop of 1440 or 1920 pixels on a laptop, does not fit. The box overflows, and the page cannot be seen as a whole at the width its breakpoints are made for.
  • The size changes with handles and number fields only; there is no zoom.
  • Without a preview (no page selected, no access, a folder, no site), the module shows one generic message for every reason.

Proposal

  • Show the page at the size of a device screen, zoomed to fit the module or at a fixed factor, so a wide screen keeps its breakpoints.
  • Navigate as in a design tool: Ctrl/Cmd with the wheel or a pinch zooms around the pointer, + and – step through the zoom levels, Ctrl/Cmd with 0 or 1 fits or shows 100 % over the preview; Space with a drag or the middle mouse button pans.
  • A toolbar with the screen sizes, the current size and the zoom. The custom size gets handles at both sides and at the bottom, by pointer and with the arrow keys.
  • A screen without a height shows the page in its full height. For this, a frontend middleware adds a small script to the page in the module, for a signed parameter that it removes before the site is resolved (no cHash, no page cache). The script sends its messages only to the backend origin that signed the parameter.
  • Without a preview, say why in place of the page and lead to the module that helps (Records, or the site configuration for administrators). The buttons of the document header stay, disabled.
  • The chosen size and zoom are stored per user.

Presets of mod.web_view.previewFrameWidths without a height show the page in its full height; the desktop presets the core ships no longer set one.

Related

  • Supersedes the resizing of #106197 (change 88260).
  • Builds on #111075 and #111078 for the disabled QR code button.

Reviews 1

History 010