Skip to content

fix(settings): keep the footer item's proportions while dragging - #685

Merged
omartelo merged 1 commit into
mainfrom
fix/footer-drag-overlay-proportion
Oct 8, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/footer-drag-overlay-proportion

Conversation

@omartelo

@omartelo omartelo commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

Dragging an item in Settings > Footer showed it wrapped into a taller, narrower block: "PR #123" broke over two lines under the pointer.

Cause

dnd-kit sizes the DragOverlay to the rect of the chip it lifted, but the overlay's content used its own metrics (px-2.5, a size-4 glyph, no whitespace-nowrap). Wider content in the chip's width wrapped.

Fix

The overlay wears the chip's own button metrics (buttonVariants({ variant: "ghost", size: "xs" })) plus the chip's ring, on a bg-popover fill with a shadow.

Verification

  • pnpm exec biome ci . exit 0, tsc -b clean, footer-layout.test.ts green.
  • Not checked by hand in task dev: the frontend suite does not render components, so the visual result is unverified.

@omartelo
omartelo force-pushed the fix/footer-drag-overlay-proportion branch from a615e38 to b0e85e4 Compare October 8, 2026 20:14
@omartelo
omartelo merged commit 892e75c into main Oct 8, 2026
7 checks passed
@omartelo
omartelo deleted the fix/footer-drag-overlay-proportion branch October 8, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant