[pull] main from tldraw:main#591
Merged
Merged
Conversation
In order to keep selection chrome consistent while you point at selected shapes and selection handles, this PR aligns the relevant overlay visibility states. Previously, when an arrow bound to two shapes was selected, pressing down on its body would immediately show endpoint handles, but the dashed binding preview line would only appear on pointer up or long press. The two overlays disagreed about `select.pointing_shape`, so the handles appeared without their accompanying preview line. This PR hides selected shape handles during that state so both overlays appear together on pointer up or when a long press promotes the gesture into translating. This PR also keeps selected shape indicators visible while pointing resize and rotate selection handles. `ShapeIndicatorOverlayUtil` already handled the older `select.pointing_handle` state, but selection resize and rotate handles use `select.pointing_resize_handle` and `select.pointing_rotate_handle`, so indicators disappeared as soon as those handles were pressed. ### Change type - [x] `bugfix` ### Test plan 1. Create an arrow bound to two shapes. 2. Select the arrow, then press and hold on its body. 3. While holding, no endpoint handles should be shown, matching the hidden dashed preview line. 4. Release, or long press to start translating; handles and the dashed preview should appear together. 5. Select a shape, then press a resize or rotate selection handle. 6. While holding the handle before dragging, the selected shape indicator should remain visible. - [x] Unit tests ### Release notes - Fix selected shape handles appearing on pointer down before the arrow binding preview. - Fix selected shape indicators disappearing while pressing resize and rotate selection handles. ### Code changes | Section | LOC change | | --------- | ---------- | | Core code | +11 / -3 | | Tests | +54 / -2 |
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )