Repository navigation
fix(panel): restore the committed width when a drag ends early - #147
pratikbuilds wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA. |
821f795 to
8939bfd
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Request changes
Summary
The useResizable drag-teardown change in src/hooks/use-resizable.ts and src/hooks/use-resizable.test.ts is clean and passes bun run check, but the branch commit history and PR title/description still contain the backed-out PanelContent pane-switch change (8939bfd + revert commit e787090).
Blockers
git log main..HEAD(8939bfd,e787090) (reviewer) —8939bfdintroduced both theuseResizabledrag-teardown fix and thePanelContentpane-focus change, ande787090(fix(panel): leave pane focus for its own change) revertedsrc/ui/panel.tsx,e2e/panel.spec.ts, ande2e/fixtures.tsx. Both commits also have body lines exceeding 72 characters (e787090is 91 chars;8939bfdhas 73–75 char lines and still describes the revertedPanelContentchange). PerCONTRIBUTING.md:36-40, squash into a single commit whose subject and<= 72-char body lines describe only theuseResizabledrag-teardown fix.- PR
#147title and body (reviewer) — The PR title (fix(panel): restore the committed width and keep focus on pane switch) and PR body (Summaryitem 16 andVerificatione2e/panel.spec.ts) still claim the revertedPanelContentchange, which also causescorbits-triageto fail (Focused: mixes unrelated changes). Update the PR title and body to match theuseResizablediff.
Should-fix
None.
Informational
None.
Nothing triage asked to change still fails, so this request no longer stands.
A drag that ends without a release, such as a new press on the handle or the hook unmounting, now drops the preview and puts back the committed `--resizable-width`, so the CSS width and controlled state cannot diverge. The reset moves from `commit` into the drag's teardown, which every end path runs. Pointercancel and lost capture still commit the preview, as before.
e787090 to
03751f5
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Approving. An early drag end restores the committed width and does not commit. A finished drag, including pointercancel and lostpointercapture, still commits once.
History is only the useResizable fix. The pane-focus change is not in this diff.
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. |
Nothing triage asked to change still fails, so this request no longer stands.
Summary
A drag that ends without a release, such as a new press on the handle or the hook unmounting, now drops the preview and puts back the committed
--resizable-width, so the CSS width and controlled state cannot diverge (finding 15). The reset moves fromcommitinto the drag's teardown inuseResizable, which every end path runs. Pointercancel and lost capture still commit the preview, as before.Verification
bun run checkuse-resizable.test.tsCloses #142