Skip to content

[#74552] Wrong pane (Backlog/Buckets, not Sprints) autoscrolls#23117

Merged
myabc merged 2 commits intorelease/17.4from
bug/74552-wrong-pane-autoscrolled
May 8, 2026
Merged

[#74552] Wrong pane (Backlog/Buckets, not Sprints) autoscrolls#23117
myabc merged 2 commits intorelease/17.4from
bug/74552-wrong-pane-autoscrolled

Conversation

@myabc
Copy link
Copy Markdown
Contributor

@myabc myabc commented May 7, 2026

Ticket

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

What are you trying to accomplish?

Fix a Backlogs drag-and-drop regression where dragging a work package from the backlog/bucket pane into a sprint can autoscroll the backlog side instead of the sprint side (seen in Firefox and Crome).

This effectively reverts the drag-preview/mirror-container behavior introduced or expanded in:

Screenshots

What approach did you choose and why?

Remove the optional mirrorContainer target from the generic drag-and-drop Stimulus controller and stop marking the Backlogs inbox/buckets as mirror containers. This lets Dragula append the drag mirror to its default container again, which avoids the wrong pane being selected for autoscroll while dragging backlog items into sprint lists.

Merge checklist

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

@myabc myabc changed the base branch from dev to release/17.4 May 7, 2026 15:47
@myabc myabc changed the title Bug/74552 wrong pane autoscrolled [#74552] Wrong pane (Backlog/Buckets, not Sprints) autoscrolls May 7, 2026
@myabc myabc marked this pull request as ready for review May 7, 2026 15:55
Copilot AI review requested due to automatic review settings May 7, 2026 15:55
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 fixes a Backlogs drag-and-drop regression where dragging from the backlog/buckets pane into a sprint could autoscroll the wrong pane by reverting the mirrorContainer customization and letting Dragula use its default mirror container behavior again.

Changes:

  • Removed the optional mirrorContainer Stimulus target and the corresponding Dragula option from generic-drag-and-drop.
  • Updated Backlogs inbox and backlog buckets to no longer declare themselves as mirrorContainer targets (now only container).
  • Removed specs that asserted the old mirrorContainer behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/backlogs/spec/requests/backlogs/backlog_spec.rb Removes request-level assertions around mirrorContainer rendering for inbox/buckets.
modules/backlogs/app/components/backlogs/inbox_component.rb Stops rendering mirrorContainer as a drag-and-drop target on the inbox BorderBox.
modules/backlogs/app/components/backlogs/backlog_bucket_component.rb Stops rendering mirrorContainer as a drag-and-drop target on backlog bucket BorderBoxes.
frontend/src/stimulus/controllers/dynamic/generic-drag-and-drop.controller.ts Removes mirrorContainer target support and no longer passes mirrorContainer to Dragula.
frontend/src/stimulus/controllers/dynamic/generic-drag-and-drop.controller.spec.ts Removes unit tests for the deleted resolveMirrorContainer behavior.

Comment thread modules/backlogs/app/components/backlogs/inbox_component.rb
@myabc myabc added the styling label May 7, 2026
@myabc myabc added this to the 17.4.x milestone May 7, 2026
@EinLama EinLama self-requested a review May 8, 2026 12:59
Copy link
Copy Markdown
Contributor

@EinLama EinLama left a comment

Choose a reason for hiding this comment

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

Works perfectly 👏 :shipit:

@myabc myabc merged commit 688d228 into release/17.4 May 8, 2026
12 checks passed
@myabc myabc deleted the bug/74552-wrong-pane-autoscrolled branch May 8, 2026 13:05
@github-actions github-actions Bot locked and limited conversation to collaborators May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

3 participants