Skip to main content

Module thread

Module thread 

Source
Expand description

The thread view for Avestruz: the conversation one note is part of, in reading order, in a scroller.

Every note is under the one it answers, set in from it. The popup is narrow, so only the first few answers deep are set in further; past that a note keeps the place of the one above it. The note the thread was opened for is picked out, and shows in full; a click on any other opens that note’s thread over this one.

ConstantsΒ§

FOCUSED_PADDING πŸ”’
FOCUSED_RADIUS πŸ”’
FOCUSED_TINT πŸ”’
How strongly the accent colour tints the note the thread was opened for, and how much room the tint has around the note.
THREAD_GUIDE_GAP πŸ”’
The gap between the line that marks an answer and the answer.
THREAD_INDENT πŸ”’
How far an answer is set in from the note it answers, and how many answers deep that goes on.
THREAD_MAX_INDENTS πŸ”’

FunctionsΒ§

estimated_row_height
How tall a thread row will be, near enough, before it has been laid out, set in sizes in a list width wide, with the long notes among expanded in full. An answer set in is a little narrower than the estimate assumes, and so sometimes a line taller: the list finds out when the row is in view.
picked_out πŸ”’
note, the row of the note the thread was opened for, picked out from the others by a tint of the accent colour.
set_in πŸ”’
note, the row of an answer depth deep, set in under what it answers with a line down its left.