Skip to content

Slider view in report.html - #97

Merged
tmashara merged 1 commit into
mainfrom
claude/issue-43-slider
Oct 30, 2026
Merged

tmashara merged 1 commit into
mainfrom
claude/issue-43-slider

Conversation

@tmashara

Copy link
Copy Markdown
Owner

Adds a slider view to report.html. A Slider view checkbox at the top of the sidebar swaps every card's left / right / diff grid for both shots stacked, tops aligned (the taller side's extra rows show below), with a divider that reveals left on one side and right on the other.

  • The toggle is CSS only (body:has(#slide:checked)). The grid stays the default and nothing is persisted. Lazy images in the hidden view aren't loaded until it's shown.
  • The divider is a full-height, transparent <input type="range"> over the stack, so a drag can start anywhere on a tall shot. Keyboard arrows work, and focus shows as an outline on the slider. Two lines of inline JS copy its value into --x, which drives clip-path on the left shot and the divider line.
  • The slider adds no <a href>, so a card still links exactly its three images.
  • Known limit: both shots are scaled to the card width, so a shot with a width delta doesn't line up in the slider (the width badge and the diff image still show it).
  • evidence.html is unchanged: its CSP blocks script, and it shows only crops.

Fixes #43

Verification

  • npm run typecheck, npm run lint, npm run format:check: clean
  • npm test: 358/358, including a new writeReport test for the toggle and slider markup and the three image links
  • npm run test:visual: 389/389
  • Manual check in Chromium on a report generated from the fixture site (/taller, /shifted, /color):
    • Dragging from low down on a 2,900px-tall slider moves the divider and clips the left shot.
    • Clicking anywhere jumps the divider there, and arrow keys move it.
    • The wheel still scrolls the page over the slider, focused or not.
    • Unticking the toggle restores the grid.
    • The filter box keeps its styling and the checkbox isn't stretched.

🤖 Generated with Claude Code

A sidebar "Slider view" toggle swaps each card's left/right/diff images for
both shots stacked with tops aligned and a full-height range input as the
divider, so a few-pixel shift can be dragged across in place.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tmashara
tmashara merged commit 364e248 into main Oct 30, 2026
3 checks passed
@tmashara tmashara mentioned this pull request Oct 30, 2026
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.

Slider view in report.html

1 participant