Merge lp:~mzanetti/unity8/close-temp-scope-on-left-edge into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Andrea Cimitan
Approved revision: 1434
Merged at revision: 1463
Proposed branch: lp:~mzanetti/unity8/close-temp-scope-on-left-edge
Merge into: lp:unity8
Diff against target: 63 lines (+26/-2)
2 files modified
qml/Dash/Dash.qml (+10/-2)
tests/qmltests/Dash/tst_Dash.qml (+16/-0)
To merge this branch: bzr merge lp:~mzanetti/unity8/close-temp-scope-on-left-edge
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+241555@code.launchpad.net

Commit message

close previews and temp scopes on left edge/BFB

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

 * 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
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

It does what it says

 * Did you perform an exploratory manual test run of the code change and any related functionality?
yes
 * Did CI run pass? If not, please explain why.
it did!
 * Did you make sure that the branch does not contain spurious tags?
yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/Dash.qml'
2--- qml/Dash/Dash.qml 2014-11-04 12:52:02 +0000
3+++ qml/Dash/Dash.qml 2014-11-12 14:37:41 +0000
4@@ -31,9 +31,10 @@
5 DashCommunicatorService {
6 objectName: "dashCommunicatorService"
7 onSetCurrentScopeRequested: {
8- if (!isSwipe || !window.active || overviewController.progress != 0) {
9+ if (!isSwipe || !window.active || overviewController.progress != 0 || scopeItem.scope || dashContent.subPageShown) {
10 if (overviewController.progress != 0 && window.active) animate = false;
11 dashContent.setCurrentScopeAtIndex(index, animate, isSwipe)
12+ // Close dash overview and nested temp scopes in it
13 if (overviewController.progress != 0) {
14 if (window.active) {
15 dashContentCache.scheduleUpdate();
16@@ -42,6 +43,14 @@
17 overviewController.progress = 0;
18 scopesOverview.closeTempScope();
19 }
20+ // Close normal temp scopes (e.g. App Store)
21+ if (scopeItem.scope) {
22+ scopeItem.backClicked();
23+ }
24+ // Close previews
25+ if (dashContent.subPageShown) {
26+ dashContent.closePreview();
27+ }
28 }
29 }
30 }
31@@ -389,5 +398,4 @@
32 }
33 }
34 }
35-
36 }
37
38=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
39--- tests/qmltests/Dash/tst_Dash.qml 2014-10-30 14:55:29 +0000
40+++ tests/qmltests/Dash/tst_Dash.qml 2014-11-12 14:37:41 +0000
41@@ -298,6 +298,22 @@
42 tryCompare(dashContentList, "currentIndex", 1)
43 }
44
45+ function test_setCurrentScopeClosesPreview() {
46+ var dashContent = findChild(dash, "dashContent");
47+ waitForRendering(dash)
48+
49+ var delegate0 = findChild(dash, "delegate0");
50+ mouseClick(delegate0, delegate0.width / 2, delegate0.height / 2);
51+
52+ tryCompare(dashContent, "subPageShown", true)
53+ waitForRendering(dash);
54+
55+ var dashCommunicatorService = findInvisibleChild(dash, "dashCommunicatorService");
56+ dashCommunicatorService.mockSetCurrentScope(0, true, false);
57+
58+ tryCompare(dashContent, "subPageShown", false)
59+ }
60+
61 function test_processing_indicator() {
62 var processingIndicator = findChild(dash, "processingIndicator");
63 verify(processingIndicator, "Can't find the processing indicator.");

Subscribers

People subscribed via source and target branches