fix(ui): stop task cards teleporting when a sidebar toggles - #2
Closed
Limdongcheng wants to merge 1 commit into
Closed
fix(ui): stop task cards teleporting when a sidebar toggles#2Limdongcheng wants to merge 1 commit into
Limdongcheng wants to merge 1 commit into
Conversation
fit_layout translated a card rigidly with its anchored boundary's displacement, so hiding the secondary sidebar teleported every right-anchored card by the full sidebar width even when it was parked mid-board — the user then had to drag it all the way back. CardLayout now keeps the user-intended rectangle (`preferred`) separate from the fitted one: only an edge resting on a boundary follows that boundary (the default top-right docking), a parked card keeps its absolute position and is merely clamped inside the new bounds, and a card that a sidebar pushed aside returns to its place once the boundary recedes. Drag and resize gestures write both rectangles, so drag origins always match what is on screen. A full-render regression test drives sidebars, workspace geometry and the Processing card through a hide/drag sequence; fit-level tests pin the parked-stays-put and displaced-returns semantics.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This was referenced Aug 28, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Root cause
fit_layouttranslated a card rigidly with its anchored boundary's displacement: hiding the secondary sidebar teleported every right-anchored card by the full sidebar width even when the card was parked mid-board, and the user then had to drag it all the way back. Drag origins were taken from the stored layout rect, which no longer matched what was on screen — the first stretch of a drag was spent "catching up" the discrepancy.Fix
CardLayoutnow keeps the user-intended rectangle (preferred) separate from the fitted one:Tests
A full-render regression test drives sidebars, workspace geometry and the Processing card through a hide/drag sequence; fit-level tests pin the parked-stays-put and displaced-returns semantics.
cargo pr-checkpasses.Part 1 of a 6-PR stack (task-card geometry → clickable affordance → H/F fits → peak snap → peaks follow reference → reference on-plot pick).