jen_celeus (macOS 27 beta 3, 0.1.3511): the first drag of a Usage card
moved the whole card area, nothing showed where it would go, and on
release it landed after a different card.
- dragScroll: an edge scrolls only once the pointer has left it. With
the page scrolled a little, a first-row logo sits inside the 36px top
edge, so pressing it scrolled the whole view at once. dragRows shares
it.
- dragCards takes a layout: each frame it picks the order that puts the
card nearest where it is held (8px hysteresis) and moves the others to
where that order puts them. The Usage page passes usageLayout, the
packing's own columns (usagePlace, split out of packUsage), so cards
of different heights no longer overlap in the preview. The panel's
pq-alist keeps the default (card k where card k is now).
- A dashed .drag-slot under the cards shows where the card will land
(ease-out .22s move, .15s fade in, no movement under reduced motion).
- packUsage's column-count key is the sorted card keys: a reorder used
to re-choose 3 columns or 2, so the card landed somewhere other than
where the preview showed it.
- TestCoreScriptBudget: comments in the Usage and tray-usage code were
shortened to stay in the core budget with no raise (within
1,533,802 at this head).
Run at this head: internal/gui/tests/usage-drag.test.cjs (new) in
chromium and webkit, en and zh, 4 of 4, on mote; the 25 related GUI
files (usage-*, drag/grip/arrange/order/sort tests, click-scroll,
view-middle-autoscroll, i18n-keys) on Linux (wsl-run), 424 of 426:
the two reds are click-scroll's webkit "a wheel the page hears of after
its scroll" and its parent, red the same with this change's app.js and
app.css taken out (#4385, open); after rebasing on a45dd9c65,
usage-drag, usage-pack, usage-arrange and i18n-keys again, 20 of 20;
go test -run Budget ./internal/gui ok; go vet ./internal/gui for
darwin, linux (nogui) and windows ok. JS and CSS only, so no gofmt.
Broken by hand, usage-drag red each time: origin/main's app.js and
app.css (4 of 4: the page scrolled with the first drag; on webkit zh no
slot); the edge arming removed (webkit en, the page scrolled); the keys
left unsorted (4 of 4, zai landed at another place than its slot); no
usageLayout passed (webkit, antigravity and codex overlapped while
dragged).
Not tried: the real macOS app's WKWebView (Playwright's WebKit only),
the related GUI files on mote (its suite lock queue was hours deep),
and the tray panel's pq-alist drag beyond its existing tests.