… pane
A collapsed account's heading shows the unread count its folders' rows
would show, added up (Inbox, Archive, the owner's own folders; not Junk
Email, Drafts, the Outbox, Sent Items or Deleted Items), flush right in
the same pill as a folder's count. Nothing at zero or while the account
is open. A collapsed All Accounts shows its rows' unread together.
Headings now carry an accessible label (with the count when folded) and
their expanded state. The account-setup help test's check that the
sign-in page says nothing of Favorites skips the folder pane's own
Favorites heading, which is now read out.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
Closes #1950
What changes for the person using MailCraft
A collapsed account in the folder pane now shows its unread mail beside its name, so one look at the pane tells which accounts have new mail, without expanding each one.
The counts come from the per-folder counts that are already cached once per mailbox change (
Session::folder_counts). Each frame adds one pass over the folders and nothing else.The screenshots show the sample mailbox and two invented accounts (Work, with 2 unread, and Club, with none), rendered with
crates/ui-egui/examples/ui_shot.rs.How it was checked
New tests in
crates/ui-egui/src/nav_tests.rs:a_folded_account_shows_its_unread_mail: the Inbox and a subfolder are counted, Junk Email and Sent Items are not. The count disappears when everything is read and when the account is expanded again, and the accessible label carries it.folded_all_accounts_shows_every_accounts_unread_mailunread_by_account_counts_what_the_rows_show_unreadaccount_setup::tests::help::the_waiting_page_says_what_to_do_about_an_approval_without_waitingchecks that nothing on screen says "Favorites" while the sign-in page is open. The folder pane's own Favorites heading behind the dialog now has a label, so the check now skips a label that is exactly "Favorites" and still fails on any other mention.cargo xtask ci: fmt, assets, spdx, test-files, workflows, layers, wasm-clock, i18n, release-notes, docs-log, clippy, wasm and deny all pass. All tests pass exceptopening_kind_tests::the_known_types_cover_what_this_desktop_says(engine). That test reads this machine's/usr/share/mime/globs2, and Fedora's copy lists a KDE type (*.tar.p7m) that the engine's list doesn't have. It has nothing to do with this change.I looked at the result in light and dark (screenshots above).
Docs: the Folder pane row of
docs/ui-parity.mdwith its revision fragment, a progress-log fragment and a release-notes fragment (new/1950.md).cargo xtask cipassesA crash or data-loss fix has its regression test
"Allow edits by maintainers" is ticked (the box beside Create pull request)
I have signed the CLA, or will by commenting on this pull request
Human-reviewed, AI-assisted, nobody's mailbox harmed.
Summary by CodeRabbit