From 21c8b7c097979c225ef91704ed340c615593e7e4 Mon Sep 17 00:00:00 2001 From: Dillard Blom Date: Mon, 2 Nov 2026 13:56:02 +0100 Subject: [PATCH] feat(ui): allow folding an account to a single line Add a toggle to every account in the navigation. Folding an account hides all its mailboxes, including the inbox and the special folders that the existing "Collapse folders" toggle keeps visible, so many accounts fit on one screen. A folded account shows the number of unread messages in its inbox next to its name. Account headers that directly follow each other have no extra spacing between them. The toggle sits at the end of the row, after the actions menu, in the same column as a folder's own disclosure arrow. The account name starts flush with the row, lined up with the folder icons, and an account's mailboxes are indented a little under its header. The item's own CSS sets width: 100%, so the inset comes off that width too; a plain margin would push the row's right edge past the list. The account name now links to the account's inbox, so switching between accounts does not require unfolding them. Other folders are still reached by unfolding the account. While its inbox is open, a folded account is highlighted like an active navigation entry. The folded state is stored per account in the existing account-settings preference, like the collapsed state, so no backend change is needed. The toggle is disabled while saving and reverts if saving fails. Creating a folder in a folded account unfolds and saves it. Saves of the account-settings preference are now queued. Each save sends the whole list, so with a toggle per account an older snapshot could otherwise overwrite a newer one when requests finish out of order. This also applies to the existing collapsed setting. The account header is now a list item with a heading, a link and the actions menu instead of an NcAppNavigationCaption, because the caption only renders plain text and cannot hold the toggle, link and counter. Each account's actions menu is labelled after the account ("Actions for {email}"), so the menus are distinguishable for screen readers. Left out on purpose: the unified inbox and provisioned accounts that are disabled for the current session cannot be folded or linked. Closes #9300 Assisted-by: Claude Code:claude-opus-5-5 Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Dillard Blom --- src/components/Navigation.vue | 15 +- src/components/NavigationAccount.vue | 187 +++++++++++++++++- src/store/mainStore/actions.js | 51 ++++- .../components/NavigationAccount.vue.spec.js | 184 +++++++++++++++++ src/tests/unit/store/actions.spec.js | 180 +++++++++++++++++ src/tests/unit/store/mutations.spec.js | 38 ++++ 6 files changed, 644 insertions(+), 11 deletions(-) create mode 100644 src/tests/unit/components/NavigationAccount.vue.spec.js diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index 15fadf3a2a..68aa24cb03 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -40,7 +40,7 @@ variant="tertiary">{{ t('mail', 'Change password') }} -