feat: bulk move cards and decks via multi-select closes: #162#186
feat: bulk move cards and decks via multi-select closes: #162#186DevamPatel22 wants to merge 2 commits into
Conversation
| final deckRepo = ref.read(deckRepositoryProvider); | ||
| final deck = await deckRepo.getById(childDeckId); | ||
| if (deck == null) return; | ||
| for (final deckId in childDeckIds) { |
There was a problem hiding this comment.
Each deckRepo.delete() runs its own getDescendantIds() query + a separate transaction. With 10 selected decks, that is 10 transactions and 10 descendant lookups. CardRepository already has a bulkDelete that does it in one transaction — DeckRepository needs the same thing.
| ); | ||
|
|
||
| if (_isDeckSelection) { | ||
| deckTile = Stack( |
There was a problem hiding this comment.
This overlays a checkbox at a fixed offset on top of the card. On narrow screens or long deck names, it will overlap content. Card items use an inline Checkbox inside the Row — deck items should do the same for consistency.
| ), | ||
| const SizedBox(width: Spacing.sm), | ||
| Icon( | ||
| _isCardSelection ? Icons.check : Icons.chevron_right, |
There was a problem hiding this comment.
In selection mode, cards show a Checkbox on the left AND a check icon on the right. That is redundant — one indicator is enough.
|
Good work overall — three things to fix before merge:
I added comments to the lines themselves above ^ |
Implements multi-select bulk operations in deck detail with long-press selection mode, checkboxes, and a bottom action bar (Move, Delete, Select All). Adds repository bulk APIs for cards/decks and corresponding tests for move/delete behavior.