Repository navigation
fix(status): reorder Status section cards only from their grip handle - #1796
heunghingwan wants to merge 2 commits into
Conversation
On touch (mobile PWA), every pointerdown on a Status section card armed
solid-dnd's pointer sensor, so a 10px move or a 250ms hold anywhere on a
card started a drag instead of scrolling or using the card, which made
the right panel nearly unusable on phones.
A Status section now reorders only when dragged from the six-dot grip at
its header's top-right. The grip grows from a 14px icon to a 24px touch
target with touch-action: none, and carries the shared "Drag to
reorder." tooltip. Touching, scrolling and long-pressing the card body
stays inert; keyboard reorder stays in the Customize popover's Up/Down
controls.
This follows the existing MissionSchedulingCriterion handle pattern:
ref={sortable.ref} registers card geometry without attaching sensor
activators, transformStyle(sortable.transform) keeps the drag visual,
and sortable.dragActivators arms the drag only from the grip span.
The new browser test proves a pointer pull on the card body arms no drag
and reorders nothing, while a grip pull arms the drag, moves the section
next to the drop target and persists the order. Help pages now say the
sections reorder by their grip, in every locale.
Validated with status-panel (9/9), conversation-permissions (4/4),
integration-plugin-row (34/34) browser tests and the ui typecheck.
pascalandr
left a comment
There was a problem hiding this comment.
@heunghingwan Thanks, the grip fixes touch scrolling and taps on card content. One regression: with Tokens collapsed and Permissions expanded, dragging the Tokens grip about 26 px down hides its title and grip behind Permissions, with mouse and touch; on dev the dragged card stays on top. The idle transform now gives every card its own stacking context: please raise the active card (for example position: relative; z-index: 1, as Mission Scheduling does) and assert it stays visible over its neighbour.
The idle transformStyle binding gives every section card a stacking context, so during a drag the later sibling painted over the dragged card: a collapsed Tokens card dragged a short distance over the expanded Permissions section hid its title and grip, where dev kept the dragged card on top. Raise the active card with position: relative and z-index: 1, matching Mission Scheduling's dragging state, and assert in a new browser test that the dragged card's title and grip paint above the neighbour it slides over, while a short pull still reorders nothing.
|
Thanks for the catch — the idle Fixed in 6d17419: the active card now gets Separately: this run's failing checks (runtime-contracts, session-pruning-native, parts of the browser shards, the windows opencode-compatibility job) fail with the same test names on other open PRs such as #1795, so they look base-wide rather than regressions here; my status-panel tests are green on this run's shard 1. |
On touch (mobile PWA), every pointerdown on a Status section card armed solid-dnd's pointer sensor: moving 10px or holding 250ms anywhere on a card started a drag instead of scrolling, tapping or long-pressing the card's content, which made the right panel nearly unusable on phones.
A Status section now reorders only when dragged from the six-dot grip at its header's top-right. The grip grows from a 14px icon to a 24px touch target with touch-action: none, so its drags own the gesture, and it carries the shared "Drag to reorder." tooltip. The card body — trigger, summary and content — stays inert to touches; keyboard reorder stays in the Customize popover's Up/Down controls.
The implementation follows the existing MissionSchedulingCriterion handle pattern:
ref={sortable.ref}registers card geometry without attaching sensor activators,transformStyle(sortable.transform)keeps the drag visual, andsortable.dragActivatorsarms the drag only from the grip span. Help pages now say the sections reorder by their grip, in all ten locales.Verified with a new browser test proving a pointer pull on the card body arms no drag and reorders nothing, while a grip pull arms the drag, moves the section next to its drop target and persists the order; the full status-panel suite (9/9), conversation-permissions (4/4) and integration-plugin-row (34/34) Chromium suites; and the @codenomad/ui typecheck.
Note: the background-shells touch test "touch tap opens output; long press exposes dismissible details without opening output" fails identically on the base revision without this change; it is pre-existing and unrelated to this PR.