Skip to content

feat(explorer): a picked-up item is its row, icon and name (#327) - #329

Merged
Maxaubert merged 3 commits into
mainfrom
feat/327-drag-row
Oct 8, 2026
Merged

Maxaubert merged 3 commits into
mainfrom
feat/327-drag-row

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

The owner, 2026-10-07: "when i pick up an item i wanna pick up the row, essentially not just a label, so i want the icon and so on".

Decisions (with the owner)

  1. What hangs off the pointer is the ROW as it looks SELECTED, but only its icon and its name. Never the type, size or date. Drag label sits below left of the cursor, 10 to 20 px away; it should hang off the cursor's bottom right #310's placement is unchanged: the top-left corner sits 8 px right of and below the pointer tip, flips only at the window edge, and stays attached.
  2. With several items it is still only the row you pressed on, with a small count of everything carried on its corner. It never says "N items".

What changed

  • lib/dragRow.ts builds the carried row from the source row's own DOM and computed style. It takes the icon beside the name (never the tree's chevron), the row's height, side padding, gap, font and the --p-sel-line edge. One builder serves the tree, the Explorer list, archive rows and Quick Access pins, and each shows its own icon. The cloned icon's ids are renamed, so its mask does not depend on the source row.
  • The fill is the selection's tint composited on the source row's own ground, meaning the first opaque background above it (the list's, the sidebar's). That makes it match the marked row in light styles and in tree drags. Under acrylic, where no ground is opaque, it falls back to --p-sel-tint-seen. The result is always opaque.
  • Several items: a count badge in --p-sel-bg / --p-on-accent. A single item shows no badge. Pressing an unmarked row while other rows are marked carries that row alone.
  • The name is the one the row shows, without an unsaved file's *, since the file carried is the one on disk. When there is no icon (fallback), the row is named by its own path, then by the first carried path.
  • lib/internalFileDrag.ts: it is still an in-page element (the Ctrl+Tab rule). The row is measured once at the start, and the Move or Copy text is written only when it changes, so there is no DOM write or forced layout every frame.
  • Version 0.97.0. CLAUDE.md's Drag label sits below left of the cursor, 10 to 20 px away; it should hang off the cursor's bottom right #310 rule now covers feat(explorer): a picked-up item is its row, icon and name #327.

For the owner to decide: the Move / Copy line

The old label read "Move alpha.txt" while a target would take the drop. The row keeps that information as a small line, but outside the placed box (absolute: under the row, or over it at the window's bottom), so the row never jumps when a target starts or stops accepting. You asked for icon and name only, so this line is a carry-over and not part of that request. Say if it should go.

Tests

  • Unit: dragRow.test.ts covers the icon finder (list, tree chevron, place, img, none), the count text, the row style, colour parsing, the composite on the first opaque ground (including acrylic and unknown forms), and the unsaved star.
  • E2E dragLabel (run locally, all pass): placement at 100%, 150% and 225%; tree file and folder, Explorer list file and folder, places. For each it checks the icon, name, count, height, font, the opaque fill with the selection edge, and that the type, size and date are absent. It checks that the placed box is the row alone and that the row is removed when the drag ends. In Aurora and Paper it compares the carried row's PIXELS with the marked row's, for the list (one item and three) and for the tree. It also covers an unmarked row pressed among marked rows (its own name, no count).
  • typecheck, lint and the unit suite are green.

Screenshots (.e2e/shots)

  • drag-row-dark-one.png, drag-row-light-one.png: one Explorer row carried: the TXT icon and "alpha.txt" on the selected tint, which matches the marked row behind it.
  • drag-row-dark-many.png, drag-row-light-many.png: beta.txt carried with a blue "3" on its corner.
  • drag-row-dark-tree.png, drag-row-light-tree.png: a tree file carried, on the sidebar's selected tint.

Closes #327

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

Maxaubert and others added 3 commits October 7, 2026 20:55
The owner, 2026-10-07: "when i pick up an item i wanna pick up the row,
essentially not just a label, so i want the icon and so on". What hangs
off the pointer is now the pressed row as it looks selected: its own
icon (never the tree's chevron), its name, its height, side padding,
gap and font, the selection's tint and edge. No type, size or date.
Several items show that one row with a count on its corner instead of
"N items". Move or Copy is a small line under the row.

lib/dragRow.ts builds it from the source row's DOM and computed style,
so the Explorer list, the tree and places each show their own icon.
Placement is #310's, unchanged. The dragLabel e2e checks the icon,
name, count, height, font, look and the absent columns, with close-up
shots in Aurora and Paper. Version 0.97.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
…nd (#327)

Review of #327:
- The carried row wore --p-sel-tint-seen, the tint over the window
  ground, but list rows sit on the list's ground and tree rows on the
  sidebar's, so in Paper and in every tree drag it did not match the
  marked row. It is now the tint composited on the source row's first
  opaque ground (--p-sel-tint-seen only where none is, under acrylic).
- Move or Copy sits outside the placed box (absolute, under the row or
  over it at the window's bottom), so the row never jumps as a target
  toggles. The hook writes it only when it changes and measures the
  row once, not every frame.
- An unsaved tree file's "*" is not carried; with no icon the row is
  named by its own path before the first carried one.
- The dragLabel e2e compares the carried row's pixels with the marked
  row's (list and tree, Aurora and Paper), checks that an unmarked row
  pressed among marked ones carries itself alone, and that the placed
  box is the row alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
@Maxaubert
Maxaubert merged commit c5d99e0 into main Oct 8, 2026
3 checks passed
@Maxaubert
Maxaubert deleted the feat/327-drag-row branch October 8, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(explorer): a picked-up item is its row, icon and name

1 participant