Merge lp:~mzanetti/unity8/fix-preview-collapsing into lp:unity8

Proposed by Michael Zanetti on 2013-09-17
Status: Merged
Approved by: Michał Sawicz on 2013-09-18
Approved revision: 328
Merged at revision: 329
Proposed branch: lp:~mzanetti/unity8/fix-preview-collapsing
Merge into: lp:unity8
Diff against target: 55 lines (+7/-2)
3 files modified
Dash/GenericScopeView.qml (+3/-1)
tests/qmltests/Dash/tst_DashContent.qml (+1/-1)
tests/qmltests/Dash/tst_GenericScopeView.qml (+3/-0)
To merge this branch: bzr merge lp:~mzanetti/unity8/fix-preview-collapsing
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve on 2013-09-18
Michał Sawicz 2013-09-17 Approve on 2013-09-17
Review via email: mp+186085@code.launchpad.net

Commit message

collapse any open preview when programmatically switching current dash index

To post a comment you must log in.
Michał Sawicz (saviq) wrote :

I'm not entirely sure of that solution... Reaching down into the views for that sounds bad. I think I'd rather go for a signal that the views would connect to, WTYT?

Why the change onScreen change, btw?

review: Needs Information
Michael Zanetti (mzanetti) wrote :

> I'm not entirely sure of that solution... Reaching down into the views for
> that sounds bad. I think I'd rather go for a signal that the views would
> connect to, WTYT?

Fair point. Will change... we actually already have that signal.

>
> Why the change onScreen change, btw?

onScreen is internally used to keep the preview loaded while the collapsing animation happens. On the outside, this is used to determine if a preview is open in order to block the swiping left/right. I did the change to be able to set it from the outside as we can't do that with onScreen. That doesn't really care if it's onScreen or just open. Anyways, with the new, upcoming solution this isn't needed any more and I reverted it back to onScreen as that seems slightly cleaner. Additionally I made it readonly because it doesn't allow setting it from the outside.

Michał Sawicz (saviq) :
review: Approve
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/451/
Executed test runs:
    SUCCESS: http://s-jenkins:8080/job/generic-cleanup-mbs/2267
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/3547
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/1075
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/1741
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-autolanding/37
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-autolanding/455
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-autolanding/455/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-autolanding/456
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3559
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3559/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-saucy/3006
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1077
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1077/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/895
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/907

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:328
http://jenkins.qa.ubuntu.com/job/unity8-ci/1034/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/3550
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/1078
    ABORTED: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/1743/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-ci/58
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1035
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1035/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-ci/1034
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3562
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3562/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-saucy/3009
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1080
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1080/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/898
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/910

Click here to trigger a rebuild:
http://s-jenkins:8080/job/unity8-ci/1034/rebuild

review: Needs Fixing (continuous-integration)
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Dash/GenericScopeView.qml'
2--- Dash/GenericScopeView.qml 2013-09-10 08:10:10 +0000
3+++ Dash/GenericScopeView.qml 2013-09-17 16:41:48 +0000
4@@ -21,10 +21,11 @@
5
6 ScopeView {
7 id: scopeView
8- property alias previewShown: previewLoader.onScreen
9+ readonly property alias previewShown: previewLoader.onScreen
10
11 onIsCurrentChanged: {
12 pageHeader.resetSearch();
13+ previewLoader.open = false;
14 }
15
16 onMovementStarted: categoryView.showHeader()
17@@ -246,6 +247,7 @@
18 }
19
20 Loader {
21+ objectName: "previewLoader"
22 id: previewLoader
23 property var previewData
24 height: effect.bottomGapPx - effect.topGapPx
25
26=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
27--- tests/qmltests/Dash/tst_DashContent.qml 2013-07-25 13:19:25 +0000
28+++ tests/qmltests/Dash/tst_DashContent.qml 2013-09-17 16:41:48 +0000
29@@ -106,7 +106,7 @@
30 contentEndReachedSpy.clear()
31 clear_scope_status();
32
33- // clear, wait for dahs to empty and load scopes.
34+ // clear, wait for dash to empty and load scopes.
35 var dashContentList = findChild(dashContent, "dashContentList");
36 verify(dashContentList != undefined)
37 scopesModel.clear();
38
39=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
40--- tests/qmltests/Dash/tst_GenericScopeView.qml 2013-06-13 09:27:02 +0000
41+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2013-09-17 16:41:48 +0000
42@@ -44,10 +44,13 @@
43
44 function test_isCurrent() {
45 var pageHeader = findChild(genericScopeView, "pageHeader");
46+ var previewLoader = findChild(genericScopeView, "previewLoader");
47 genericScopeView.isCurrent = true
48 pageHeader.searchQuery = "test"
49+ previewLoader.open = true
50 genericScopeView.isCurrent = false
51 tryCompare(pageHeader, "searchQuery", "")
52+ tryCompare(genericScopeView, "previewShown", false);
53 }
54 }
55 }

Subscribers

People subscribed via source and target branches