Skip to content
ArcadiaDesign

TSX

The pictures of one message as one album: rows of one to three in their order, each row filling the width at one height, every picture at its own proportions, a hair between them and round corners only outside. Never a grid of squares. A picture alone stands at its own proportions within the media height. Every picture has its place from its sides alone, before a byte of it arrives, so nothing moves when it does.

A picture is a MediaImage: its sides and where its original is, an address or a Blob the product holds; its preview, its placeholder and its name are each optional. With no preview the original serves; with no placeholder the quiet skeleton stands in its place. Each picture is an ImageTile: its slot (Img with its placeholder, loaded ahead), a press that opens the product's viewer from where it stands, and a menu of the product's actions. A tile stands alone too, where a picture is shown by itself (a reply's quote, an upload).

Examples

Rows

The rows are chosen together, the way that keeps each near a calm height and the album short: photos pair, tall captures stand three abreast.

2 pictures
3 pictures
4 pictures
5 pictures

One alone

A tall one is cut to 2:5 from its top, where a page begins, and a wide one stays whole down to a strip of 8:1, so a capture of a bar keeps its words. The viewer shows either whole.

A photo
A tall capture, cut from its top
A wide strip, whole

In a bubble

inBubble: at the top of a bubble, edge to edge, its corners the bubble's above and square over the words.

From the pier, before the lights came on

A picture and its words

carriesWords says whether a picture alone stands wide enough to read words under, three quarters of the measure: a wider one keeps its words under it in one bubble, and several pictures always carry their words.

Scout, for david
This is the list after the update. Every thread kept its unread mark, the pinned ones stayed on top, and the search field no longer jumps when the keyboard opens. One thing is left: the badge on the tab bar still counts the muted threads, so it says 14 where it should say 3.
14:02
Scout, for david
Dusk from the end of the pier, just before the lights came on along the bay. The water stayed this still the whole way back, and the last of the colour sat over the hills behind the harbour.
14:02

A narrower one, a tall capture, stands as its own tile above a bubble of its words, one message in a MessageParts at the group's gap, under one author line and over one time.

Before the pictures arrive

Each place holds its picture's placeholder, or the quiet skeleton on the album's own surface; under reduced motion nothing pulses or fades.

Placeholders
None: the skeleton

A moving picture

Still at rest, wherever it shows: it plays under the pointer or the keyboard's focus, and never under reduced motion.

A tile alone, with what the product lays over it

over stands above the picture: an upload's ring, the way to send it again.

rootStyle takes where the album sits and the knobs below.

--image-album-width
Ref<Measure>Default var(--bubble-measure)
The widest it grows. Default a bubble's measure.
--image-album-height
Ref<Measure>Default var(--media-max-height)
How tall one picture alone stands; several, half as tall again. Default the media height.

Each picture that opens is a button named by its label (its own name, else the product's words); one that does not is an image with that name. Its menu opens from a right click, the menu key and Shift+F10, and a long press, and names itself Image. `focusable=` keeps the pictures out of Tab where what holds them is one stop already. A placeholder and a skeleton are hidden from a reader.

A picture standing above its words shares their MessageGroup, so a reader meets them as one message: the author line, the picture's button with its menu, the words, the time.

ImageAlbum

imagesrequired
readonly T[]
The pictures shown together, in order: one stands alone at its own proportions, several make rows.
label
(image: T, index: number) => string
Each picture's name for assistive technology. Default its own name, else "Image".
onOpen
(index: number, from: HTMLElement) => void
Opens one (the product's viewer), from its tile. Without it the pictures do not open.
actions
(image: T, index: number) => readonly ImageAction[]
What each picture's menu holds.
over
(image: T, index: number) => ReactNode
What the product lays over a picture (an upload's ring).
mark
ReactNode
The product's mark at its foot (a read mark), on a plate.
focusable
booleanDefault true
Its pictures are reached with Tab.
side
"start" | "end"Default "start"
Which side of its column it stands on.
inBubble
booleanDefault false
At the top of a bubble, edge to edge: the bubble's corners above it, square under it, over the words.
rootStyle
RootStyle<ImageAlbumKnobs>
Typed StyleX override: layout and the --image-album-* knobs.

Rest props go to <div> props.

imagerequired
MediaImage
A picture as the kit's image parts show it: plain data, nothing of the product that holds it and nothing of a server. Its sides and where its original is; everything else is optional. With no preview the original serves everywhere, and with no placeholder the quiet skeleton stands in its place until it is drawn.
frame
number
Its box's width over its height; a picture of another shape is cut to it, a tall one from its top. Default its own, held between 2:5 and 8:1.
label
string
Its name for assistive technology. Default the image's name, else "Image".
onOpen
(from: HTMLElement) => void
Opens it (the product's viewer), from the tile pressed. Without it the tile is the picture alone.
actions
readonly ImageAction[]Default []
What its menu holds (a right click, the menu key, a long press), on a tile that opens.
focusable
booleanDefault true
Reached with Tab.
over
ReactNode
What the product lays over the picture (an upload's ring), above its press.
rootStyle
RootStyle
Typed StyleX override: layout.

Rest props go to <span> props.