#111079Add device preview with zoom and pan to the preview module
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
-
Gerrit Code Review pushed patch set 1 for main to change 96718 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-15T11:46:16+00:00" > 10/15/26, 11:46 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96718 <span data-processor="relativetime" data-value="2026-10-15T13:27:08+00:00" > 10/15/26, 13:27 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96718 <span data-processor="relativetime" data-value="2026-10-15T13:39:38+00:00" > 10/15/26, 13:39 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 96718 <span data-processor="relativetime" data-value="2026-10-15T15:57:49+00:00" > 10/15/26, 15:57 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 96718 <span data-processor="relativetime" data-value="2026-10-19T16:34:39+00:00" > 10/19/26, 16:34 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 96718 <span data-processor="relativetime" data-value="2026-10-26T08:52:17+00:00" > 10/26/26, 08:52 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 96718 <span data-processor="relativetime" data-value="2026-10-27T10:30:17+00:00" > 10/27/26, 10:30 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 96718 <span data-processor="relativetime" data-value="2026-10-30T14:19:24+00:00" > 10/30/26, 14:19 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 96718 <span data-processor="relativetime" data-value="2026-11-09T16:51:39+00:00" > 11/09/26, 16:51 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 96718 <span data-processor="relativetime" data-value="2026-11-10T10:22:52+00:00" > 11/10/26, 10:22 </span>