Let the rows of a Variables node be dragged into a new order
game-maker / gate (push) Failing after 3m4s
game-maker / suite (push) Successful in 14m57s

The Variables and Properties nodes listed their picked rows in the
inspector, but unlike Start, End and struct rows they could not be
reordered. The drag dots also sat right on the edge of the row and
touched the kind mark.

- buildPickedPortSection gathers each row with its warning line as one
  block and hands the blocks to sortBlocks. A move reorders the ports
  on the node and is one undo step. Properties uses the same section
  and gains the same reordering.
- Grip draws the dots 3 px in from the left edge and moves the kind
  mark 3 px clear of them (DOTS_PAD). The column keeps its width, so
  the name fields do not shift. Rows without dots are unchanged.

Tests:
- block-drag, reorder, variable-choices: 3 files, 13 tests, all green.
  block-drag now expects the mark 11 px in with dots, 0 without.
- e2e 23 on melektaus-atx: ALL PASSED, 32 checks (+3 for dragging vy
  before vx and undoing it). It ran before the padding change, which
  touches no checks there.
- The gate did not run before this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-05 16:08:59 +02:00
1 parent 7b1796baac
commit a5184b3368
4 files changed
+55 -10

No files matched your search

+18
View File
@@ -156,6 +156,24 @@ export async function variableNodes(t) {
await undo();
check('and undo points it back', (await portsOf('vp-get'))[0].key === 'vx');
// 23e-ii. The ports are reordered by dragging their mark, as on a start node: the order is the
// node's. A drop just above a mark lands in front of its row.
const grabbed = await json(`__gm.inspectorMark('vy', true)`);
const below = await json(`__gm.inspectorMark('vx', true)`);
check(
'a variable row shows the dots of a mark that drags',
grabbed?.dots === 'idle',
JSON.stringify(grabbed),
);
await t.drag(grabbed.x, grabbed.y, below.x, below.y - 6);
check(
'dragging a variable by its mark puts it in front of the other',
(await portsOf('vp-get')).map((p) => p.key).join(',') === 'vy,vx',
JSON.stringify(await portsOf('vp-get')),
);
await undo();
check('and undo puts it back', (await portsOf('vp-get')).map((p) => p.key).join(',') === 'vx,vy');
// 23f. Collapsed, the ports are out of sight, so the title says what the node does – and only then.
const titleOf = (id) => json(`__gm.graph.nodeLabel(${JSON.stringify(id)})`);
const toggle = async (id) => {