Bug 475104 - Kirigami Gallery - List View - Drag doesn't work
Summary: Kirigami Gallery - List View - Drag doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kirigami gallery
Classification: Applications
Component: general (other bugs)
Version First Reported In: 23.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-01 18:39 UTC by Schlaefer
Modified: 2025-07-11 11:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Drag and Drop not working (278.78 KB, video/webm)
2023-10-01 18:39 UTC, Schlaefer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Schlaefer 2023-10-01 18:39:43 UTC
Created attachment 162009 [details]
Drag and Drop not working

SUMMARY

Trying to drag list item breaks the layout.


STEPS TO REPRODUCE
1. Open the Kirigami Gallery and navigate to the List View example 
2. Drag & Drop list items

OBSERVED RESULT

See attachment video for example. The drag & drop isn't properly working.

EXPECTED RESULT

Provide a working drag & drop example.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.5-2-cachyos (64-bit)
Graphics Platform: Wayland


ADDITIONAL INFORMATION

It was my first try implementing the drag feature and was looking at the Gallery app to get started, but that code isn't properly working?

Since the feature is working in other places in the plasma desktop I finally used this as an starting point [1].

I assume the Gallery example code isn't up to date? Or is it an issue elsewhere?

[1] https://invent.kde.org/plasma/kwin/-/blob/master/src/kcms/rules/ui/main.qml
Comment 1 Bug Janitor Service 2025-07-11 11:10:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/kirigami-gallery/-/merge_requests/117
Comment 2 Niccolò Venerandi 2025-07-11 11:21:55 UTC
Git commit 4311bb1bc77364bef6f6cc1807b6559de86cdbcc by Niccolò Venerandi.
Committed on 11/07/2025 at 11:12.
Pushed by niccolove into branch 'master'.

Add Item element around the SwipeListItem

The ListItemDragHandle API requires the top-most component to have
a parent item between the listItem and the listView, otherwise it
does not work. This creates that.

M  +37   -27   src/data/contents/ui/gallery/ListViewGallery.qml

https://invent.kde.org/sdk/kirigami-gallery/-/commit/4311bb1bc77364bef6f6cc1807b6559de86cdbcc