test(query-devtools/Devtools): add test for restoring 'width' to the rendered minimum after a drag clamp#10763
Conversation
…rendered minimum after a drag clamp
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a single test case to the Devtools test suite that verifies panel width restoration behavior. When a user drags the devtools panel resize handle to shrink it below the minimum content width, the component restores the stored width to match the actual rendered minimum, ensuring the panel does not collapse below its content. ChangesDevtools Panel Resize Behavior Test
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit d0ffe78
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|
🎯 Changes
Extend
Devtools.test.tsxwith a test that locks thelocalStore.width < newWidthrestore branch in the resize drag handler — when a drag clamps the stored width down tominWidth(192px) but the panel'smin-width: min-contentkeeps it rendered wider than that, production should write the rendered width back tolocalStore.widthto keep open/close transitions smooth.Added cases (
resize handle, 1):should restore "width" to the rendered minimum when the panel is dragged below its content width— sits next to the existing clamp-only case but mocksgetBoundingClientRectso that the rendered width (250px) stays aboveminWidthafter the drag, then asserts thatlocalStorage.widthis restored from the clamped 192px back up to 250px.✅ Checklist
pnpm run test:pr.🚀 Release Impact