Skip to content

[#74195] Fix incorrect indentation on drag preview#22883

Merged
toy merged 1 commit intodevfrom
bug/74195-backlog-card-drag-preview-incorrect-padding
Apr 22, 2026
Merged

[#74195] Fix incorrect indentation on drag preview#22883
toy merged 1 commit intodevfrom
bug/74195-backlog-card-drag-preview-incorrect-padding

Conversation

@myabc
Copy link
Copy Markdown
Contributor

@myabc myabc commented Apr 22, 2026

Ticket

https://community.openproject.org/wp/74195

What are you trying to accomplish?

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
See #22838

Screenshots

See #22838

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

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
@myabc myabc requested review from Copilot and toy April 22, 2026 18:40
@myabc myabc added bugfix styling ruby Pull requests that update Ruby code tinyfix labels Apr 22, 2026
@myabc myabc marked this pull request as ready for review April 22, 2026 18:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BacklogBucketComponent drop target config to set data-generic-drag-and-drop-target="container mirrorContainer" so Dragula mounts the mirror into the bucket container instead of document.body.

def drop_target_config
{
generic_drag_and_drop_target: "container",
generic_drag_and_drop_target: "container mirrorContainer",
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@toy toy merged commit f16498a into dev Apr 22, 2026
31 checks passed
@toy toy deleted the bug/74195-backlog-card-drag-preview-incorrect-padding branch April 22, 2026 18:48
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix needs review ruby Pull requests that update Ruby code styling tinyfix

Development

Successfully merging this pull request may close these issues.

3 participants