feat(panel): dnd improvements for the app list#1343
Conversation
71cc9a1 to
98fcf7f
Compare
|
I've noticed some inconsistencies, please hold on merging this until I fix them. |
I've marked as a draft for you. Just let us know when it's ready to look at. |
98fcf7f to
e2937f3
Compare
|
Reworked a few things to address some inconsistencies, also fixed a bug that caused multiple insertions if Would appreciate a second pair of eyes before we merge, happy to discuss any of the changes. |
wash2
left a comment
There was a problem hiding this comment.
I'd like to revisit this after the rebase updates are merged, and fix the libcosmic issue before merging the changes.
|
@wash2 Yesterday I bumped the applet to the latest |
5800967 to
61d232f
Compare
|
@wash2 I bumped |
- hide the original icon and replace its position with an empty container while dragging - reorder items only when the drag position crosses a defined threshold: center of the target +- 4px - the cursor's position is used to calculate the exact pickup offset - reduce the drag threshold to 0 to ensure no drag events are skipped - track the dragged item so that if it is removed during a drag and was previously active, it is automatically added to the active list
64fe174 to
2819771
Compare
|
The code looks fine, but when I tested it with the master branch for the panel, icons weren't drawn. It might be because of a panel bug though and it seems to be fixed when testing with pop-os/cosmic-panel#602 so I think it is fine if it is merged after the panel smithay update. |
jacobgkau
left a comment
There was a problem hiding this comment.
I have a few concerns with this.
- Sometimes, the tooltip icon doesn't show up. This was already a bug before, but together with this change, we now end up dragging something that we can't see what it is, since this removes the on-dock previews and leaves only the tooltip (when it works).
2026-05-13.14-44-27.mp4
- I'm seeing that if I drag an icon out of the dock, it's impossible to drag it back in (even if I haven't released the mouse button yet). This bug also occurred sometimes before, but before, it would result in the icon staying where it was before the drag started. Now, it results in the icon being removed from the dock, which takes more effort to recover from.
2026-05-13.14-43-23.mp4
- I also had one instance where the dock got stuck showing an app as running when I'd actually already quit it. I'm not sure if this was a regression or not (I haven't made it happen a second time yet, but it might've had something to do with pinning/unpinning the app).
2026-05-13.14-43-58.mp4
We'll want @pop-os/ux input on this kind of change. @pop-os/ux, if the tooltip was working 100% of the time, would it be the desired implementation to have the icon tooltip and a blank gap in the dock where the icon will go when dropped? Or would it be better to have a single dynamic instance of the icon in the dock where the icon's going to be placed, maybe without the tooltip (more similar to how the new DnD implementation in the App Library's going to work)? I guess if we had the icon draggable on the dock itself (like the app library folders), then we might still want the tooltip when the cursor leaves the dock, so the user knows they're still holding onto the icon when it's in the "drop off the dock to remove" state.
|
Now that you mention it, I also noticed some quirks while running inside the panel, including the inability to drag icons back in, but I can't replicate this while the applet runs standalone, which suggests the issue lies with the panel itself. I'm not sure if the issue @wash2 mentions could improve this tho. |
This PR improves the app list drag and drop experience:
Currently blocked by: pop-os/libcosmic#1161
Current behavior:
2026-03-08.15-13-44.mp4
New behavior:
2026-03-08.15-12-45.mp4