Repository navigation
feat(media): select every visible asset with Ctrl/Cmd+A or a toolbar button - #658
Open
mostafasadeghidev wants to merge 1 commit into
Open
mostafasadeghidev wants to merge 1 commit into
mostafasadeghidev wants to merge 1 commit into
Conversation
…button Emptying the trash, or tagging a folder's worth of uploads, meant clicking every file. Ctrl/Cmd+A now selects every asset the grid shows, and a toolbar button makes the shortcut discoverable. Both toggle: when the selection already covers everything visible, they clear it. "Everything" is `visibleAssets` — what the folder, filter and search have narrowed to — not the whole library, so "select all, then delete" in the trash can never reach a live file off screen. The shortcut is document-level (the grid has no tabindex) and stands down in a text field, where the browser's own select-all is meant, and while a real modal is open. It keys on `aria-modal`, not `role="dialog"`: selecting one asset opens the viewer window, which carries the role but leaves the grid usable, and keying on the role turned the shortcut off almost everywhere in Media. The tests render MediaCanvas and press the real shortcut and button; each guard was checked against a component with it removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mostafasadeghidev
added a commit
to mostafasadeghidev/Instatic
that referenced
this pull request
Oct 16, 2026
…hat render the canvas The stack already had select-all, extracted into `useMediaSelection`. The merge also dropped a second copy of it into MediaCanvas — a second document keydown listener would have selected and then cleared on one Ctrl/Cmd+A — so that copy is removed and MediaCanvas is unchanged by this merge. CoreBunch#658's tests, which render MediaCanvas and press the real shortcut, replace CoreBunch#501's tests of local copies, and pass against the hook unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mostafasadeghidev
added a commit
to mostafasadeghidev/Instatic
that referenced
this pull request
Oct 16, 2026
…ch#501 is now three PRs CoreBunch#335 and CoreBunch#499 move to the landed table (shipped in v0.0.21). CoreBunch#501 was closed in review and asked to come back split: its rows become CoreBunch#658 (select-all), CoreBunch#659 (upload queue stays closed) and CoreBunch#660 (minimize). The three parts of CoreBunch#501 that are in none of them — the Uploads progress label, the queue's bottom-left default, and the Dialog body size — are listed as carried-but-not-proposed, so the README still says what a server runs. Also: what an installation needs before moving to plain upstream, since upstream's 031 repeats an ALTER this branch ran as 025. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #501, per review: select-all alone, on
main.What
Select all N items/Clear selection).Why
Emptying the trash or tagging a folder's worth of uploads meant clicking every file.
Behaviour worth reviewing
visibleAssets— what the folder, filter and search show — never the whole library, so "select all, then delete" in the trash can't reach a live file that isn't on screen.aria-modal="true", notrole="dialog". Selecting one asset opens the viewer window, which carries the role but deliberately leaves the grid usable; keying on the role disabled the shortcut almost everywhere in Media.Tests
selectAll.test.tsxrendersMediaCanvasand presses the real shortcut and button — no copies of the logic. Each guard was checked by removing it from the component: keying onrole="dialog", selecting the whole library, ignoring the search box — each turns the suite red.Verification
Docs: one line in
docs/features/media.md.