[DevTools] More robust resize handling #34036
Merged
+67
−68
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.
Follow-up to #18046
Best reviewed without whitespace changes
Switches to Pointer Events for the resize handling in the Components tab. Pointer events are supported in all evergreen browsers and iOS 13. The main motivation is that this fixes a disorienting horizontal scroll when you resized.
It also fixes various other edge cases where you get stuck in resize mode even though you actually considered the interaction cancelled because pointers can actually escape the window without a pointerup.
With pointer capture we also get a consistent cursor even if you you quickly resize or move the cursor outside the window.
Before:
CleanShot.2025-07-29.at.11.00.30.mp4
After:
CleanShot.2025-07-29.at.11.12.17.mp4
I verified all interactions in the Chrome extension as well.
I included drive-by fixes which are also scrolling related:
Disabled text selection of the tree
You could only select the keys and entering text selection mode entered scroll mode which I found confusing
Before:
CleanShot.2025-07-29.at.11.06.03.mp4
Prevent scroll+resize mode
The resize bar overlapped with the Component tree scroll container. If you clicked right on the edge, you scrolled the tree while resized. I found that confusing and it's likely not intended. Otherwise we should fully overlap the bar and tree so that you don't have to aim at a 2px overlap.
Before:
CleanShot.2025-07-29.at.11.07.45.mp4
Minimum width of left column to avoid double scrollbars

Before:
After: