Skip to main content

Module views

Module views 

Source
Expand description

View rendering modules for Avestruz.

A view is a method on AppModel that takes &self and returns widgets. It can’t change the model: what it wants done, it says in the messages its widgets send. It is built again whenever the model changed, and from nothing whenever the popup opens.

flowchart LR
    panel["the button in the panel: another process"] -->|"pressed"| popup["popup: an error banner, over the view on show"]
    popup --> state{"ViewState"}
    state -->|"Login"| login
    state -->|"Feed"| feed
    state -->|"Page"| page{"The last page opened"}
    state -->|"Compose"| compose
    state -->|"Zap"| zap
    state -->|"Settings"| settings
    state -->|"Relays"| relays
    state -->|"Media"| media
    page --> thread
    page --> profile
    page --> bookmarks
    page --> search
    page --> notifications
    feed --> rows["components: a VirtualList of note rows"]
    thread --> rows
    profile --> rows
    bookmarks --> rows
    search --> rows
    notifications --> rows
ModuleWhat it draws
popupThe popup: the view on show, under an error banner when something went wrong
loginSigning in
feedThe feed, in a scroller
bookmarksThe notes the account has bookmarked
notificationsWhat others did that concerns the account
composeThe composer: a note, a reply or a quote being written
threadA note’s thread: the conversation it is part of
profileSomeone’s profile: who they are, and their notes
relaysThe account’s relays, by what they are for
mediaThe account’s media servers, where what it attaches to notes is kept
searchA search: what is typed, and the people and notes found
settingsThe settings: the account, signing out, text size, how long notes are kept, logging
keysWhat the keys do
zapZapping a note: how much, and the invoice to pay
componentsWhat the views share: the virtual list, the note row, the cards under a note

Why nothing that matters is kept in a widget is in crate::guide::architecture, and what keeps a list from moving under its reader in crate::guide::decisions.

Modules§

bookmarks
The bookmarks view for Avestruz: the notes the account has bookmarked, the one bookmarked last first.
components
Reusable UI components for Avestruz.
compose
The composer view for Avestruz: a note, a reply or a quote being written.
feed
The feed view for Avestruz: the notes of the people the account follows, newest first, in a scroller.
keys
The view that says what the keys do, on a list and elsewhere (see crate::handlers::keys): they are nowhere else to be found out. It is what ? opens, and Keyboard in the menu above the feed.
login
Sign-in view for Avestruz.
media
The media servers view for Avestruz: the servers the account keeps what it attaches to notes on, the one files are sent to first at the top, with a server to add under them. Save, above them, writes them to the account’s list.
notifications
The notifications view for Avestruz: what others did that concerns the account, newest first, in a scroller.
popup
Popup window view for Avestruz.
profile
The profile view for Avestruz: who someone is and what they say of themselves, following them, and under that their notes, newest first.
relays
The relays view for Avestruz: the relays the account writes to, those it reads and those it searches, each set under what it is for, with a relay to add under it. Save, above them, writes them to the account’s lists.
search
The search view for Avestruz: where the search is typed, above the people it found or the notes, each a list of its own.
settings
The settings view for Avestruz: who is signed in, signing out, how large notes are set, how long they are kept, and how much is logged.
thread
The thread view for Avestruz: the conversation one note is part of, in reading order, in a scroller.
zap
The zap view for Avestruz: how much to zap a note, and then the invoice to pay, as a QR code for a wallet to scan.