Repository navigation
fix(playlists): sidebar playlists no longer jump when you drop or refresh - #1867
Merged
Merged
Conversation
Rows jumped on drop: the inherited .sidebar-link transform transition animated the dropped row from its stale drag offset, the heading row grew when the order menu appeared, and the new order rendered a tick after dnd-kit reset its transforms. On refresh the order request only started after playlist status loaded, so the default order flashed first.
Preview image:
|
Performance: Nothing is slower than main.50,336 tracks, 2 alternating rounds per side, lower quartiles.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reordering a playlist in the sidebar made the rows jump when you let go, even though they had already moved into place while dragging. And after a refresh, the sidebar showed the default order for a moment before snapping to yours.
The jump on drop had three causes:
.sidebar-link's CSStransformtransition, which fights dnd-kit fortransform. On drop, the dropped row animated in from its old drag offset, about 170px away. Sidebar playlist rows now leavetransformto dnd-kit.The flash on refresh was a waterfall: the sidebar mounted only after playlist status loaded, and only then fetched your order. It now mounts right away, so both requests run in parallel, and it renders once the order is known.
Proof: in a browser against Eden, a frame-by-frame probe of row positions showed the dropped row starting about 170px off and the list shifting 3px on
main. With this change, every row stays at its mid-drag position through the drop. With a 4s delay added locally to the order endpoint,mainpainted the default order and then snapped; this branch paints the saved order first.pnpm run checkandpnpm testpass.Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved
Created with Opus 5.5 in Claude Code (T3 Code).