Repository navigation
Screenshots lightbox: show the clicked screen at once, never the previous one - #18
Merged
Merged
Conversation
…w image per screen, with its card's thumbnail blurred in a frame of the right shape until it loads), never the one opened before; a Playwright check with throttled 2x images (lightbox.mjs, run by checks.mjs)
VisualCIdocspring/visualci · build #105 · 293 unchanged · no changes This PR vs base: 41 changed since #96, across 1 build Updated as builds change. Agents can review with VisualCI's MCP tools. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A live bug on https://visualci.com/screenshots/, from Nathan: open a screenshot, press Esc, click another, and the previous one shows; after a delay the new image loads and replaces it.
Cause: the lightbox reused one
<img>and changed itssrcsetandsrc. The browser keeps painting the old picture until the new one has loaded, which withsrcsetand a 2x copy on a high-density screen can take a while.Fix:
<img>, in a frame of the image's shape.Test:
scripts/screenshots/lightbox.mjs, whichchecks.mjsruns in the visual job. At device scale 2, it answers the gallery's 1x images at once and delays the 2x copies by 3 s. It opens one screen, presses Esc, clicks another, and checks that the lightbox shows only the clicked screen's pictures (its thumbnail), then its own image once that arrives. It skips when the page was built without the gallery's manifest.Review: no screenshots change (the lightbox isn't captured).