Merge lp:~cimi/unity8/fix-1595116 into lp:unity8

Proposed by Andrea Cimitan
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 2531
Merged at revision: 2563
Proposed branch: lp:~cimi/unity8/fix-1595116
Merge into: lp:unity8
Diff against target: 58 lines (+24/-12)
2 files modified
qml/Dash/GenericScopeView.qml (+1/-1)
tests/qmltests/Dash/tst_DashContent.qml (+23/-11)
To merge this branch: bzr merge lp:~cimi/unity8/fix-1595116
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+299121@code.launchpad.net

Commit message

Use binding for filter popover contentWidth

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
n
 * Did you perform an exploratory manual test run of your code change and any related functionality?
y
 * 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
Albert Astals Cid (aacid) wrote :

Could you add a test in which manually change the scopeview width to be bigger and smaller and check the width of the popup follows?

review: Needs Information
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2529
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1667/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2212
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1177
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1177
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1177
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2240
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2146
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2146
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2146
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2137/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2137
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2137/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1667/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

> Could you add a test in which manually change the scopeview width to be bigger
> and smaller and check the width of the popup follows?

done

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

 * 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.
Yes

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2530
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1669/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2214/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2242
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2148
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2148
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2148
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2139/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2139/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2139/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2139/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2139/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2139/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2139/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2139/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2139/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1669/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

wops
tst_DashContent.qml: bad whitespace in line 527

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

Ah was fixed in r2531 already

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/GenericScopeView.qml'
2--- qml/Dash/GenericScopeView.qml 2016-06-27 18:41:15 +0000
3+++ qml/Dash/GenericScopeView.qml 2016-07-05 12:38:21 +0000
4@@ -662,7 +662,7 @@
5 }
6 onShowFiltersPopup: { // item
7 extraPanel.visible = false;
8- scopeView.filtersPopover = PopupUtils.open(Qt.resolvedUrl("FiltersPopover.qml"), item, { "contentWidth": scopeView.width - units.gu(2) } );
9+ scopeView.filtersPopover = PopupUtils.open(Qt.resolvedUrl("FiltersPopover.qml"), item, { "contentWidth": Qt.binding(function() { return scopeView.width - units.gu(2); } ) } );
10 scopeView.filtersPopover.Component.onDestruction.connect(function () {
11 categoryView.pageHeader.closePopup(false, true);
12 categoryView.pageHeader.unfocus(true); // remove the focus from the search field
13
14=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
15--- tests/qmltests/Dash/tst_DashContent.qml 2016-06-21 08:20:32 +0000
16+++ tests/qmltests/Dash/tst_DashContent.qml 2016-07-05 12:38:21 +0000
17@@ -524,18 +524,30 @@
18 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
19 var headerContainer = findChild(pageHeader, "headerContainer");
20
21+ mouseClick(searchButton);
22+ tryCompare(peExtraPanel, "visible", true);
23+
24+ var filtersPopover = findChild(shell, "filtersPopover")
25+ verify(!filtersPopover);
26+
27+ mouseClick(settingsButton);
28+
29+ filtersPopover = findChild(shell, "filtersPopover")
30+ verify(filtersPopover);
31+
32+ // test that popover resizes
33+ var shellWidth = shell.width;
34+ var popoverWidth = filtersPopover.contentWidth;
35+
36+ shell.width = shellWidth + units.gu(60);
37+ waitForRendering(shell);
38+
39+ tryCompare(filtersPopover, "contentWidth", popoverWidth + units.gu(60));
40+
41+ shell.width = shellWidth;
42+ waitForRendering(shell);
43+
44 // test that closing the filters popover without a search unfocuses and removes the navigation
45- mouseClick(searchButton);
46- tryCompare(peExtraPanel, "visible", true);
47-
48- var filtersPopover = findChild(shell, "filtersPopover")
49- verify(!filtersPopover);
50-
51- mouseClick(settingsButton);
52-
53- filtersPopover = findChild(shell, "filtersPopover")
54- verify(filtersPopover);
55-
56 mouseClick(shell, shell.width - 1, shell.height - 1);
57
58 tryCompare(pageHeader.extraPanel, "visible", false);

Subscribers

People subscribed via source and target branches