https://gitlab.synchro.net/main/sbbs/-/commit/90b095ca9482250ec278380f
Added Files:
webmail/root/js/actions.js compose.js contacts.js dialog.js draftlist.js prefs.js settings.js theme.js
Modified Files:
exec/tests/webmail/client.js webmail/lib/locale/en_us.ini webmail/root/css/style.css webmail/root/index.xjs webmail/root/js/app.js attachments.js folders.js format.js icons.js layout.js list.js mail.js notice.js reader.js rpc.js
Log Message:
Web mail client: act on mail, write and send, contacts and settings
The browser half of everything beyond reading.
The message list is a grid (the WAI-ARIA grid pattern): each row has a checkbox, the message and a star button, still drawn from a small pool
of rows. One tab stop; the arrow keys move between rows and controls;
Space checks, Enter opens, Shift extends a range, Ctrl+A checks every
loaded row, Delete deletes, s stars, z is Undo. Focus and checks
follow a message by its id, also when a move gives it a new one. Sent
rows show their delivery state, with a Report button for a failure
notice that still exists.
Acting on mail: star, mark read or unread, delete, move, Mark as spam
and Not spam, restore from Trash, for one message or the checked rows,
from the list's bar and the reader's toolbar. A change shows at once
and is put back only for the messages the server could not change; one
notice says what was done. Delete, move, spam and restore offer Undo
for 10 seconds. Long selections go in several requests. Folders: New
folder, Rename, Delete, and Empty Trash, each asking where mail would
be lost. Show original shows a message's headers with a download of
the whole message.
Writing (compose.js): a panel docked at the bottom right, the whole
screen on a phone. Opened by Compose, Reply, Reply all, Forward, or a
draft in the new Drafts folder.
- The draft is saved two seconds after the last change, before Send
and on closing. Text the user typed is never dropped while the page
is open and the page never claims a save that did not happen: a
failed save is retried, a draft changed in another window is
offered, and text not saved when the page goes away is kept in the
tab and offered back to the same user.
- A message the user changed nothing in (a reply's recipient, subject
and quote are put there for them) leaves no draft when the panel is
closed.
- To, Cc and Bcc entries are chips with suggestions from the user's
contacts (a WAI-ARIA combobox). From is a choice when the user has
more than one sending address.
- Attachments from the file picker or dropped on the panel are checked
against the server's limits, uploaded in pieces of 1,000,000 bytes
with a progress bar, and resumed after a lost connection.
- A reply quotes the text the reader decoded; hidden HTML is never
quoted.
- Send closes the panel at once and reports the result. A lost
connection retries the same attempt; "may already have been sent"
asks before sending again. A draft being sent in another window is
read-only until it is sent or comes back.
From the message shown to its neighbors in the list: on a phone, where
the list is out of sight, a bar under the message has Previous and
Next and says where the message is ("2 of 133"); on a wide screen the
toolbar has the two buttons; j and k do the same in the reader. A row
not loaded yet is fetched first, and the list follows, so Back returns
to the message last read. On a phone the product name is shown above
the search field.
Contacts and Settings are full views opened from the account menu.
Contacts: search, add, edit, delete, Write to. Settings: the name used
on Internet mail, the default From address, the signature, the theme
(now also kept on the server, and on the page before it is drawn), the
senders whose images are always shown, and the BBS account's mail
forwarding.
Images in HTML mail can be shown always for a sender, but never
automatically in Spam or Trash, and only for Internet mail with a
plain sender address. A sender name that could pass for an address is
shown with its real address.
Also: a page left open by another user reloads instead of acting; new
mail is announced only for a message not seen before; a request that
is safe to repeat gets one more try before "no connection"; the
reader keeps each sender's avatar for the page's life.
exec/tests/webmail/client.js pins, from the source text, the grid and
combobox roles, the methods and request layout the client and server
must agree on, the image rule and the ports of two server functions.
Everything else was checked by driving headless Firefox against a
scratch web server; no other browser, no phone and no screen reader
has been tried.
Co-Authored-By: Claude Fable 5.2 <
noreply@anthropic.com>