feat: add select-all checkbox, fix missing important icon and favorite/unfavorite logic#12895
feat: add select-all checkbox, fix missing important icon and favorite/unfavorite logic#12895RobinAngele wants to merge 2 commits intonextcloud:mainfrom
Conversation
458c614 to
647937d
Compare
…rite logic Closes: nextcloud#4285, nextcloud#7880 Refs: nextcloud#6070, nextcloud#7276, nextcloud#11526 Add a 'Select all X messages' checkbox above the envelope list that allows selecting all visible messages at once (closes feature requests nextcloud#4285, nextcloud#7880). The checkbox uses NcCheckboxRadioSwitch from @nextcloud/vue and shows a count of selectable messages. Lift envelope selection state from individual EnvelopeList instances up to the Mailbox parent component. This enables: - Cross-group shift-click range selection via flat envelope indexing (nextcloud#7276) - Consistent selection state across grouped envelope lists (Today, Yesterday, etc.) - Global select-all / unselect-all from the parent level - Groundwork for a single unified multiselect header (nextcloud#11526) Fixes: - Add margin-top to the select-all bar so its upper border is clearly visible and not hidden behind the sticky search header - Fix missing ImportantIcon import and component registration in EnvelopeList (the 'Mark as important' icon would not render during bulk selection) - Fix favorite/unfavorite bulk action logic: the methods now use explicit favFlag values (true/false) instead of inverted computed checks that failed when all selected messages shared the same favorite state Signed-off-by: Robin Angelé <frontend@robin4consulting.com>
ChristophWurst
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
On a high level the changes make sense, but please split them into individual PRs so that we can backport the fixes and have the features for main only.
If I'm not mistaken, the changes are very likely produced by an AI agent. Please direct it to the AGENTS.md file to follow the commit requirements.
Undo the funding change.
|
Split into #newPR-A and #newPR-B per maintainer request @ChristophWurst |
|
I meant fixes as plural, unless they are strongly connected. |
|
Split into two smaller PRs:
Okay like that? A third PR to enable filter selection is here : #12901 Merge order: #12899 → #12900 → #12901 |
Summary
Adds a "Select all X messages" checkbox above the envelope list, fixes a missing icon during bulk selection, and corrects broken favorite/unfavorite bulk action logic.
References
Changes
New feature: Select all checkbox
NcCheckboxRadioSwitchat the top of the message list showing "Select all N messages"margin-topso the bar doesn't sit flush against the sticky search headerSelection state lifted to parent
EnvelopeListinstances up to theMailboxparentBug fixes
ImportantIconwas used in the template ofEnvelopeList.vuebut never imported or registered. The icon now renders correctly during bulk selection.favoriteAll()andunFavoriteAll()computedfavFlagby inverting a boolean check on the selection state. When all selected messages had the same state (e.g. all favorited), the computed flag would betrueinstead offalse, making unfavorite a no-op. Fixed by using explicitfavFlag: true/favFlag: false.How to test
Screenshots