Skip to content

Page through up to ten app screenshots and enlarge them in place - #514

Merged
jonathanlaib merged 1 commit into
mainfrom
screenshot-gallery
Nov 30, 2026
Merged

jonathanlaib merged 1 commit into
mainfrom
screenshot-gallery

Conversation

@jonathanlaib

@jonathanlaib jonathanlaib commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

An app's page shows at most three screenshots, which is too few to show an app on desktop, on a phone and in dark mode. The row of screenshots scrolls with a visible horizontal scrollbar, and clicking a screenshot opens the raw image in a new tab, so the reader leaves the app's page.

Changes

  • Up to ten screenshots: /screenshots/1 to /screenshots/10 among an app's static assets. The contract, the page listing, the API route, its OpenAPI description and the hint for app managers follow the new limit.
  • Paging instead of a scrollbar: the scrollbar is hidden; round arrow buttons appear on the side where more screenshots lie and page by most of the visible width. Touch and trackpad scrolling keep working.
  • Lightbox: clicking a screenshot opens it large in a dialog on the same page, with a counter. Arrow keys, the arrow buttons or a swipe move between screenshots; Escape, the close button or a click beside the picture closes it. The gallery lives in a new ScreenshotGallery component; AppAbout passes it the image URLs.

Public documentation of the screenshot convention is in #512, which will name the new limit.

Screenshots

Desktop, light, before and after: the scrollbar gives way to an arrow on the side with more screenshots.

Desktop, dark, before and after:

Phone, before and after:

The lightbox on a desktop in light and dark, and on a phone:


Verification

  • app-screenshots.test.ts covers slot 10 and rejects slot 11; the platform integration test now expects 400 for slot 11 instead of 4. The integration suite was not run locally; CI runs it.
  • svelte-check reports no errors in the changed files (the remaining errors come from the unbuilt @platform/app-runtime package in a fresh checkout). Oxlint and Oxfmt pass on the changed files.
  • Rendered the gallery with the real styles and five synthetic screenshots at 1280×760 in light and dark themes and on a 393 px phone viewport. Checked: arrows show only where more screenshots lie, paging, opening with a click and with Enter, focus moving into the dialog, arrow keys, buttons, swipe, Escape and click-outside closing, no console errors.
  • Fixed during review: the button's pressed state (translate-y-px) overrode a transform-based centering and made the arrow jump; arrows are now centered without a transform and opaque in dark mode.
  • Not checked: the full signed-in app page in a running installation, and a screenshot that fails to load inside the lightbox (it is left out of the row and the lightbox as before).

An app's page now shows up to ten screenshots instead of three, so an app can
show its desktop, mobile and dark views. The row pages with arrow buttons
instead of a scrollbar, and a screenshot opens in a lightbox on the same page
instead of a new tab: arrow keys, buttons or a swipe move between pictures,
Escape or a click beside the picture closes it.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 5ea2fd6 Nov 30 2026, 12:26 PM

@jonathanlaib
jonathanlaib merged commit 8e0156b into main Nov 30, 2026
17 checks passed
@jonathanlaib
jonathanlaib deleted the screenshot-gallery branch November 30, 2026 12:47
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