Add some docs

This commit is contained in:
Michael Zhang 2021-03-11 07:16:20 -06:00
parent c76c2eaf5c
commit 7ec5c510a3
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
4 changed files with 41 additions and 4 deletions

View file

@ -13,11 +13,22 @@ Join chat on Matrix at [#panorama:mozilla.org][3]
Goals:
- Never have to actually close the application.
- Handles email, calendar, and address books using open standards.
- Hot-reload on-disk config.
- **Never have to actually close the application.** All errors should be
handled gracefully in a way that can be recovered or restarted without
needing to close the entire application.
- **Handles email, calendar, and address books using open standards.** IMAP for
email retrieval, SMTP for email sending, CalDAV for calendars, and CardDAV
for address books. Work should be saved locally prior to uploading to make
sure nothing is ever lost as a result of network failure.
- **Hot-reload on-disk config.** Configuration should be able to be reloaded so
that the user can keep the application open. Errors in config should be
reported to the user while the application is still running off the old
version.
- **Scriptable.** Built-in scripting language should allow for customization of
common functionality, including keybinds and colors.
Stretch goals:
- Full-text email/message search
- Unified "feed" that any app can submit to.
- Submit notifications to gotify-shaped notification servers.
- JMAP implementation.

View file

@ -2,3 +2,4 @@
- [Intro](./intro.md)
- [Config](./config.md)
- [Code Structure](./code.md)

26
docs/src/code.md Normal file
View file

@ -0,0 +1,26 @@
# Code Structure
The entire application is running on several async threads in a tokio runtime:
- [Mail](#mail)
- [UI](#ui)
- [VM](#vm)
Each of these communicates with the others via pairs of unbounded async
channels.
## Mail
The mail thread is in charge of communicating with mail servers. It keeps a
single connection alive to each server even if the UI thread has multiple mail
views open.
## UI
The UI thread manages everything user-facing. It runs a terminal UI using the
tui crate. There's a tiny windowing system built in that allows for tiling
windows, split horizontally or vertically.
## VM
The VM runs the scripting language that can be used inside the application.

View file

@ -151,7 +151,6 @@ impl UI {
let visible = self.window_layout.visible_windows(chunks[0]);
for (layout_id, area) in visible.into_iter() {
if let Some(window) = self.windows.get(&layout_id) {
debug!("drawing window {:?}", window.name());
window.draw(f, area, self);
}
}