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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1231
Merged at revision: 1248
Proposed branch: lp:~aacid/unity8/launcher_close_overview
Merge into: lp:unity8
Diff against target: 155 lines (+25/-15)
10 files modified
plugins/Unity/DashCommunicator/dashcommunicator.cpp (+2/-2)
plugins/Unity/DashCommunicator/dashcommunicator.h (+1/-1)
plugins/Unity/DashCommunicator/dashcommunicatorservice.h (+1/-1)
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp (+2/-2)
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h (+2/-2)
qml/Dash/Dash.qml (+11/-1)
qml/Shell.qml (+1/-1)
tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.cpp (+2/-2)
tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.h (+2/-2)
tests/qmltests/Dash/tst_Dash.qml (+1/-1)
To merge this branch: bzr merge lp:~aacid/unity8/launcher_close_overview
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michael Zanetti (community) Approve
Review via email: mp+233026@code.launchpad.net

Commit message

Make swipe and home button press in the launcher dismiss the overview

Moved the logic that does not change the current scope on swipe from the shell to the dash

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

 * Did you make sure that your branch does not contain spurious tags?
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
Michael Zanetti (mzanetti) wrote :

Hmm... When opening the overview and then doing a left edge swipe the overview disappears without animations. This looks quite odd. Sure this is how design wants it?

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

This is the same in trunk, but testing this now makes it seem wrong:

Scroll to the click scope's bottom, then reveal the launcher and press the home button. Shouldn't it move up to the top in that case?

review: Needs Information
Revision history for this message
MichaƂ Sawicz (saviq) wrote :

Agreed, if the dash is visible there should always be a transition.

And yeah, it should reset to top, too.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1230. By Albert Astals Cid

Animate the overview hiding if visible

1231. By Albert Astals Cid

Fix test

Revision history for this message
Albert Astals Cid (aacid) wrote :

> This is the same in trunk, but testing this now makes it seem wrong:
>
> Scroll to the click scope's bottom, then reveal the launcher and press the
> home button. Shouldn't it move up to the top in that case?

I'd prefer if we left this for a different bugfix.

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

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

yes. works as expected

 * Did CI run pass? If not, please explain why.

no, but test is fixed by now. next run should be good

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Unity/DashCommunicator/dashcommunicator.cpp'
2--- plugins/Unity/DashCommunicator/dashcommunicator.cpp 2014-07-24 16:02:27 +0000
3+++ plugins/Unity/DashCommunicator/dashcommunicator.cpp 2014-09-02 13:25:48 +0000
4@@ -31,7 +31,7 @@
5 }
6
7
8-void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool reset)
9+void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
10 {
11 QDBusConnection connection = QDBusConnection::sessionBus();
12 QDBusInterface dashIface ("com.canonical.UnityDash",
13@@ -39,5 +39,5 @@
14 "",
15 connection);
16
17- dashIface.call("SetCurrentScope", scopeId, animate, reset);
18+ dashIface.call("SetCurrentScope", scopeId, animate, isSwipe);
19 }
20
21=== modified file 'plugins/Unity/DashCommunicator/dashcommunicator.h'
22--- plugins/Unity/DashCommunicator/dashcommunicator.h 2014-07-24 16:02:27 +0000
23+++ plugins/Unity/DashCommunicator/dashcommunicator.h 2014-09-02 13:25:48 +0000
24@@ -29,7 +29,7 @@
25 ~DashCommunicator();
26
27 public Q_SLOTS:
28- void setCurrentScope(const QString &scopeId, bool animate, bool reset);
29+ void setCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
30 };
31
32 #endif
33
34=== modified file 'plugins/Unity/DashCommunicator/dashcommunicatorservice.h'
35--- plugins/Unity/DashCommunicator/dashcommunicatorservice.h 2014-07-29 11:35:10 +0000
36+++ plugins/Unity/DashCommunicator/dashcommunicatorservice.h 2014-09-02 13:25:48 +0000
37@@ -29,7 +29,7 @@
38 ~DashCommunicatorService();
39
40 Q_SIGNALS:
41- void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
42+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
43
44 private:
45 DBusDashCommunicatorService *m_dbusService;
46
47=== modified file 'plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp'
48--- plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp 2014-07-29 11:35:10 +0000
49+++ plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp 2014-09-02 13:25:48 +0000
50@@ -33,7 +33,7 @@
51 {
52 }
53
54-void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool reset)
55+void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
56 {
57- Q_EMIT setCurrentScopeRequested(scopeId, animate, reset);
58+ Q_EMIT setCurrentScopeRequested(scopeId, animate, isSwipe);
59 }
60
61=== modified file 'plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h'
62--- plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h 2014-07-29 11:35:10 +0000
63+++ plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h 2014-09-02 13:25:48 +0000
64@@ -29,10 +29,10 @@
65 ~DBusDashCommunicatorService();
66
67 Q_SIGNALS:
68- void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
69+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
70
71 public Q_SLOTS:
72- Q_SCRIPTABLE void SetCurrentScope(const QString &scopeId, bool animate, bool reset);
73+ Q_SCRIPTABLE void SetCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
74
75 };
76
77
78=== modified file 'qml/Dash/Dash.qml'
79--- qml/Dash/Dash.qml 2014-08-25 16:07:45 +0000
80+++ qml/Dash/Dash.qml 2014-09-02 13:25:48 +0000
81@@ -34,7 +34,17 @@
82 DashCommunicatorService {
83 objectName: "dashCommunicatorService"
84 onSetCurrentScopeRequested: {
85- dash.setCurrentScope(scopeId, animate, reset)
86+ if (!isSwipe || !window.active || overviewController.progress != 0) {
87+ if (overviewController.progress != 0 && window.active) animate = false;
88+ dash.setCurrentScope(scopeId, animate, isSwipe)
89+ if (overviewController.progress != 0) {
90+ if (window.active) {
91+ dashContentCache.scheduleUpdate();
92+ }
93+ overviewController.enableAnimation = window.active;
94+ overviewController.progress = 0;
95+ }
96+ }
97 }
98 }
99
100
101=== modified file 'qml/Shell.qml'
102--- qml/Shell.qml 2014-08-28 20:06:18 +0000
103+++ qml/Shell.qml 2014-09-02 13:25:48 +0000
104@@ -535,7 +535,7 @@
105 onShowDashHome: showHome()
106 onDash: showDash()
107 onDashSwipeChanged: {
108- if (dashSwipe && ApplicationManager.focusedApplicationId !== "unity8-dash") {
109+ if (dashSwipe) {
110 dash.setCurrentScope("clickscope", false, true)
111 }
112 }
113
114=== modified file 'tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.cpp'
115--- tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.cpp 2014-08-05 11:53:24 +0000
116+++ tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.cpp 2014-09-02 13:25:48 +0000
117@@ -27,7 +27,7 @@
118
119 }
120
121-void DashCommunicatorService::mockSetCurrentScope(const QString &scopeId, bool animate, bool reset)
122+void DashCommunicatorService::mockSetCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
123 {
124- Q_EMIT setCurrentScopeRequested(scopeId, animate, reset);
125+ Q_EMIT setCurrentScopeRequested(scopeId, animate, isSwipe);
126 }
127
128=== modified file 'tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.h'
129--- tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.h 2014-08-05 11:53:24 +0000
130+++ tests/mocks/Unity/DashCommunicator/dashcommunicatorservice.h 2014-09-02 13:25:48 +0000
131@@ -27,10 +27,10 @@
132 ~DashCommunicatorService();
133
134 Q_SIGNALS:
135- void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
136+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
137
138 public Q_SLOTS:
139- void mockSetCurrentScope(const QString &scopeId, bool animate, bool reset);
140+ void mockSetCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
141 };
142
143 #endif // DBUSUNITYSESSIONSERVICE_H
144
145=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
146--- tests/qmltests/Dash/tst_Dash.qml 2014-08-18 11:17:04 +0000
147+++ tests/qmltests/Dash/tst_Dash.qml 2014-09-02 13:25:48 +0000
148@@ -328,7 +328,7 @@
149 mouseFlick(dash, startX, startY, stopX, stopY);
150 compare(dashContentList.currentIndex, 2, "Could not flick to scope id 2");
151 var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
152- dashCommunicatorService.mockSetCurrentScope("clickscope", true, true);
153+ dashCommunicatorService.mockSetCurrentScope("clickscope", true, false);
154 tryCompare(dashContentList, "currentIndex", 1)
155 }
156

Subscribers

People subscribed via source and target branches