Module jump
Expand description
The pill that takes a reader back to where they want to be, over a conversation they have scrolled away from.
Two things a long conversation owes its reader after they have read into its history: a way
back to the lines they had not read when they opened it (Jump::Unread, “New messages”),
and a way back to what is being said now (Jump::Present, “Jump to present”). Discord and
Slack both float one of these over the foot of the transcript, and swap to the other when
the reader does something that makes the first irrelevant. Chat and Messages need the same
pill in the same place, so it is here: the face, the two words, and the geometry, and the
host decides which one shows and where it goes.
The pill never draws itself a control: JumpFace::paint draws it, and the widget or app
that owns the pointer decides what a press on its rect means. That keeps the ephemeral
state (has the reader scrolled away? has anything arrived?) where the reading position
already lives.
Structs§
- Jump
Face - The pill as it is drawn: which way back, whether the pointer is on it, and where it sits.
Enums§
Functions§
- pill_
reserve - The space a conversation leaves at its foot for a pill over it, so the pill never covers the last line: one control’s height and the half-gutter it stands from the foot.