[#74195] Fix incorrect indentation on drag preview#22883
Conversation
Reapplies fix for `InboxComponent` to `BacklogBucketComponent`: The (first) bucket wires its own list element as both `container` and `mirrorContainer`, which keeps the dragged card visually aligned with the rest of the inbox rather than jumping to the page edge. See 62105d9 https://community.openproject.org/wp/74195
There was a problem hiding this comment.
Pull request overview
This PR addresses a UI issue in Backlogs drag-and-drop where the drag preview (mirror) can appear incorrectly indented by ensuring backlog buckets provide a dedicated mirrorContainer, matching the behavior already used by InboxComponent.
Changes:
- Update
BacklogBucketComponentdrop target config to setdata-generic-drag-and-drop-target="container mirrorContainer"so Dragula mounts the mirror into the bucket container instead ofdocument.body.
| def drop_target_config | ||
| { | ||
| generic_drag_and_drop_target: "container", | ||
| generic_drag_and_drop_target: "container mirrorContainer", |
There was a problem hiding this comment.
This change affects drag preview positioning for backlog buckets, but there is no regression test covering the backlog-buckets-enabled path. The existing request spec only asserts the mirror container for the (legacy) inbox component; please add a similar expectation under with_flag: { backlog_buckets: true } to ensure BacklogBucketComponent (or at least the first rendered bucket/inbox bucket) renders data-generic-drag-and-drop-target="container mirrorContainer" so this fix doesn’t regress again.
Ticket
https://community.openproject.org/wp/74195
What are you trying to accomplish?
Reapplies fix for
InboxComponenttoBacklogBucketComponent:The (first) bucket wires its own list element as both
containerandmirrorContainer, which keeps the dragged card visually aligned with the rest of the inbox rather than jumping to the page edge.See 62105d9
See #22838
Screenshots
See #22838
Merge checklist