[MGNLUI-8135] Drag and Drop action only moves visible selected items Created: 23/Jun/23 Updated: 12/Sep/23 Resolved: 17/Jul/23 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | 6.2.36 |
| Fix Version/s: | 6.3.0, 6.2.37 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Jordan Elmore | Assignee: | Quach Hao Thien |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | VN-Analysis, VN-Maintenance | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 6d 1.5h | Time Spent: | 6d 1.5h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Attachments: |
|
|||||||||||||||||||||||||
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| Template: | ||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
|||||||||||||||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
|||||||||||||||||||||||||
| Date of First Response: | ||||||||||||||||||||||||||
| Visible to: |
Chuck Aksamit
|
|||||||||||||||||||||||||
| Sprint: | Nucleus 40 | |||||||||||||||||||||||||
| Story Points: | 3 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Work Started: | ||||||||||||||||||||||||||
| Approved: |
Yes
|
|||||||||||||||||||||||||
| Description |
| Comments |
| Comment by Quach Hao Thien [ 03/Jul/23 ] |
DiscoveryThis is the expected behavior of Vaadin Grid Drag&Drop as explained in this vaadin ticket Propose solution:
|
| Comment by Roman Kovařík [ 03/Jul/23 ] |
|
Could we just move the dragged items + items in ValueContext? |
| Comment by Quach Hao Thien [ 03/Jul/23 ] |
Discovery UpdateThis is the expected behavior of Vaadin Grid Drag&Drop as explained in this vaadin ticket Propose solution:
@Override protected List<T> getDraggedItems() { return new ArrayList<>(super.getGridDragSource().getGrid().getSelectedItems()); } By using this approach, we ignore the data send from client and using the selectedItems in the grid itself as draggedItems
|
| Comment by Quach Hao Thien [ 12/Jul/23 ] |
SolutionAs the default behavior of Vaadin, not all the selected items are able to be Dragged&Dropped unless they're all visible on the view (the screen). The solution to fix this problem is to revise that behavior by using patching on the Vaadin client code, and allowing drag&drop all selected items without any issue. More detail of the patch: https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/browse/magnolia-ui-vaadin-common-widgets/src/main/patches/griddragsourceconnector.txt#26,36 |
| Comment by Roman Kovařík [ 14/Jul/23 ] |
|
So I've heard that the reason for this approach was that the quickfix described in the discovery wouldn't fix the "counting badger". So I guess instead of hiding the badger or other solution, we've patched the client side. Could this have some performance issues? I see it's iterating whole dataset, is it really the whole dataset (e.g. thousands of items)? |
| Comment by Quach Hao Thien [ 17/Jul/23 ] |
Solution changed:
|