Skip to content

fix(workspace): keep the shown tiles still when a tile before them is removed - #281

Merged
PapyElGringo merged 1 commit into
mainfrom
fix/tile-removal-before-view
Nov 16, 2026
Merged

PapyElGringo merged 1 commit into
mainfrom
fix/tile-removal-before-view

Conversation

@PapyElGringo

Copy link
Copy Markdown
Contributor

Problem

Removing a tile placed before the leading tile shown (off screen, to the left) pulled every shown tile back one slot. Each tile slid to its new slot while the row scrolled after it on a different curve, so the shown tile wobbled; with several tiles shown, the row did not scroll and the shown tiles slid out instead.

Fix

The removal is treated as the view moving back with the tiles:

  • WorkspaceState.removeWindow moves firstVisibleIndex back by one when the removed tile was before it.
  • SlidingContainer jumps its scroll offset and selection indicator when firstVisibleIndex changes from outside (not from its own report).
  • TileDropSlot takes a viewShift, applied once with the change of window list, so the tiles jump with the view instead of sliding; freshly built tiles start at their shifted slot.
  • No removal ghost is drawn for a tile removed off screen.

Tests

test/tile_removal_before_view_test.dart checks, frame by frame, that the shown tiles do not move when a tile before them is removed, with one and with two tiles shown. Both fail without the fix.

… removed

Removing a tile before the leading one shown pulled every shown tile back one slot: they slid to their new slot while the row scrolled after them on another curve, so the shown tile wobbled (or slid out, with several tiles shown).

The workspace now moves its leading tile back with the removal, and the row's view, its selection indicator and the tiles jump together, so nothing on screen moves.
@PapyElGringo
PapyElGringo merged commit 62a14da into main Nov 16, 2026
2 checks passed
@PapyElGringo
PapyElGringo deleted the fix/tile-removal-before-view branch November 16, 2026 09:53
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.

1 participant