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
=== modified file 'qml/Launcher/LauncherPanel.qml'
--- qml/Launcher/LauncherPanel.qml 2017-01-31 14:30:21 +0000
+++ qml/Launcher/LauncherPanel.qml 2017-02-24 15:32:15 +0000
@@ -572,16 +572,6 @@
572 // Move it down by the the missing size to compensate index calculation with only expanded items572 // Move it down by the the missing size to compensate index calculation with only expanded items
573 itemCenterY += (launcherListView.itemHeight - selectedItem.height) / 2573 itemCenterY += (launcherListView.itemHeight - selectedItem.height) / 2
574574
575 if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - launcherListView.realItemHeight) {
576 progressiveScrollingTimer.downwards = false
577 progressiveScrollingTimer.start()
578 } else if (mouseY < launcherListView.realItemHeight) {
579 progressiveScrollingTimer.downwards = true
580 progressiveScrollingTimer.start()
581 } else {
582 progressiveScrollingTimer.stop()
583 }
584
585 var newIndex = (itemCenterY + launcherListView.realContentY) / launcherListView.realItemHeight575 var newIndex = (itemCenterY + launcherListView.realContentY) / launcherListView.realItemHeight
586576
587 if (newIndex > draggedIndex + 1) {577 if (newIndex > draggedIndex + 1) {
@@ -601,6 +591,19 @@
601 }591 }
602 }592 }
603 }593 }
594 if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - launcherListView.realItemHeight
595 // N.B: when using touch interaction, we sometimes get values like 2147483458 for mouseY
596 // on touchRelease(). Working around that by making sure we're still inside the screen.
597 && mouseY <= root.height
598 ) {
599 progressiveScrollingTimer.downwards = false
600 progressiveScrollingTimer.start()
601 } else if (mouseY < launcherListView.realItemHeight) {
602 progressiveScrollingTimer.downwards = true
603 progressiveScrollingTimer.start()
604 } else {
605 progressiveScrollingTimer.stop()
606 }
604 }607 }
605 }608 }
606 Timer {609 Timer {
@@ -613,12 +616,12 @@
613 if (downwards) {616 if (downwards) {
614 var minY = -launcherListView.topMargin617 var minY = -launcherListView.topMargin
615 if (launcherListView.contentY > minY) {618 if (launcherListView.contentY > minY) {
616 launcherListView.contentY = Math.max(launcherListView.contentY - units.dp(2), minY)619 launcherListView.contentY = Math.max(launcherListView.contentY - units.dp(dndArea.pressed ? 2 : 6), minY)
617 }620 }
618 } else {621 } else {
619 var maxY = launcherListView.contentHeight - launcherListView.height + launcherListView.topMargin + launcherListView.originY622 var maxY = launcherListView.contentHeight - launcherListView.height + launcherListView.topMargin + launcherListView.originY
620 if (launcherListView.contentY < maxY) {623 if (launcherListView.contentY < maxY) {
621 launcherListView.contentY = Math.min(launcherListView.contentY + units.dp(2), maxY)624 launcherListView.contentY = Math.min(launcherListView.contentY + units.dp(dndArea.pressed ? 2 : 6), maxY)
622 }625 }
623 }626 }
624 }627 }
625628
=== modified file 'tests/qmltests/Launcher/tst_Launcher.qml'
--- tests/qmltests/Launcher/tst_Launcher.qml 2017-01-26 09:09:18 +0000
+++ tests/qmltests/Launcher/tst_Launcher.qml 2017-02-24 15:32:15 +0000
@@ -1500,5 +1500,17 @@
1500 tryCompare(launcher, "maxPanelX", 0);1500 tryCompare(launcher, "maxPanelX", 0);
1501 launcher.panelWidth = oldSize;1501 launcher.panelWidth = oldSize;
1502 }1502 }
1503
1504 function test_hoverAutoScrolling() {
1505 revealByEdgePush();
1506 var list = findChild(launcher, "launcherListView")
1507 mouseMove(root, units.gu(4), root.height / 2)
1508
1509 mouseMove(root, units.gu(4), root.height - units.gu(2))
1510 tryCompare(list, "contentY", list.contentHeight - list.height + list.topMargin)
1511
1512 mouseMove(root, units.gu(4), units.gu(12)) // BFB height
1513 tryCompare(list, "contentY", -list.topMargin)
1514 }
1503 }1515 }
1504}1516}

Subscribers

People subscribed via source and target branches