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

Proposed by Michael Zanetti
Status: Merged
Approved by: Michał Sawicz
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
Michał Sawicz Approve
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.
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
Michał Sawicz (saviq) :
review: Approve
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Dash/GenericScopeView.qml'
--- Dash/GenericScopeView.qml 2013-09-10 08:10:10 +0000
+++ Dash/GenericScopeView.qml 2013-09-17 16:41:48 +0000
@@ -21,10 +21,11 @@
2121
22ScopeView {22ScopeView {
23 id: scopeView23 id: scopeView
24 property alias previewShown: previewLoader.onScreen24 readonly property alias previewShown: previewLoader.onScreen
2525
26 onIsCurrentChanged: {26 onIsCurrentChanged: {
27 pageHeader.resetSearch();27 pageHeader.resetSearch();
28 previewLoader.open = false;
28 }29 }
2930
30 onMovementStarted: categoryView.showHeader()31 onMovementStarted: categoryView.showHeader()
@@ -246,6 +247,7 @@
246 }247 }
247248
248 Loader {249 Loader {
250 objectName: "previewLoader"
249 id: previewLoader251 id: previewLoader
250 property var previewData252 property var previewData
251 height: effect.bottomGapPx - effect.topGapPx253 height: effect.bottomGapPx - effect.topGapPx
252254
=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
--- tests/qmltests/Dash/tst_DashContent.qml 2013-07-25 13:19:25 +0000
+++ tests/qmltests/Dash/tst_DashContent.qml 2013-09-17 16:41:48 +0000
@@ -106,7 +106,7 @@
106 contentEndReachedSpy.clear()106 contentEndReachedSpy.clear()
107 clear_scope_status();107 clear_scope_status();
108108
109 // clear, wait for dahs to empty and load scopes.109 // clear, wait for dash to empty and load scopes.
110 var dashContentList = findChild(dashContent, "dashContentList");110 var dashContentList = findChild(dashContent, "dashContentList");
111 verify(dashContentList != undefined)111 verify(dashContentList != undefined)
112 scopesModel.clear();112 scopesModel.clear();
113113
=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
--- tests/qmltests/Dash/tst_GenericScopeView.qml 2013-06-13 09:27:02 +0000
+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2013-09-17 16:41:48 +0000
@@ -44,10 +44,13 @@
4444
45 function test_isCurrent() {45 function test_isCurrent() {
46 var pageHeader = findChild(genericScopeView, "pageHeader");46 var pageHeader = findChild(genericScopeView, "pageHeader");
47 var previewLoader = findChild(genericScopeView, "previewLoader");
47 genericScopeView.isCurrent = true48 genericScopeView.isCurrent = true
48 pageHeader.searchQuery = "test"49 pageHeader.searchQuery = "test"
50 previewLoader.open = true
49 genericScopeView.isCurrent = false51 genericScopeView.isCurrent = false
50 tryCompare(pageHeader, "searchQuery", "")52 tryCompare(pageHeader, "searchQuery", "")
53 tryCompare(genericScopeView, "previewShown", false);
51 }54 }
52 }55 }
53 }56 }

Subscribers

People subscribed via source and target branches