Expand description
The composer view for Avestruz: a note, a reply or a quote being written.
A reply shows what it answers above the text, in brief, and a quote what it quotes under the text, set apart as other clients will show it. The text is in an editor whose state is in the app model, so a popup that closes takes nothing with it. Ctrl+Enter publishes, as the button does; Cancel, beside it, leaves and keeps nothing of what was written.
Above the text, a control chooses between writing it and looking at how
it would show: the note as a row of a list would have it, whole, in a
frame that stands where the text does and scrolls when it has more than
there is room for (see crate::handlers::compose).
The paperclip under the text attaches a file, which is sent to the accountโs media servers; while it is on its way it shows under the text with how far it has got, and when it is there its address goes into the text.
Constantsยง
- AROUND_
THE_ ๐PREVIEW - How much of the popupโs height is not the frameโs: the line above the composer, the note written to, the files on their way, and the line with the way to publish, with the room between them.
- COMPOSE_
TAB_ ๐WIDTH - How wide each of the two choices above the text is at least: writing it, and looking at how it would show.
- EDITOR_
MAX_ ๐HEIGHT - EDITOR_
MIN_ ๐HEIGHT - How tall the editor is with little in it, and how tall it grows before the text scrolls inside it.
- PREVIEW_
PADDING ๐ - The room between the frame what is written shows in and what it shows, as the text has in its own.
- PREVIEW_
SCROLLBAR ๐ - The room kept on the right of what the frame shows for the bar it scrolls by.
- QUOTE_
AVATAR_ ๐SIZE - QUOTE_
MAX_ ๐CHARS - How much of the note replied to or quoted is shown with the text, in characters, and how wide its authorโs picture is.
Staticsยง
- COMPOSE_
EDITOR_ ID - The editor the text is written in.
Functionsยง
- editor_
style ๐ - How the editor looks: the themeโs editor, with the thin rounded border its text inputs have rather than a heavy square one.
- framed ๐
shown, which is what is being written as it would show, in the frame that stands where the text does: as tall as what it holds, no shorter than the text is at its shortest and no taller thanroom, past which it scrolls.- key_
binding ๐ - What the keys do in the editor: Ctrl+Enter publishes; pasting asks
what is on the clipboard, which may be a file to attach and not text
(see
crate::handlers::media); Backspace with nothing in the text (empty) for it to rub out leaves the composer (seecrate::handlers::compose); and the rest is the editorโs own. - plain_
text ๐ - What a note says as one line of plain text: links by their label, people by name, and line breaks as spaces.
- quoted_
style ๐ - How the note a quote quotes is set apart under the text: in a thin rounded border, as the editor is, in the colour of the lines between rows.
- view_
leaving ๐ - Whether what was written is kept as a draft, asked of whoever pressed Backspace to leave the composer, and the three answers there are, each with the key that gives it.
- view_
upload ๐ - A file on its way to a media server: what it is called, how far it has got, and the way to call it off.