test(query-devtools/Devtools): add test for clamping the width when resizing below min width#10702
Merged
sukvvon merged 2 commits intoMay 13, 2026
Conversation
…esizing below min width
|
View your CI Pipeline Execution ↗ for commit 7c52a91
☁️ Nx Cloud last updated this comment at |
Contributor
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
Contributor
size-limit report 📦
|
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.
🎯 Changes
Adds a test for
Devtools.tsxcovering the resize handleminWidthclamp branch:should clamp the width to the minimum when dragging shrinks the panel below the minimum widthIn
left/rightpositions, when the user drags the resize handle past the 192px (12rem) minimum, the panel width is clamped to that minimum. This is the horizontal counterpart of the verticalminHeightclamp covered in #10698. No existing case covered this branch.getBoundingClientRectis read twice during drag: once as the base size, and again after the clamp to detect when the panel has hit its minimum. The first call is stubbed toinitialWidthand the second to0, so only thenewSize < minWidthclamp branch is observed (thelocalStore.width < newWidthrestore branch stays inactive).Coverage delta on
Devtools.tsx: Stmts 95.30 → 95.40, Branch 78.19 → 78.88, Lines 96.07 → 96.18.✅ Checklist
pnpm run test:pr.🚀 Release Impact