Improved support for desktop "Folder View"
Needs ReviewPublic

Authored by steffenh on Nov 20 2019, 6:47 PM.

Details

Reviewers
hein
ngraham
mart
Group Reviewers
Plasma
Summary

moving icon's on the desktop around with touch
open/launch icons with tap (only singe tap, regardless of mouse workspace behavior)
access the icons context menu with tap and hold

BUG: 366462
BUG: 408051
FIXED-IN: 5.19.0

Test Plan

activate "folder view" desktop mode, and try to interact with the icons via touch

Diff Detail

Repository
R119 Plasma Desktop
Branch
arcpatch-D25428
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19294
Build 19312: arc lint + arc unit
steffenh created this revision.Nov 20 2019, 6:47 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 20 2019, 6:47 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
steffenh requested review of this revision.Nov 20 2019, 6:47 PM
steffenh updated this revision to Diff 70078.Nov 20 2019, 7:08 PM

oops was wrong diff, now is it the correct version

Nice! Works as described

ngraham requested changes to this revision.Nov 21 2019, 2:14 PM
ngraham added a subscriber: ngraham.

Thanks! However this does not work 100% for me with my laptop's touchscreen. Touch-and-drag works to move items, and touch-and-hold works to show the context menu, but I cannot open/launch any items. When I tap an item, it highlights, then briefly becomes selected, and then loses its selection status and goes back to just being highlighted.

This revision now requires changes to proceed.Nov 21 2019, 2:14 PM
steffenh updated this revision to Diff 70247.Nov 24 2019, 7:44 AM

simulate left mouse click, if touchtap ended

No change for me, sorry. :(

First, thank for testing @nicolasfella and @ngraham

Ok, now I am clueless.

@ngraham
maybe you can tell me, witch tablet and software version you used?

If you have time, perhaps you can make a test without my patch. Move the cursor with the mouse over an icon, so it gets
highlightened. What happens if you now make a tap with the touchscreen, open/start the item or not?

I'm using an HP Spectre x360 convertible laptop with a touchscreen.

Test results using the systemwide double-click setting:

  • With your patch: result is inconsistent: very occasionally, the item opens. Other times, the item becomes selected and then immediately de-selects again
  • Without your patch: item becomes selected 100% of the time. A second tap launches it.

Test results using the (default) systemwide single-click setting:

  • With your patch: item is launched.
  • Without your patch: item is launched.

@ngraham thanks again for testing,

Ok, so it's just the double click simulation was is not working 100% on your laptop, I think I can work with it.

On the other hand, if I am lucky I can borrow a HPSpectre x360 in the next days, too test this directly.

Instead of emulating a double-click, can we instead always launch on a single-click with touch?

steffenh updated this revision to Diff 70597.Nov 30 2019, 9:02 AM

don't use simulated double mouse click to open/launch an item.

I'm afraid it's still not consistently fixed for me when using double-click. Most of the time, a tap will still select and then immediately de-select the item. Only about 1/4 of my taps actually open the item. With single-click, about 3/4 open the item, but the rest do the same thing and the item ends up highlighted rather than opened.

Hi @ngraham, thanks for testing,

OK, I will rewrite this and see if I can get rid of all the simulated mouse clicks

Good luck! Thanks for working on this, it's really important.

steffenh updated this revision to Diff 71052.Dec 7 2019, 11:52 AM

get ride of all simulated mouse clicks
change behavior for touch (similar to touch in kickoff):

  • access to the context menu after tapandhold and release touch
  • drag and drop after tabandhold and moving

don't show the action buttons (selection and popup buttons) if you make a tap.

add some temporary debug messages, for the case @ngraham has still problems with his laptop :-)

ngraham accepted this revision.Dec 7 2019, 4:11 PM
ngraham added a reviewer: mart. ngraham added 1 blocking reviewer(s): hein.
ngraham added a subscriber: mart.

Yay, it works perfectly for me now! This patch has become quite large so I'd definitely like @hein's input before it lands (and preferably other Plasma people too, maybe @mart?)

Hi @ngraham,

That's a good news. I will make a new patch in the next days, without the debug messages.

mart added inline comments.Dec 10 2019, 11:58 AM
containments/desktop/package/contents/ui/FolderItemDelegate.qml
212

How much of this can be done with pointer handlers?
https://doc.qt.io/qt-5/qml-qtquick-taphandler.html
quickly looking at this mousearea it seems that a taphandler coould be enough.
Would be good if somehow an extra mousearea can be avoided

Ok a quick look at TapHandler, first I am missing a positionChanged signal in the TapHandler and second we need to change QtQuick from 2.8 to 2.12.

and second we need to change QtQuick from 2.8 to 2.12.

That's fine.

Does grabChanged work?

I was trying to use the TapHandler, but I came across a problem with DragAndDrop that I need help with.

If I try a DragAndDrop with touch the following happens:

  • I get a drag cursor, but i get no drag icon
  • if I release the touch the drag don`t end, I need to extra tap the desktop to end the drag. At the tap point the dragged Item appears
  • additionally I found, a error message in the log "QObject::disconnect: Unexpected null parameter"
steffenh updated this revision to Diff 71583.Dec 15 2019, 11:08 AM

remove debug messages

ngraham edited the summary of this revision. (Show Details)Jan 23 2020, 5:04 PM
hein added a comment.Jan 24 2020, 12:27 AM

Just a quick note I will review this tomorrow or next week when I'm on vacation, sorry for the long wait.

cfeck added a subscriber: cfeck.Mar 19 2020, 4:59 PM

Anyone else able to review this?

Any update on the status of this?

I'm working on another version of this patch at the moment. The new version doesn't need a MouseArea in the FolderItemDelegate.
If the new patch is ready, I will make a merge request on GitLab.