Back to gallery

Carousel

Base carousel

The source viewport is a focusable section. Previous and next scroll by 0.85 of the viewport width, and the arrows disable at the ends. With a single card both stay disabled.

Eight cards
canPrevious false, canNext false
One card (nothing to scroll)
canPrevious false, canNext false

Option carousel

Three layouts. Form overlays its arrows on the track and hides the one that cannot scroll. Gallery and compact keep the arrows in a header row and disable them. The first card of the form layout snaps to the scroll padding.

Arrow presses scroll instantly when it is on.
Form, with header
Choose one
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Form, no header (arrows overlay the track)
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Gallery
Gallery
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Compact
Compact
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Gallery, nothing to scroll (arrows disabled)
Two options
Option 1
Option 2
Form, invalid (aria-invalid)
Required
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8

Photo carousel

The photo carousel of an entity panel. Hover or focus it to show the arrows. ArrowLeft and ArrowRight move one photo, and next wraps from the last photo to the first. A photo opens the full-size viewer.

No arrow pressed yet

Sidebar presentation, five photos
No thumbnail read yet
Dialog presentation, five photos
One photo (no arrows or dots)
Twenty-five photos (no dots above twenty)
Loading: no source yet (placeholder)
Error: the preview fails, the photo source loads

Photo sources

useGeneratedImageSource decides where a photo comes from. Plain URLs are used as they are. Absolute local paths become in-app file URLs on this machine. file-service:// and sediment:// pointers go through the caller's resolver.

Plain https URL (used as it is)
Status
ready
Preview source
https://example.test/photo.png
Download source
https://example.test/photo.png
data:image URL (used as it is)
Status
ready
Preview source
data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2…
Download source
data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2…
Absolute POSIX path on this machine (in-app file URL)
Status
ready
Preview source
app://fs/@fs/Users/example/photos/trip.png
Download source
app://fs/@fs/Users/example/photos/trip.png
Windows path with a space and a hash (backslashes become slashes)
Status
ready
Preview source
app://fs/@fs/C:/Users/example/a%201%20%232.png
Download source
app://fs/@fs/C:/Users/example/a%201%20%232.png
Path with a drive prefix after a slash and a query mark
Status
ready
Preview source
app://fs/@fs/C:/Users/example/what%3F.png
Download source
app://fs/@fs/C:/Users/example/what%3F.png
Relative path (not a local file, used as it is)
Status
ready
Preview source
photos/trip.png
Download source
photos/trip.png

Asset resolver states

A resolver answers with a download URL, a trashed file or a deleted file. Pending and failed lookups leave the photo without a source, so the carousel shows its placeholder.

file-service:// pointer, resolved to downloaded bytes
Status
pending
Preview source
none
Download source
none

Resolver asked for: nothing

sediment:// pointer (the scheme is dropped before the lookup)
Status
pending
Preview source
none
Download source
none

Resolver asked for: nothing

Resolver says use the download URL as the image source
Status
pending
Preview source
none
Download source
none
Pending until the answer arrives
Status
pending
Preview source
none
Download source
none
Lookup fails (404, not retried)
Status
pending
Preview source
none
Download source
none
File moved to the trash
Status
pending
Preview source
none
Download source
none
File deleted for good
Status
pending
Preview source
none
Download source
none
Photo carousel with asset pointers: ready, pending, failed and trashed (the last three show the placeholder)

Cache and registered files

Lookups are cached by pointer and resolver scope for four minutes, and one lookup serves every reader. Registered sandbox files are treated as assets.

Cache scope “shared”, first reader
Status
pending
Preview source
none
Download source
none
Cache scope “shared”, second reader
Status
pending
Preview source
none
Download source
none

Resolver asked for: nothing

Cache scope “other”, same pointer
Status
pending
Preview source
none
Download source
none

Resolver asked for: nothing

Registered file URL (not registered yet)
Status
ready
Preview source
https://sandbox.test/outputs/chart.png?v=2
Download source
https://sandbox.test/outputs/chart.png?v=2

Resolver asked for: nothing

Local files through a host

On a host that is not this machine, a local path is read through the host. The host and environment come from the conversation, and a read that finishes after the source changed is dropped.

Local path on another host: read as a data URL (host and environment come from the conversation)
Status
pending
Preview source
none
Download source
none
Stale read: the source changes while the first read is still running
Status
pending
Preview source
none
Download source
none

First photo fallback

The first photo can carry a fallback that stands in until its preview has loaded.

firstPhotoFallbackSrc: the fallback (a grey “Fallback” card) shows until the preview has loaded
No thumbnail read yet

Host zoom bridge

While a viewer is open it registers with the host zoom bridge. The stub below plays the desktop menu: it sends step-zoom and reset-zoom, and reads whether any viewer is open.

Host zoom menu (stub). While a viewer is open, Alt plus, Alt minus and Alt 0 send the commands, and Alt R registers or removes a rival handler.
Image viewer active: no

Nothing sent yet

Image viewer options

Each button opens the viewer with one group of its options. Turn on the Windows, Electron and compact flags first to see the close buttons move.

No viewer event yet

Inline viewer: no dialog, the content renders in place (it still counts as an open viewer while shown)
Portal frame: a contained viewer renders inside this box

Right to left

In a right-to-left container the arrow chevrons turn around, the scroll range runs through negative scrollLeft, and ArrowLeft moves forward.

Gallery (RTL)
Choose one
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Form (RTL)
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Photos (RTL)
Base (RTL)
canPrevious false, canNext false

Light and dark

Each panel sets its own theme scope, so the appearance control above does not change them. The two lower panels nest the opposite theme inside, and the nested parts follow the nearest scope.

Light theme

Gallery
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6

Dark theme

Gallery
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6

Dark theme, with a light panel inside

Gallery
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6

Light theme, nested in dark

Gallery
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6

Light theme, with a dark panel inside

Gallery
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6

Dark theme, nested in light

Gallery
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6