Repository navigation
feat(ui): allow folding an account to a single line - #13736
dillardblom wants to merge 1 commit into
Conversation
|
Thanks for opening your first pull request in this repository! ✌️ |
|
Thanks for your PR 👍 |
kra-mo
left a comment
There was a problem hiding this comment.
The feature makes sense. The account name labels should be aligned with the other labels, though:
Although I do wonder whether this should be done in nextcloud-vue instead? Like to have a collapsible header component we can reuse. @ShGKme?
|
I do also wonder whether we should keep "Collapse folders" even with this. |
|
Yeah, seeing them like that, I think F works the best as well. |
|
Okay, I will adjust according to F and update this PR! |
|
Updated to F: the toggle now sits at the end of the row, so the account name lines up with the folder icons with no extra indentation. |
|
One correction to the F update: the toggle was still landing between the name and the actions menu. It now sits after the actions menu, so it lines up with a folder's own disclosure arrow. |
809107b to
49d3b21
Compare
|
Pushed one more revision of F, now with a small indent so an account's mailboxes read as belonging to it rather than a flat continuation of the list. Screenshots (account names redacted): Expanded — mailboxes indented under the account, chevron still lined up with the other accounts' (the scrollbar appearing after expanding accounts for the extra rows): Also squashed the two follow-up fixes (toggle position, this indent) into the original commit so the history stays readable. |
d6046e7 to
53fdb35
Compare
|
Thanks @dillardblom, could you please take a look at the conflicts. The app was migrated to vue3 and so a lot of code changed. |
|
Thanks for the reminder @kesselb, I'm going to take a look and fix it! |
|
Conflicts with the Vue 3 migration are resolved. The account header now works without vue-frag, uses the @nextcloud/vue 9 props and subpath imports, and fetches the quota the same way main does. The component spec is ported to @vue/test-utils 2. I also gave each account's actions menu an accessible label that names the account ("Actions for {email}"), so the menus are distinguishable for screen readers. Checked again in the browser with three accounts: folding, the unread counter, the inbox link with its highlight, and the state surviving a reload. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
@kra-mo friendly ping: the layout now follows option F as you picked it (the toggle at the end of the row, in line with a folder's disclosure arrow, mailboxes slightly indented under the account), and the conflicts with the Vue 3 migration are resolved (see above). Could you have another look when you find the time? Two questions from your first review are still open: whether this should become a reusable collapsible header in nextcloud-vue (@ShGKme), and whether to keep "Collapse folders". This PR leaves "Collapse folders" as it is; I'm happy to follow up on either in a separate change. |
kra-mo
left a comment
There was a problem hiding this comment.
@dillardblom yeah sorry, I was on vacation. Looks good from a design perspective.
|
Please rebase your branch and squash everything into one feat commit. |
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 nextcloud#9300
Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Dillard Blom <dillard.blom@ensembia.com>
4fc7e76 to
21c8b7c
Compare
|
Rebased onto main and squashed into a single feat commit. |






Closes #9300
Summary
With several accounts, the navigation stays long even with "Collapse folders", because the inbox, favourites, drafts, sent and trash of every account remain visible. This adds a chevron in front of every account to fold it to a single line:
account-settingspreference, like the collapsed state, so there is no backend change. The toggle is disabled while saving and reverts if saving fails. Creating a folder in a folded account unfolds it.account-settingspreference are now queued. Every 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 chevron, the link and the counter. The existing "Collapse folders" toggle is unchanged.Not included on purpose: the unified inbox and provisioned accounts that are disabled for the current session cannot be folded or linked.
Screenshots
Testing
NavigationAccount(toggle state, counter and its screen reader label, inbox link, active highlight, disabled accounts).🤖 AI (if applicable)