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
1=== modified file 'qml/Launcher/LauncherPanel.qml'
2--- qml/Launcher/LauncherPanel.qml 2017-03-24 08:27:54 +0000
3+++ qml/Launcher/LauncherPanel.qml 2017-04-04 14:39:11 +0000
4@@ -49,6 +49,8 @@
5 }
6 }
7
8+ onHighlightIndexChanged: quickList.state = ""
9+
10 function highlightNext() {
11 highlightIndex++;
12 if (highlightIndex >= launcherListView.count) {
13@@ -799,8 +801,8 @@
14 item = launcherListView.itemAt(launcherListView.width / 2, itemPosition + launcherListView.itemHeight / 2);
15 quickList.model = launcherListView.model.get(index).quickList;
16 quickList.appId = launcherListView.model.get(index).appId;
17+ root.highlightIndex = index;
18 quickList.state = "open";
19- root.highlightIndex = index;
20 quickList.forceActiveFocus();
21 }
22
23
24=== modified file 'tests/qmltests/Launcher/tst_Launcher.qml'
25--- tests/qmltests/Launcher/tst_Launcher.qml 2017-03-24 08:27:54 +0000
26+++ tests/qmltests/Launcher/tst_Launcher.qml 2017-04-04 14:39:11 +0000
27@@ -1018,7 +1018,7 @@
28 // Doing longpress
29 mousePress(clickedItem)
30 tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
31- verify(quickList, "state", "open")
32+ compare(quickList.state, "open")
33
34 launcher.hide();
35
36@@ -1038,13 +1038,13 @@
37 // Doing RMB click
38 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
39 tryCompare(quickListShape, "visible", true)
40- verify(quickList, "state", "open")
41- verify(dndArea, "dragging", false)
42+ compare(quickList.state, "open")
43+ compare(dndArea.dragging, false)
44
45 // Click somewhere in the empty space to dismiss the quicklist
46 mouseClick(launcher, launcher.width - units.gu(1), units.gu(1));
47 tryCompare(quickListShape, "visible", false);
48- verify(quickList, "state", "")
49+ compare(quickList.state, "")
50 }
51
52 function test_revealByEdgePush() {
53@@ -1553,7 +1553,7 @@
54
55 // Open quickList
56 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
57- verify(quickList, "state", "open")
58+ compare(quickList.state, "open")
59 compare(quickList.selectedIndex, -1)
60
61 var qEntry = findChild(launcher, "quickListEntry0");
62@@ -1568,5 +1568,23 @@
63
64 tryCompare(quickList, "selectedIndex", -1)
65 }
66+
67+ function test_tabClosesQuickList() {
68+ dragLauncherIntoView();
69+ var clickedItem = findChild(launcher, "launcherDelegate2")
70+ var quickList = findChild(launcher, "quickList")
71+ var launcherPanel = findChild(launcher, "launcherPanel");
72+
73+ // Initial state
74+ tryCompare(quickList, "state", "")
75+
76+ // Open quickList
77+ mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
78+ compare(quickList.state, "open")
79+ tryCompare(launcherPanel, "highlightIndex", 2);
80+ keyClick(Qt.Key_Tab);
81+ compare(quickList.state, "")
82+ tryCompare(launcherPanel, "highlightIndex", 3);
83+ }
84 }
85 }
86
87=== modified file 'tests/qmltests/tst_OrientedShell.qml'
88--- tests/qmltests/tst_OrientedShell.qml 2017-03-08 09:50:45 +0000
89+++ tests/qmltests/tst_OrientedShell.qml 2017-04-04 14:39:11 +0000
90@@ -938,7 +938,7 @@
91 verify(appRepeaterConnections.target);
92 appRepeaterConnections.itemAddedCallback = function(item) {
93 dialerDelegate = item;
94- verify(item.application.appId, "dialer-app");
95+ compare(item.application.appId, "dialer-app");
96 }
97
98 WindowStateStorage.saveStage("dialer-app", ApplicationInfoInterface.SideStage)

Subscribers

People subscribed via source and target branches