-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[AGILE-251] Migrate Backlogs to Pragmatic DnD #23218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
myabc
wants to merge
117
commits into
dev
Choose a base branch
from
implementation/74970-backlogs-pragmatic-dnd
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7,157
−877
Open
Changes from 90 commits
Commits
Show all changes
117 commits
Select commit
Hold shift + click to select a range
956cdd9
Document Backlogs drag and drop language
myabc 66bbb7e
Add Pragmatic Drag and Drop dependencies
myabc f18c69e
[AGILE-251] Port backlogs to Pragmatic DnD
myabc aa5262f
Switch to gray row hover color
myabc 64cae4a
Strip include-fragment nodes from previews
myabc 2a6f4c4
Extract Backlogs::MoveTarget value object
myabc 38bb518
Use Backlogs move URL template for drag and drop
myabc eb09fc5
[AGILE-284] Reorder sortable lists optimistically
myabc ac738af
Split sortable list DOM helpers from DnD module
myabc 1f5f8a0
Extract drop intent resolution from controller
myabc ac12abd
Preserve Pragmatic DnD morph markers
myabc 98b60e9
Tighten sortable drop intent
myabc 760dbf4
Avoid duplicate move failure toasts
myabc d4ddd2f
Keep Backlogs list refresh connected
myabc 2fdc804
Normalize Backlogs card row padding
myabc 22a47b4
Permit position moves in Backlogs
myabc 6756858
Fix Backlogs DnD probe assertions
myabc 4a3c463
Remove obsolete sortable refresh code
myabc 11582a1
Stabilize sortable list request specs
myabc dab2a0d
Harden Backlogs DnD edge cases
myabc 7055e4e
Stabilize 422 rollback spec
myabc 42f050d
Handle Backlogs menu modal cleanup
myabc 7c43cf3
Add url-template frontend dependency
myabc c63c266
Expand sortable move URLs via url-template
myabc 7b9bcf3
Remove per-item move URL from sortable lists
myabc efd516f
Scope Pragmatic DnD morph guard to sortable roots
myabc 171a8c5
Move Box list styles to BorderBoxListComponent
myabc 30ebba4
Remove border from drag preview
myabc 80bb755
Apply box-list-item state colors to card rows
myabc f5038ad
Show first-row state border in transparent lists
myabc 5da17b8
[AGILE-272] Remove rounded corners on edge rows
myabc 4ff6b3b
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 2aab2f7
Stop Backlogs story spec nav leak
myabc 9b1486c
Add useServices mixin for Angular services
myabc dca73e2
Handle menu close race in Backlogs dismiss_menu
myabc 899edbd
Factor list_id into Backlogs move target checks
myabc 39955b7
Declare Backlogs controllers on the turbo frame
myabc 56af6d6
Preserve grab offset on Backlogs drag preview
myabc d80e063
Use list target data for drops
myabc e8b14ee
Remove redundant type check on drop
myabc cda8028
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc d488ce1
Move edge-borders mixin to top of sass file
myabc 69ad88f
Fix backlogs move-to-sprint spec
myabc 7e3453b
Replace move spinner with progress bar
myabc d54f9e7
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 43918a9
Fix Firefox drag preview offset under pointer
myabc a5f3b48
Add Reorder and Move to Backlogs glossary
myabc 7522e89
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 7e4c9cb
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc ab20102
UX/UI feedback round: Remove progress bar
myabc 9d7d9b4
Bump @types/hotwired__turbo from 8.0.10 to 8.0.11 in /frontend
myabc 36547ee
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 7139e84
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 950cd1e
Fix backlog DnD filter preservation
myabc ec8f076
Stabilize inbox show all URL expectation
myabc 8331016
[AGILE-302] Do not carry the filter state in all the backlog urls
dombesz 2d26a66
Fix specs
dombesz 9936030
Use the backlogs story#openSplitPane action inside the work package m…
dombesz 9d57bbe
Merge branch 'dev' into 74970-backlogs-pragmatic-dnd
myabc a942005
Update menu specs for openSplitPane action
myabc d333de0
Fix frontend typed-lint on sortable-lists specs
myabc ac0fdf3
Split sortable-lists DnD into outlet controllers
myabc b9582a2
Harden sortable-lists DnD and document contract
myabc bd0ef00
Refine sortable-lists DnD morph and guards
myabc ac4c433
Add configurable drop position for sortable lists
myabc 86524cd
Add drop-zone outline for sortable list containers
myabc c28621c
Outline list only when no row is targeted
myabc 1bf420a
Set user-select: none on cards
myabc e47d792
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 939dbdf
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 3479ec6
Bump Pragmatic Drag and Drop dependencies
myabc de811fa
Merge remote-tracking branch 'origin/dev' into implementation/74970-b…
myabc 7ce4b9e
Run npm audit fix
myabc c3b9162
Wait for backlogs frame reload in DnD specs
myabc 3d18ded
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 2057ea1
Delegate backlogs turbo wait to shared helpers
myabc 6b5046b
Align backlogs turbo wait default with Capybara
myabc b4cf115
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc d17290e
Rename Backlogs story controller to work-package
myabc de3ac38
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 62e9627
Regenerate package-lock.json from dev
myabc aa9dfd2
Ignore blank position params in backlogs moves
myabc 77e68f6
Preserve split view selection across Turbo morphs
myabc 1cf8a01
Preserve drop indicator markers across morphs
myabc 4eec777
Remove dead drag handle check in backlogs cards
myabc 99cd753
Add drop zone overlay to empty backlogs lists
myabc 25abcd9
Drop inert frame attributes from backlogs partial
myabc fb0fb84
Placate Yamllint: sort Backlog component keys
myabc f61a453
Hide empty-state row once sibling rows exist
myabc 1731e92
Consolidate border box list component styles
myabc 29f095e
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc 688a6b4
Suppress native drags on work-package card links
myabc 980c9d4
Flag PDD-internal morph marker attribute
myabc 4f073c2
Extract sortable-lists scrollable controller
myabc c2d3fa9
Use Backlogs target list types
myabc 8fbd268
Hoist sortable list PDD mocks
myabc b9f317c
Scope backlogs drag styling to the border-box list
myabc e99c2a8
Guard optimistic rollback against detached DOM
myabc 7f3e261
Clear drop indicator when a sortable item disconnects
myabc f1be723
Document the sortable-lists drop container
myabc bb7f5f4
Remove dead backlogs spec page helpers
myabc 3777403
Tidy backlogs move controller conventions
myabc cbba52d
Wrap over-long backlogs lines
myabc 4f00894
Refresh stale sortable-lists controller comments
myabc 5b4ae95
Narrow resolveDropIntent with type guards
myabc 2a617b6
Skip the source list as a list-level drop target
myabc 850bb51
Extract the sortable-lists toaster event constant
myabc eff6cc4
Revert "Skip the source list as a list-level drop target"
myabc 9007cc4
Colocate the sortable list busy state on the list
myabc 1277399
Cap the backlogs DnD pickup retry via retry_block
myabc c330ed0
Extract the sortable item drag preview builder
myabc 9d6117a
Add, integrate stimulus-elements
myabc 2824dac
Carry the rows container on the list payload
myabc 6efcf64
Resolve sortable rows from the rows container
myabc 862c81e
Document the structural rows vocabulary
myabc b58afc8
Flag the drag source row's residual li lookup
myabc 30e72ac
Merge branch 'dev' into implementation/74970-backlogs-pragmatic-dnd
myabc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
app/components/open_project/common/border_box_list_component/empty_state.html.erb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <%# -- copyright | ||
| OpenProject is an open source project management software. | ||
| Copyright (C) the OpenProject GmbH | ||
|
|
||
| This program is free software; you can redistribute it and/or | ||
| modify it under the terms of the GNU General Public License version 3. | ||
|
|
||
| OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: | ||
| Copyright (C) 2006-2013 Jean-Philippe Lang | ||
| Copyright (C) 2010-2013 the ChiliProject Team | ||
|
|
||
| This program is free software; you can redistribute it and/or | ||
| modify it under the terms of the GNU General Public License | ||
| as published by the Free Software Foundation; either version 2 | ||
| of the License, or (at your option) any later version. | ||
|
|
||
| This program is distributed in the hope that it will be useful, | ||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| GNU General Public License for more details. | ||
|
|
||
| You should have received a copy of the GNU General Public License | ||
| along with this program; if not, write to the Free Software | ||
| Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
|
|
||
| See COPYRIGHT and LICENSE files for more details. | ||
|
|
||
| ++# %> | ||
|
|
||
| <%= render(Primer::Box.new(classes: "op-border-box-list-empty-state")) do %> | ||
| <%= render(blankslate) %> | ||
|
|
||
| <% if drop_target_label %> | ||
| <%# The overlay only duplicates the drop affordance for pointer | ||
| interactions, so it is hidden from assistive technology. %> | ||
| <%= render(Primer::Box.new(aria: { hidden: true }, classes: "op-border-box-list-empty-state--drop-overlay")) do %> | ||
| <%= render(Primer::Beta::Text.new(tag: :p, font_size: 4)) { drop_target_label } %> | ||
| <% end %> | ||
| <% end %> | ||
| <% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,8 @@ | |
| module OpenProject | ||
| module Common | ||
| class BorderBoxListComponent | ||
| # Empty-state content rendered as a Primer Blankslate. | ||
| # Empty-state content rendered as a Primer Blankslate, wrapped in an | ||
| # empty-state container that can host a drop-zone overlay. | ||
| # | ||
| # This component is part of {BorderBoxListComponent} and should not be | ||
| # used as a standalone component. | ||
|
|
@@ -44,13 +45,24 @@ class EmptyState < ApplicationComponent | |
| # @param icon [Symbol, nil] optional Primer icon. | ||
| # @param interactive [Boolean] whether empty-state updates should be | ||
| # announced politely to assistive technology. | ||
| # @param drop_target_label [String, nil] when given, renders a drop-zone | ||
| # overlay with this label. The overlay becomes visible while a | ||
| # sortable item hovers the surrounding `[data-drop-container]` list. | ||
| # @param system_arguments [Hash] forwarded to `Primer::Beta::Blankslate`. | ||
| def initialize(title:, description: nil, icon: nil, interactive: false, **system_arguments) | ||
| def initialize( | ||
| title:, | ||
| description: nil, | ||
| icon: nil, | ||
| interactive: false, | ||
| drop_target_label: nil, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure about the naming |
||
| **system_arguments | ||
| ) | ||
| super() | ||
|
|
||
| @title = title | ||
| @description = description | ||
| @icon = icon | ||
| @drop_target_label = drop_target_label | ||
|
|
||
| @system_arguments = system_arguments | ||
| return unless interactive | ||
|
|
@@ -62,13 +74,17 @@ def initialize(title:, description: nil, icon: nil, interactive: false, **system | |
| ) | ||
| end | ||
|
|
||
| def call | ||
| private | ||
|
|
||
| attr_reader :drop_target_label | ||
|
|
||
| def blankslate | ||
| blankslate = Primer::Beta::Blankslate.new(**@system_arguments) | ||
| blankslate.with_heading(tag: :h4).with_content(@title) | ||
| blankslate.with_description_content(@description) if @description | ||
| blankslate.with_visual_icon(icon: @icon) if @icon | ||
|
|
||
| render(blankslate) | ||
| blankslate | ||
| end | ||
| end | ||
| end | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,12 +78,7 @@ def initialize( | |
| def row_args | ||
| row_arguments = @system_arguments.deep_dup | ||
| row_arguments[:id] ||= dom_id(work_package) | ||
| row_arguments[:tabindex] ||= 0 | ||
| row_arguments[:test_selector] ||= "work-package-#{work_package.id}" | ||
| row_arguments[:classes] = class_names( | ||
| row_classes, | ||
| row_arguments[:classes] | ||
| ) | ||
| row_arguments[:data] = merge_data( | ||
| { data: row_data }, | ||
| row_arguments | ||
|
|
@@ -110,15 +105,14 @@ def card | |
| # | ||
| # @return [ApplicationComponent] | ||
| def build_card | ||
| WorkPackageCardComponent.new(work_package:) | ||
| WorkPackageCardComponent.new(work_package:, classes: card_classes) | ||
| end | ||
|
|
||
| def row_classes | ||
| def card_classes | ||
| class_names( | ||
| "Box-row--hover-blue", | ||
| "Box-row--focus-gray", | ||
| "Box-row--clickable", | ||
| "Box-row--draggable" => draggable? | ||
| "Box-card", | ||
| "Box-card--clickable", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for follow up: implement a |
||
| "Box-card--draggable" => draggable? | ||
| ) | ||
| end | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems overly complex for something that is only 8px high and partially overlapped by the drag element.. But I guess that was coming from the product team, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HDinger this styling is something I/Claude came up with. @psatyal and I will revisit this over the coming days - although the current appearance shouldn't be a blocker either.