Skip to content

fix(ui): full-bleed image preview with quiet zoom controls - #57318

Draft
kitlangton wants to merge 1 commit into
betafrom
image-preview-tasteful
Draft

kitlangton wants to merge 1 commit into
betafrom
image-preview-tasteful

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

Kit, comparing our image preview with Claude's:

  • "Their image just goes the full width. We have some thing that puts a border around it."
  • "Can we be more tasteful with this design? I like how we can zoom in."
  • On our − 74% + × floating over the top-right of the image: "Can't we make this more tasteful? Should this be floating over it, or not show up until … above it, or in another control strip?"

The preview put the image in a 1200 px panel with its own background, padding and shadow, and laid the controls in a header strip inside that panel.

What Changes

  • The image is the preview. No panel: the image fits the window with 56 px top and bottom and up to 48 px at the sides (less on narrow windows). Small images stay at their natural size. Clicking the backdrop around the image closes the preview, as clicking outside the panel did; a click that ends a pan doesn't.
  • One quiet control strip under the image. − 74% + │ × sit in a small pill docked at the bottom centre, in the margin under the image, where Claude puts its pager. They never cover the image, and they use the menu surface and floating elevation tokens so they read in light and dark. Focus still starts on Close, and Tab, ⌘ =, ⌘ −, ⌘ 0 and Esc work as before.
  • The flight lands on the new box. The rest frame's surface is now the image's own visible box and radius, so the fix(ui): grow the image preview's panel with the image and land without a cut #56997 flight, crop, backdrop and hand-back are unchanged, and the controls no longer ride a panel corner. The panel's shadow becomes a lift shadow under the flying image, deepest mid-flight and gone at both ends, so nothing pops at landing.
  • No hard edges when zoomed. A zoomed image fades out over 12 px at the stage edges instead of being cut.
  • The window-sized preview doesn't catch clicks. Its root now takes no pointer events; only the open content does. The closing-content and body rules from fix(ui): image preview no longer blocks clicks after closing #57324 stay as they are. Everything unmounts after close (Esc, backdrop, Close, mid-flight).

Placements considered (stills: https://problems.kitlangton.com/media/h_fW9tcxKQb7ihmW-p_Pig.png):

  • A. A translucent pill over the image's corner, shown on pointer movement and hidden after 1.5 s idle. It's quiet at rest, but it still covers the image, can't be discovered without moving the pointer, and appears and disappears.
  • B. A slim strip above the image. It never covers the image, but it fights the macOS traffic lights and the Windows window controls at the top of the window.
  • C (picked). Docked under the image. It never covers the image, nothing appears or disappears, and it matches Claude's pager.

Scope

packages/ui image preview only: image-preview.tsx, image-preview.css and the story's docs. No change to image-flight.ts, zoom math, springs or the open/close timing.

Verification

@kitlangton
kitlangton force-pushed the image-preview-tasteful branch from ba20e01 to cfcb189 Compare October 20, 2026 07:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant