Skip to content

A reorder on a resize frame slides (#86) - #218

Merged
samitbasu merged 1 commit into
mainfrom
resize-86
Nov 15, 2026
Merged

samitbasu merged 1 commit into
mainfrom
resize-86

Conversation

@samitbasu

Copy link
Copy Markdown
Owner

Fixes #86

On a resize frame a node whose order among its siblings changed now slides (the user's pick, option a); everything the resize only reflowed is placed at once, as before. "Order changed" is encoded once, in LayoutAnimation::begin: each animated node's rank among its parent's animated children, compared with the previous frame's.

Tests:

  • a_resize_that_reorders_under_a_held_panel_is_continuous (the repro: two panels teleported between frames 37 and 38; it failed before).
  • a_plain_resize_places_the_panels_at_once (negative: no reorder, painted equals laid out on every resize frame).
  • a_resize_moves_everything_at_once is replaced by a_reorder_on_a_resize_frame_still_slides: it asserted that a reorder coinciding with a resize snaps, which is the behaviour this changes.
  • The drag fuzzer's "no Resize while a panel is held" restriction is lifted; cargo xtask fuzz --cases 1000 and cargo xtask ci exit 0. No golden moves.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AJYxo4YJZUXcPJ1bHdAHKy

LayoutAnimation::begin ranks each animated node among its parent's animated
children and, on a resize frame, keeps the tracking of a node whose rank
changed. The reordered nodes slide from where they were painted; everything
the resize merely reflowed is still placed at once (#86).

Behaviour change: a reorder that coincides with a resize frame slides
instead of snapping (a_resize_moves_everything_at_once is now
a_reorder_on_a_resize_frame_still_slides). The drag fuzzer no longer skips
Resize while a panel is held.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AJYxo4YJZUXcPJ1bHdAHKy
@samitbasu

Copy link
Copy Markdown
Owner Author

Gate (my run): cargo xtask ci exits 0. A quick manual trial is suggested: in the dnd_gallery, hold a panel and resize the window.

@samitbasu
samitbasu merged commit 43293b7 into main Nov 15, 2026
4 checks passed
samitbasu added a commit that referenced this pull request Nov 15, 2026
Conflicts: the segmented style keeps this branch's medium text role and
takes main's `input` track fill (#216); hit_route's imports drop the
removed `scroll` free functions (#222) and keep `Weight`. Goldens that
conflicted were taken from main, then every golden was regenerated once on
the merged tree. text_field_ring's TextSpec gains `weight: Weight::Normal`.

Fixes #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
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.

A resize under a held panel snaps the preview reorder (no slide on resize frames)

1 participant