Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@andriidudar
Copy link
Contributor

Details

Fix drag-and-drop reordering issues where items could be dragged horizontally outside the container, creating unwanted horizontal scrolling.

Changes:

  • Add restrictToVerticalAxis modifier from @dnd-kit/modifiers to all DndContext components that use vertical list sorting. This constrains the drag transform to vertical movement only.
  • Fix height distortion in Playground messages by using CSS.Translate.toString() instead of CSS.Transform.toString() to avoid scale transformations during drag.

Affected components:

  • LLMPromptMessages - Playground message reordering
  • LLMPromptMessage - Height distortion fix
  • SortableMenuSection - Columns menu reordering
  • GroupsButton - Groups popover reordering
  • GroupsContent - Groups panel reordering

Change checklist

  • User facing

Issues

  • OPIK-3225

Testing

  1. Open Playground and add multiple messages with different heights
  2. Drag to reorder messages - verify they can only move vertically and maintain their height
  3. Open Columns menu and drag to reorder - verify items stay within bounds
  4. Open Groups popover and drag to reorder - verify items stay within bounds

Documentation

N/A - Bug fix only

Add restrictToVerticalAxis modifier to DndContext components to prevent
dragged items from moving horizontally outside the container bounds.

Also fix height distortion in Playground messages by using CSS.Translate
instead of CSS.Transform to avoid scale transformations during drag.

Affected components:
- LLMPromptMessages (Playground message reordering)
- LLMPromptMessage (fix height distortion)
- SortableMenuSection (Columns menu reordering)
- GroupsContent (Groups panel reordering)
- GroupsButton (Groups popover reordering)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@andriidudar andriidudar requested a review from a team as a code owner February 5, 2026 10:49
@andriidudar andriidudar merged commit 12e82a5 into main Feb 5, 2026
10 checks passed
@andriidudar andriidudar deleted the andriidudar/OPIK-3225-fix-drag-drop-horizontal-scroll branch February 5, 2026 10:53
miguelgrc pushed a commit that referenced this pull request Feb 9, 2026
…5087)

Add restrictToVerticalAxis modifier to DndContext components to prevent
dragged items from moving horizontally outside the container bounds.

Also fix height distortion in Playground messages by using CSS.Translate
instead of CSS.Transform to avoid scale transformations during drag.

Affected components:
- LLMPromptMessages (Playground message reordering)
- LLMPromptMessage (fix height distortion)
- SortableMenuSection (Columns menu reordering)
- GroupsContent (Groups panel reordering)
- GroupsButton (Groups popover reordering)

Co-authored-by: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants