feat(ui): badge an album drag with how many tracks it carries #78

Closed
logan wants to merge 0 commits from fix/drag-count-badge into main
Collaborator

Closes #19.

Dragging an album put its cover under the cursor and said nothing about how many tracks that was. Every other drag in the app already reports a count (createDragImage is a count and nothing else) — this was the exception, because it had a picture to show instead.

createAlbumArtDragImage(coverUrl, count) now draws a corner badge, and cover-grid passes filePaths.length. Two details worth the review:

  • A count of 1 draws no badge. "1" over a single cover is noise, and the absence reads unambiguously beside a badge that only ever appears above one.
  • The badge sits inside the cover’s box, not overhanging it: setDragImage snapshots the element and anything outside it risks being clipped, while padding the box instead would move the cover away from the cursor.

Test. frontend/test/components/drag-image.test.ts — the count is drawn, 1 and the no-count call draw nothing, and the badge stays inside the snapshot box.

Closes #19. Dragging an album put its cover under the cursor and said nothing about how many tracks that was. Every other drag in the app already reports a count (`createDragImage` is a count and nothing else) — this was the exception, because it had a picture to show instead. `createAlbumArtDragImage(coverUrl, count)` now draws a corner badge, and `cover-grid` passes `filePaths.length`. Two details worth the review: - **A count of 1 draws no badge.** "1" over a single cover is noise, and the absence reads unambiguously beside a badge that only ever appears above one. - **The badge sits inside the cover’s box**, not overhanging it: `setDragImage` snapshots the element and anything outside it risks being clipped, while padding the box instead would move the cover away from the cursor. **Test.** `frontend/test/components/drag-image.test.ts` — the count is drawn, 1 and the no-count call draw nothing, and the badge stays inside the snapshot box.
logan added 1 commit 2026-08-18 15:10:24 +00:00
feat(ui): badge an album drag with how many tracks it carries
CI / check (push) Skipped
CI / e2e (push) Skipped
CI / check (pull_request) Successful in 2m25s
CI / e2e (pull_request) Successful in 6m5s
12e75ee24c
Dragging an album to the queue put its cover under the cursor and said
nothing about how much that was -- an album is 1 track or 30 and the
thumbnail is the same picture either way, so the one number the drop is
about was the one thing the drag did not show. Every other drag in the
app already says it; this was the exception, because it had a picture
to show instead.

A count of 1 draws no badge: "1" over a single cover is noise, and the
absence reads clearly beside a badge that only appears above one.

The badge sits inside the cover's box rather than overhanging it,
because setDragImage snapshots the element and anything outside it
risks being clipped -- while padding the box instead would move the
cover away from the cursor.

Refs #19
Author
Collaborator

Rolled into #83 and closed here — the commit is preserved as a merge on that branch, so it lands with its authorship and this PR's diff intact.

Batched deliberately: release.yml cuts a release on every push to main, so merging these one at a time would produce seven or eight releases for one afternoon of small fixes. #83 is one push and therefore one version.

The full gate was run against the combined tree rather than per branch: make lint (3 configs), make test (3 configs, -race), make ui-test (836), make e2e chromium (114), plus bindings/skill/commit checks.

Rolled into #83 and closed here — the commit is preserved as a merge on that branch, so it lands with its authorship and this PR's diff intact. Batched deliberately: `release.yml` cuts a release on **every** push to `main`, so merging these one at a time would produce seven or eight releases for one afternoon of small fixes. #83 is one push and therefore one version. The full gate was run against the combined tree rather than per branch: `make lint` (3 configs), `make test` (3 configs, `-race`), `make ui-test` (836), `make e2e` chromium (114), plus bindings/skill/commit checks.
logan closed this pull request 2026-08-18 15:44:24 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.