Merge lp:~mzanetti/unity8/launcher-hover-scrolling into lp:unity8

Proposed by Michael Zanetti
Status: Work in progress
Proposed branch: lp:~mzanetti/unity8/launcher-hover-scrolling
Merge into: lp:unity8
Diff against target: 77 lines (+27/-12)
2 files modified
qml/Launcher/LauncherPanel.qml (+15/-12)
tests/qmltests/Launcher/tst_Launcher.qml (+12/-0)
To merge this branch: bzr merge lp:~mzanetti/unity8/launcher-hover-scrolling
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Needs Fixing
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+317971@code.launchpad.net

Commit message

Add hover autoscrolling to the launcher

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
no
 * Did you perform an exploratory manual test run of your code change and any related functionality?
yes
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
n/a
 * If you changed the UI, has there been a design review?
n/a

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2835
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3176/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4171
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2455
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2455
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4199
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4036
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4036/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4036
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4036/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4036
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4036/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4036
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4036/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4036
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4036/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4036
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4036/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3176/rebuild

review: Needs Fixing (continuous-integration)
2836. By Michael Zanetti

drop debug print

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2836
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3178/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4174
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2458
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2458
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4202
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4039
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4039/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4039
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4039/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4039
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4039/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4039
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4039/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4039
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4039/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4039
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4039/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3178/rebuild

review: Needs Fixing (continuous-integration)
2837. By Michael Zanetti

work around what I think is an issue in Qt

2838. By Michael Zanetti

s/</<=

2839. By Michael Zanetti

drop debug print

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2839
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3181/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4177
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2462
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2462
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4205
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4042
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4042/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4042
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4042/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4042
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4042/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4042
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4042/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4042
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4042/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4042
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4042/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3181/rebuild

review: Approve (continuous-integration)
2840. By Michael Zanetti

merge trunk

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2840
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3209/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4212
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2484
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2484
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4240
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4075
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4075/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4075
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4075/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4075
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4075/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4075
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4075/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4075
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4075/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4075
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4075/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3209/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Somehow this broke scrolling with keyboard:
- Alt+F1 to open for keyboard navigation
- Tab or Down to reach the first folded delegate
- as soon as the focus rectangle reaches that item, it erratically jumps back

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> Somehow this broke scrolling with keyboard:
> - Alt+F1 to open for keyboard navigation
> - Tab or Down to reach the first folded delegate
> - as soon as the focus rectangle reaches that item, it erratically jumps back

I can also reproduce this with trunk... Will look into it but seems unrelated to this branch.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

> > Somehow this broke scrolling with keyboard:
> > - Alt+F1 to open for keyboard navigation
> > - Tab or Down to reach the first folded delegate
> > - as soon as the focus rectangle reaches that item, it erratically jumps
> back
>
> I can also reproduce this with trunk... Will look into it but seems unrelated
> to this branch.

Yup, unrelated and fixed by https://code.launchpad.net/~mzanetti/unity8/fix-launcher-focus/+merge/319554

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

With a quicklist (context menu open), the autoscroll doesn't work, is that intended? Notice it still works if I scroll the launcher with mouse wheel, but then the context menu position gets broken.

review: Needs Information
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

When the mouse is over the first or last icon, it's impossible to use mouse wheel to scroll the items.

review: Needs Fixing
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

While playing around with autoscroll and using mouse wheel at the same time, the context menu gets broken very easily: https://imgur.com/a/mmPuh

review: Needs Fixing
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

I guess you should just disable the autoscroll when the launcher is focused for keyboard navigation: those just don't work together. Suppose you have the keyboard focus on the end, and mouse pointer on the beginning of the (folded) list. Now pressing the keyboard arrows to move up makes the whole list jump back and forth as a race between the autoscroll coming from mouse, and the user trying to navigate the focus rectangle using keyboard.

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

regarding the scroll wheel issues, they will be gone when this one lands: https://code.launchpad.net/~mzanetti/unity8/launcher-scrollwheel
However, in order to complete that, some changes in miral and qtmir need to land first.

So I guess I'm putting this one back to WIP until I can finish both branches together.

Unmerged revisions

2840. By Michael Zanetti

merge trunk

2839. By Michael Zanetti

drop debug print

2838. By Michael Zanetti

s/</<=

2837. By Michael Zanetti

work around what I think is an issue in Qt

2836. By Michael Zanetti

drop debug print

2835. By Michael Zanetti

add hover autoscrolling to launcher

2834. By Launchpad Translations on behalf of unity-team

Launchpad automatic translations update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Launcher/LauncherPanel.qml'
2--- qml/Launcher/LauncherPanel.qml 2017-01-31 14:30:21 +0000
3+++ qml/Launcher/LauncherPanel.qml 2017-02-24 15:32:15 +0000
4@@ -572,16 +572,6 @@
5 // Move it down by the the missing size to compensate index calculation with only expanded items
6 itemCenterY += (launcherListView.itemHeight - selectedItem.height) / 2
7
8- if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - launcherListView.realItemHeight) {
9- progressiveScrollingTimer.downwards = false
10- progressiveScrollingTimer.start()
11- } else if (mouseY < launcherListView.realItemHeight) {
12- progressiveScrollingTimer.downwards = true
13- progressiveScrollingTimer.start()
14- } else {
15- progressiveScrollingTimer.stop()
16- }
17-
18 var newIndex = (itemCenterY + launcherListView.realContentY) / launcherListView.realItemHeight
19
20 if (newIndex > draggedIndex + 1) {
21@@ -601,6 +591,19 @@
22 }
23 }
24 }
25+ if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - launcherListView.realItemHeight
26+ // N.B: when using touch interaction, we sometimes get values like 2147483458 for mouseY
27+ // on touchRelease(). Working around that by making sure we're still inside the screen.
28+ && mouseY <= root.height
29+ ) {
30+ progressiveScrollingTimer.downwards = false
31+ progressiveScrollingTimer.start()
32+ } else if (mouseY < launcherListView.realItemHeight) {
33+ progressiveScrollingTimer.downwards = true
34+ progressiveScrollingTimer.start()
35+ } else {
36+ progressiveScrollingTimer.stop()
37+ }
38 }
39 }
40 Timer {
41@@ -613,12 +616,12 @@
42 if (downwards) {
43 var minY = -launcherListView.topMargin
44 if (launcherListView.contentY > minY) {
45- launcherListView.contentY = Math.max(launcherListView.contentY - units.dp(2), minY)
46+ launcherListView.contentY = Math.max(launcherListView.contentY - units.dp(dndArea.pressed ? 2 : 6), minY)
47 }
48 } else {
49 var maxY = launcherListView.contentHeight - launcherListView.height + launcherListView.topMargin + launcherListView.originY
50 if (launcherListView.contentY < maxY) {
51- launcherListView.contentY = Math.min(launcherListView.contentY + units.dp(2), maxY)
52+ launcherListView.contentY = Math.min(launcherListView.contentY + units.dp(dndArea.pressed ? 2 : 6), maxY)
53 }
54 }
55 }
56
57=== modified file 'tests/qmltests/Launcher/tst_Launcher.qml'
58--- tests/qmltests/Launcher/tst_Launcher.qml 2017-01-26 09:09:18 +0000
59+++ tests/qmltests/Launcher/tst_Launcher.qml 2017-02-24 15:32:15 +0000
60@@ -1500,5 +1500,17 @@
61 tryCompare(launcher, "maxPanelX", 0);
62 launcher.panelWidth = oldSize;
63 }
64+
65+ function test_hoverAutoScrolling() {
66+ revealByEdgePush();
67+ var list = findChild(launcher, "launcherListView")
68+ mouseMove(root, units.gu(4), root.height / 2)
69+
70+ mouseMove(root, units.gu(4), root.height - units.gu(2))
71+ tryCompare(list, "contentY", list.contentHeight - list.height + list.topMargin)
72+
73+ mouseMove(root, units.gu(4), units.gu(12)) // BFB height
74+ tryCompare(list, "contentY", -list.topMargin)
75+ }
76 }
77 }

Subscribers

People subscribed via source and target branches