Repository navigation
fix(studio): a refused sealed press always puts the box back on the layer - #8735
Conversation
…nswered-press-refused
…press or a cleared selection
…re it left the layer
vanceingalls
left a comment
There was a problem hiding this comment.
No code blocker at 6825e65. drawBack defers to the earlier press when it was refused and otherwise draws the press's own box, so the box returns to the layer after two refused presses, and also when the selection clears mid-wait (the draw-back now runs before the selection check; the message still needs one). The body names tests that fail without the fix and has before and after captures. This PR is stacked on #8720, so I am not approving yet: approve once retargeted to main after #8720 merges.
…used-press-box-back # Conflicts: # packages/studio/src/components/editor/previewGestureStarts.ts # packages/studio/src/components/editor/previewOverlayRects.test.ts
vanceingalls
left a comment
There was a problem hiding this comment.
Base is main now, but the branch cannot merge as it stands: GitHub reports it conflicting with main (DIRTY). The head still carries #8720's five individual commits, and #8720 landed on main as one squash commit. Against main the diff therefore shows #8720's changes again, not only this PR's.
The content is already the same: the three studio files on main are byte-identical to #8720's last head. So a rebase onto main, or a merge of main, should leave only this PR's own two commits (3 files, about 70 changed lines), with no real conflict. No code blocker in that change; my earlier read stands. Push that and ping me, and I approve the new head once its checks are green.
Edit accuracy: accurate 273 (base branch 271), smooth 79 of thoseThe gate passes. Newly passing (2)
Not banked yet, reported and not gated (bank a full-grid run's baseline.json) (2)
Quarantined, measured but not gated (0) |
vanceingalls
left a comment
There was a problem hiding this comment.
Approved at 6f1d747. Base is main, the branch merges cleanly, and the diff against main is only this PR's own change: 3 studio files, about 70 changed lines. The new head is a merge of main; the three studio files are byte-identical to the 6825e65 I reviewed, so my earlier read stands with no code blocker. All checks are green on this head.
What
When a sealed preview answers neither of two presses in a row, Studio's selection box now goes back onto the layer. Before, it stayed where the first drag ended. It also goes back when the selection clears while the press waits.
Stacked on #8720 (base
fix/studio-sealed-unanswered-press-refused). It retargets tomainonce #8720 merges, so main's Build and Studio gates run on it only then.Why
#8720 refuses a press the frame never answers and draws Studio's box back to where that press found it. Its review found two cases where the box stays off the layer. Both happen only in a sealed preview:
Related work
Follows #8720. Refs #7846 (Studio's preview sealed by default).
How
components/editor/previewGestureStarts.ts:drawBack). If the press before it was refused too, it defers to that press, so the box goes where the layer still is. If the press before it started, its own box is where that press dropped the layer.refused. The draw-back runs before the message, whether or not a selection is left. The message still needs one.components/editor/domEditOverlayGestures.ts: the two fields onWaitingPressState.Test plan
src/components/editor/previewOverlayRects.test.ts,puts the box back on the layer when two presses in a row go unansweredandputs the box back on the layer when the selection clears while an unanswered press waitsboth failed on fix(studio): a sealed drag the preview never answers is refused, not saved wrong #8720's code, with the box left atleft: 31instead ofleft: 1.puts the box where a started press left it when the press after it goes unanswered: the first press starts, the second is refused, and the box stays where the first one dropped the layer.Before
#8720's code: the box is left where the first drag ended, off the layer.
After
This branch: the box is back on the layer.