Merge lp:~aacid/unity8/closeQuicklistOnFocusMove into lp:unity8

Proposed by Albert Astals Cid
Status: Approved
Approved by: Andrea Cimitan
Approved revision: 2914
Proposed branch: lp:~aacid/unity8/closeQuicklistOnFocusMove
Merge into: lp:unity8
Diff against target: 98 lines (+27/-7)
3 files modified
qml/Launcher/LauncherPanel.qml (+3/-1)
tests/qmltests/Launcher/tst_Launcher.qml (+23/-5)
tests/qmltests/tst_OrientedShell.qml (+1/-1)
To merge this branch: bzr merge lp:~aacid/unity8/closeQuicklistOnFocusMove
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+321869@code.launchpad.net

Commit message

Hide quicklist when launcher index changes

While at it fix a few verify calls that wanted to be compare in tests

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * 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 :

PASSED: Continuous integration, rev:2914
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3667/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4868
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2984
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2984
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4896
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4707/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
tested, works fine
 * Did CI run pass? If not, please explain why.
it passed

review: Approve

Unmerged revisions

2914. By Albert Astals Cid

Hide quicklist when launcher index changes

While at it fix a few verify calls that wanted to be compare

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-03-24 08:27:54 +0000
+++ qml/Launcher/LauncherPanel.qml 2017-04-04 14:39:11 +0000
@@ -49,6 +49,8 @@
49 }49 }
50 }50 }
5151
52 onHighlightIndexChanged: quickList.state = ""
53
52 function highlightNext() {54 function highlightNext() {
53 highlightIndex++;55 highlightIndex++;
54 if (highlightIndex >= launcherListView.count) {56 if (highlightIndex >= launcherListView.count) {
@@ -799,8 +801,8 @@
799 item = launcherListView.itemAt(launcherListView.width / 2, itemPosition + launcherListView.itemHeight / 2);801 item = launcherListView.itemAt(launcherListView.width / 2, itemPosition + launcherListView.itemHeight / 2);
800 quickList.model = launcherListView.model.get(index).quickList;802 quickList.model = launcherListView.model.get(index).quickList;
801 quickList.appId = launcherListView.model.get(index).appId;803 quickList.appId = launcherListView.model.get(index).appId;
804 root.highlightIndex = index;
802 quickList.state = "open";805 quickList.state = "open";
803 root.highlightIndex = index;
804 quickList.forceActiveFocus();806 quickList.forceActiveFocus();
805 }807 }
806808
807809
=== modified file 'tests/qmltests/Launcher/tst_Launcher.qml'
--- tests/qmltests/Launcher/tst_Launcher.qml 2017-03-24 08:27:54 +0000
+++ tests/qmltests/Launcher/tst_Launcher.qml 2017-04-04 14:39:11 +0000
@@ -1018,7 +1018,7 @@
1018 // Doing longpress1018 // Doing longpress
1019 mousePress(clickedItem)1019 mousePress(clickedItem)
1020 tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen1020 tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
1021 verify(quickList, "state", "open")1021 compare(quickList.state, "open")
10221022
1023 launcher.hide();1023 launcher.hide();
10241024
@@ -1038,13 +1038,13 @@
1038 // Doing RMB click1038 // Doing RMB click
1039 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)1039 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
1040 tryCompare(quickListShape, "visible", true)1040 tryCompare(quickListShape, "visible", true)
1041 verify(quickList, "state", "open")1041 compare(quickList.state, "open")
1042 verify(dndArea, "dragging", false)1042 compare(dndArea.dragging, false)
10431043
1044 // Click somewhere in the empty space to dismiss the quicklist1044 // Click somewhere in the empty space to dismiss the quicklist
1045 mouseClick(launcher, launcher.width - units.gu(1), units.gu(1));1045 mouseClick(launcher, launcher.width - units.gu(1), units.gu(1));
1046 tryCompare(quickListShape, "visible", false);1046 tryCompare(quickListShape, "visible", false);
1047 verify(quickList, "state", "")1047 compare(quickList.state, "")
1048 }1048 }
10491049
1050 function test_revealByEdgePush() {1050 function test_revealByEdgePush() {
@@ -1553,7 +1553,7 @@
15531553
1554 // Open quickList1554 // Open quickList
1555 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)1555 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
1556 verify(quickList, "state", "open")1556 compare(quickList.state, "open")
1557 compare(quickList.selectedIndex, -1)1557 compare(quickList.selectedIndex, -1)
15581558
1559 var qEntry = findChild(launcher, "quickListEntry0");1559 var qEntry = findChild(launcher, "quickListEntry0");
@@ -1568,5 +1568,23 @@
15681568
1569 tryCompare(quickList, "selectedIndex", -1)1569 tryCompare(quickList, "selectedIndex", -1)
1570 }1570 }
1571
1572 function test_tabClosesQuickList() {
1573 dragLauncherIntoView();
1574 var clickedItem = findChild(launcher, "launcherDelegate2")
1575 var quickList = findChild(launcher, "quickList")
1576 var launcherPanel = findChild(launcher, "launcherPanel");
1577
1578 // Initial state
1579 tryCompare(quickList, "state", "")
1580
1581 // Open quickList
1582 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
1583 compare(quickList.state, "open")
1584 tryCompare(launcherPanel, "highlightIndex", 2);
1585 keyClick(Qt.Key_Tab);
1586 compare(quickList.state, "")
1587 tryCompare(launcherPanel, "highlightIndex", 3);
1588 }
1571 }1589 }
1572}1590}
15731591
=== modified file 'tests/qmltests/tst_OrientedShell.qml'
--- tests/qmltests/tst_OrientedShell.qml 2017-03-08 09:50:45 +0000
+++ tests/qmltests/tst_OrientedShell.qml 2017-04-04 14:39:11 +0000
@@ -938,7 +938,7 @@
938 verify(appRepeaterConnections.target);938 verify(appRepeaterConnections.target);
939 appRepeaterConnections.itemAddedCallback = function(item) {939 appRepeaterConnections.itemAddedCallback = function(item) {
940 dialerDelegate = item;940 dialerDelegate = item;
941 verify(item.application.appId, "dialer-app");941 compare(item.application.appId, "dialer-app");
942 }942 }
943943
944 WindowStateStorage.saveStage("dialer-app", ApplicationInfoInterface.SideStage)944 WindowStateStorage.saveStage("dialer-app", ApplicationInfoInterface.SideStage)

Subscribers

People subscribed via source and target branches