Merge lp:~cimi/unity8/uitkPageHeader into lp:unity8

Proposed by Andrea Cimitan
Status: Rejected
Rejected by: Michael Terry
Proposed branch: lp:~cimi/unity8/uitkPageHeader
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/reenable-skipped-tests
Diff against target: 511 lines (+121/-126)
9 files modified
qml/Components/Header.qml (+0/-28)
qml/Dash/DashPageHeader.qml (+32/-37)
qml/Dash/GenericScopeView.qml (+5/-0)
qml/Stages/Splash.qml (+7/-19)
tests/qmltests/Dash/tst_Dash.qml (+8/-8)
tests/qmltests/Dash/tst_DashContent.qml (+64/-5)
tests/qmltests/Dash/tst_DashPageHeader.qml (+0/-24)
tests/qmltests/Dash/tst_GenericScopeView.qml (+2/-2)
tests/qmltests/Dash/tst_PreviewView.qml (+3/-3)
To merge this branch: bzr merge lp:~cimi/unity8/uitkPageHeader
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Michael Zanetti Pending
Albert Astals Cid Pending
Review via email: mp+294937@code.launchpad.net

This proposal supersedes a proposal from 2016-05-03.

Commit message

Use PageHeader instead Ambiance's PageHeadStyle

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 * Did you perform an exploratory manual test run of your code change and any related functionality?
y
 * Did you make sure that your branch does not contain spurious tags?
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
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2344
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1108/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/661
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/661
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/661/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1486
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1451
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1451
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1451
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1451/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1451
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1451/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1451
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1451/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1451
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1451/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1451
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1451/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1451
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1451/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

seems this requires some test updates

review: Needs Fixing
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2345
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1110/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/663
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/663
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/663
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1488
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1453
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1453
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1453
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1453/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1453
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1453/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1453
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1453/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1453
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1453/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1453
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1453/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1453
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1453/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2346
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1114/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/667
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/667
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/667
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1495
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1459
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1459
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1459
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1459/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1459
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1459/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1459
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1459/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1459
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1459/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1459
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1459/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1459
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1459/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2348
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1116/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/670
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/670
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/670/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1498
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1462
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1462
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1462
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1462/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1462
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1462/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1462
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1462/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1462
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1462/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1462
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1462/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1462
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1462/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Why the
 - units.dp(1)
in the "Fixed GenericScopeView test" commit?

review: Needs Information
Revision history for this message
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal

> Why the
> - units.dp(1)
> in the "Fixed GenericScopeView test" commit?
there is a test in genericscopeview that checks the position of the listview when the header is scrolled up, and there was one pixel difference between PageHeadStyle code (using contentHeight for height of the container) and the current one using implicitHeight - figured out it need to be smaller of 1px

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

> > Why the
> > - units.dp(1)
> > in the "Fixed GenericScopeView test" commit?
> there is a test in genericscopeview that checks the position of the listview
> when the header is scrolled up, and there was one pixel difference between
> PageHeadStyle code (using contentHeight for height of the container) and the
> current one using implicitHeight - figured out it need to be smaller of 1px

I'd be more confortable with

- height: header.implicitHeight - units.dp(1)
+ height: header.__styleInstance.contentHeight

What do you think?

Revision history for this message
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal

> > > Why the
> > > - units.dp(1)
> > > in the "Fixed GenericScopeView test" commit?
> > there is a test in genericscopeview that checks the position of the listview
> > when the header is scrolled up, and there was one pixel difference between
> > PageHeadStyle code (using contentHeight for height of the container) and the
> > current one using implicitHeight - figured out it need to be smaller of 1px
>
> I'd be more confortable with
>
> - height: header.implicitHeight - units.dp(1)
> + height: header.__styleInstance.contentHeight
>
> What do you think?

considering we already use __styleInstance in this code, at this point it makes sense to use it even here, thank you nice idea!

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

file:///home/tsdgeos_work/phablet/unity8/uitkPageHeader/qml/Dash/DashPageHeader.qml:272: TypeError: Cannot read property 'foregroundColor' of undefined
file:///home/tsdgeos_work/phablet/unity8/uitkPageHeader/qml/Dash/DashPageHeader.qml:272: TypeError: Cannot read property 'foregroundColor' of undefined

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

There's still a focus bug.
 * make tryDash
 * Click on the magnifying glass
 * Click on the filters icon (the one left to Cancel)
 * Click anywhere outside the popup

With the new code the search bar regains the focus, with the old one it does not.

Could you also please add a test for this so next time we don't have to rely on manual testing?

review: Needs Fixing
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2349
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1122/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/678
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/678
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/678
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1506
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1470
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1470
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1470/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1470
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1470/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2350
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1125/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/681
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/681
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/681
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1509
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1473
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1473
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1473
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1473/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1473
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1473/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1473
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1473/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1473
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1473/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1473
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1473/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1473
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1473/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2352
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1149/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/703
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/703
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/703/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1541
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1501
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1501
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1501/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

What i described in https://code.launchpad.net/~cimi/unity8/uitkPageHeader/+merge/293608/comments/753507 is worse now, you end up in a case in which the navigation is open and the search bar is not visible.

review: Needs Fixing
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2354
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1156/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/708
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/708
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/708
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1549
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1509
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1509
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1509
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1509/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1509
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1509/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1509
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1509/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1509
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1509/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1509
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1509/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1509
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1509/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

 * 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 (except broken autopilot and unstable wizard test)

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

PASSED: Continuous integration, rev:2355
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1227/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/764
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/764
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1645
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1598
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1598
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1591
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1591/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1591
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1591/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1591
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1591/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1591
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1591/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1591
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1591/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1591
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1591/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~cimi/unity8/uitkPageHeader updated
2356. By Andrea Cimitan

remove test

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

PASSED: Continuous integration, rev:2356
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1228/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/765
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/765
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1647
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1600
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1600
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1593
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1593/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1593
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1593/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1593
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1593/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1593
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1593/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1593
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1593/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1593
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1593/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

I did a full rebase here: https://code.launchpad.net/~unity-team/unity8/uitkPageHeader/+merge/294967

Will mark this as unneeded.

Unmerged revisions

2357. By Andrea Cimitan

merged trunk

2356. By Andrea Cimitan

remove test

2355. By Andrea Cimitan

rebased on mzanetti branch

2354. By Andrea Cimitan

comment

2353. By Andrea Cimitan

More things to test in the filters popover

2352. By Andrea Cimitan

unfocus header when closing popup

2351. By Andrea Cimitan

add spacing

2350. By Andrea Cimitan

Fixed error

2349. By Andrea Cimitan

good idea albert

2348. By Andrea Cimitan

Fixed PreviewView test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'qml/Components/Header.qml'
2--- qml/Components/Header.qml 2016-01-25 10:12:48 +0000
3+++ qml/Components/Header.qml 1970-01-01 00:00:00 +0000
4@@ -1,28 +0,0 @@
5-/*
6- * Copyright (C) 2014 Canonical, Ltd.
7- *
8- * This program is free software; you can redistribute it and/or modify
9- * it under the terms of the GNU General Public License as published by
10- * the Free Software Foundation; version 3.
11- *
12- * This program is distributed in the hope that it will be useful,
13- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15- * GNU General Public License for more details.
16- *
17- * You should have received a copy of the GNU General Public License
18- * along with this program. If not, see <http://www.gnu.org/licenses/>.
19- */
20-
21-import Ubuntu.Components 1.3
22-import Ubuntu.Components.Themes.Ambiance 1.3
23-
24-PageHeadStyle {
25- // FIXME: Don't use this but PageHeader from Ubuntu.Components 1.3.
26- id: root
27-
28- property var styledItem: root
29- property string title
30- property var config: PageHeadConfiguration {}
31- property var contents: null
32-}
33
34=== modified file 'qml/Dash/DashPageHeader.qml'
35--- qml/Dash/DashPageHeader.qml 2016-04-27 15:01:10 +0000
36+++ qml/Dash/DashPageHeader.qml 2016-05-17 18:24:15 +0000
37@@ -16,7 +16,7 @@
38
39 import QtQuick 2.4
40 import Ubuntu.Components 1.3
41-import Ubuntu.Components.Themes.Ambiance 1.3
42+import Ubuntu.Components.Popups 1.3
43 import Ubuntu.Components.ListItems 1.3
44 import "../Components"
45
46@@ -78,13 +78,13 @@
47 }
48 }
49
50- function closePopup(keepFocus) {
51+ function closePopup(keepFocus, keepSearch) {
52 if (extraPanel.visible) {
53 extraPanel.visible = false;
54 } else if (!keepFocus) {
55- unfocus();
56+ unfocus(keepSearch);
57 }
58- if (!searchTextField.text && !root.navigationTag && searchHistory.count == 0) {
59+ if (!keepSearch && !searchTextField.text && !root.navigationTag && searchHistory.count == 0) {
60 headerContainer.showSearch = false;
61 }
62 }
63@@ -97,9 +97,9 @@
64 closePopup(keepFocus);
65 }
66
67- function unfocus() {
68+ function unfocus(keepSearch) {
69 searchTextField.focus = false;
70- if (!searchTextField.text && !root.navigationTag) {
71+ if (!keepSearch && !searchTextField.text && !root.navigationTag) {
72 headerContainer.showSearch = false;
73 }
74 }
75@@ -142,7 +142,7 @@
76 objectName: "headerContainer"
77 clip: contentY < height
78 anchors { left: parent.left; top: parent.top; right: parent.right }
79- height: header.contentHeight
80+ height: header.__styleInstance.contentHeight
81 contentHeight: headersColumn.height
82 interactive: false
83 contentY: showSearch ? 0 : height
84@@ -173,22 +173,18 @@
85 id: headersColumn
86 anchors { left: parent.left; right: parent.right }
87
88- PageHeadStyle {
89- // FIXME: Replace PageHeadStyle from the Ambiance theme by the new PageHeader from Ubuntu.Components 1.3.
90+ PageHeader {
91 id: searchHeader
92 anchors { left: parent.left; right: parent.right }
93 opacity: headerContainer.clip || headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
94- __separator_visible: false
95- // Required to keep PageHeadStyle noise down as it expects the Page's properties around.
96- property var styledItem: searchHeader
97- property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
98- property color panelColor: background.topColor
99- panelForegroundColor: config.foregroundColor
100- backgroundColor: "transparent"
101- config: PageHeadConfiguration {
102+
103+ StyleHints {
104 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
105+ backgroundColor: "transparent"
106+ dividerColor: "transparent"
107 }
108- property var contents: Item {
109+
110+ contents: Item {
111 anchors.fill: parent
112
113 TextField {
114@@ -273,7 +269,7 @@
115 anchors.fill: parent
116 anchors.margins: units.gu(2)
117 name: "filters"
118- color: root.activeFiltersCount > 0 ? UbuntuColors.orange : header.config.foregroundColor
119+ color: root.activeFiltersCount > 0 ? UbuntuColors.orange : header.__styleInstance.foregroundColor
120 }
121
122 onClicked: {
123@@ -283,6 +279,7 @@
124
125 AbstractButton {
126 id: cancelButton
127+ objectName: "cancelButton"
128 width: cancelLabel.width + cancelLabel.anchors.rightMargin + cancelLabel.anchors.leftMargin
129 anchors {
130 top: parent.top
131@@ -296,7 +293,7 @@
132 Label {
133 id: cancelLabel
134 text: i18n.tr("Cancel")
135- color: header.panelForegroundColor
136+ color: header.__styleInstance.foregroundColor
137 verticalAlignment: Text.AlignVCenter
138 anchors {
139 verticalCenter: parent.verticalCenter
140@@ -309,28 +306,27 @@
141 }
142 }
143
144- PageHeadStyle {
145- // FIXME: Replace PageHeadStyle from the Ambiance theme by the new PageHeader from Ubuntu.Components 1.3.
146+ PageHeader {
147 id: header
148 objectName: "innerPageHeader"
149 anchors { left: parent.left; right: parent.right }
150 height: headerContainer.height
151 opacity: headerContainer.clip || !headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
152- __separator_visible: false
153- property var styledItem: header
154- property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
155- property color panelColor: background.topColor
156- panelForegroundColor: config.foregroundColor
157- backgroundColor: "transparent"
158- config: PageHeadConfiguration {
159- title: root.title
160+ title: root.title
161+
162+ StyleHints {
163 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
164- backAction: Action {
165- iconName: backIsClose ? "close" : "back"
166- visible: root.showBackButton
167- onTriggered: root.backClicked()
168- }
169-
170+ backgroundColor: "transparent"
171+ dividerColor: "transparent"
172+ }
173+
174+ leadingActionBar.actions: Action {
175+ iconName: backIsClose ? "close" : "back"
176+ visible: root.showBackButton
177+ onTriggered: root.backClicked()
178+ }
179+
180+ trailingActionBar {
181 actions: [
182 Action {
183 objectName: "store"
184@@ -366,7 +362,6 @@
185 ]
186 }
187
188- property var contents: null
189 Component.onCompleted: root.refreshLogo()
190
191 Component {
192
193=== modified file 'qml/Dash/GenericScopeView.qml'
194--- qml/Dash/GenericScopeView.qml 2016-05-04 18:08:35 +0000
195+++ qml/Dash/GenericScopeView.qml 2016-05-17 18:24:15 +0000
196@@ -662,6 +662,10 @@
197 onShowFiltersPopup: { // item
198 extraPanel.visible = false;
199 scopeView.filtersPopover = PopupUtils.open(Qt.resolvedUrl("FiltersPopover.qml"), item, { "contentWidth": scopeView.width - units.gu(2) } );
200+ scopeView.filtersPopover.Component.onDestruction.connect(function () {
201+ categoryView.pageHeader.closePopup(false, true);
202+ categoryView.pageHeader.unfocus(true); // remove the focus from the search field
203+ })
204 }
205 }
206
207@@ -683,6 +687,7 @@
208 onHistoryItemClicked: {
209 SearchHistoryModel.addQuery(text);
210 categoryView.pageHeader.searchQuery = text;
211+ categoryView.pageHeader.unfocus();
212 }
213
214 onDashNavigationLeafClicked: {
215
216=== modified file 'qml/Stages/Splash.qml'
217--- qml/Stages/Splash.qml 2016-03-08 20:59:22 +0000
218+++ qml/Stages/Splash.qml 2016-05-17 18:24:15 +0000
219@@ -29,7 +29,7 @@
220 property color footerColor: d.undefinedColor
221 property alias imageSource: overlaidImage.source
222 property url icon
223- property alias title: headerConfig.title
224+ property alias title: header.title
225 property alias showHeader: header.visible
226
227 Ambiance.Palette {
228@@ -75,25 +75,13 @@
229 style: Component { MainViewStyle {theme: styledItem.fakeTheme} }
230 }
231
232- Ambiance.PageHeadStyle {
233- // FIXME: Replace PageHeadStyle by PageHeader from Ubuntu.Components 1.3.
234+ PageHeader {
235 id: header
236- anchors {
237- left: parent.left;
238- right: parent.right
239- }
240- property var styledItem: header
241- // FIXME Keep in sync with SDK's MainView.qml values of these two colors
242- property color dividerColor: Qt.darker(styledItem.backgroundColor, 1.1)
243- property color panelColor: Qt.lighter(styledItem.backgroundColor, 1.1)
244- panelForegroundColor: config.foregroundColor
245- backgroundColor: "transparent"
246- config: PageHeadConfiguration {
247- id: headerConfig
248- foregroundColor: styledItem.fakeTheme.palette.normal.backgroundText
249- }
250-
251- property var contents: null
252+ anchors { left: parent.left; right: parent.right }
253+ StyleHints {
254+ foregroundColor: styledItem.fakeTheme.palette.selected.backgroundText
255+ backgroundColor: "transparent"
256+ }
257 }
258
259 Image {
260
261=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
262--- tests/qmltests/Dash/tst_Dash.qml 2016-05-17 18:24:15 +0000
263+++ tests/qmltests/Dash/tst_Dash.qml 2016-05-17 18:24:15 +0000
264@@ -125,7 +125,7 @@
265 // Go back
266 var scopesList = findChild(dash, "scopesList");
267 var scopesListPageHeader = findChild(scopesList, "pageHeader");
268- var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");
269+ var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar;
270 mouseClick(backButton);
271 tryCompare(bottomEdgeController, "progress", 0);
272 }
273@@ -200,7 +200,7 @@
274
275 // Go back
276 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
277- var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");
278+ var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
279 mouseClick(backButton);
280
281 // Check temp scope is gone
282@@ -226,7 +226,7 @@
283 // Go back
284 var scopesList = findChild(dash, "scopesList");
285 var scopesListPageHeader = findChild(scopesList, "pageHeader");
286- var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");
287+ var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar;
288 mouseClick(backButton);
289 tryCompare(bottomEdgeController, "progress", 0);
290 }
291@@ -338,7 +338,7 @@
292 // Exit edit mode and go back
293 var scopesList = findChild(dash, "scopesList");
294 var scopesListPageHeader = findChild(scopesList, "pageHeader");
295- var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");
296+ var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar;
297 mouseClick(backButton);
298 mouseClick(backButton);
299 tryCompare(bottomEdgeController, "progress", 0);
300@@ -383,7 +383,7 @@
301 // Exit edit mode
302 var scopesList = findChild(dash, "scopesList");
303 var scopesListPageHeader = findChild(scopesList, "pageHeader");
304- var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");
305+ var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar;
306 mouseClick(backButton);
307
308 // Click on third scope
309@@ -493,7 +493,7 @@
310
311 // Go back
312 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
313- var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");
314+ var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
315 mouseClick(backButton);
316
317 // Check temp scope is gone
318@@ -561,7 +561,7 @@
319
320 // Go back
321 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
322- var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");
323+ var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
324 mouseClick(backButton);
325
326 // Check temp scope is gone
327@@ -593,7 +593,7 @@
328
329 // Go back
330 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
331- var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");
332+ var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
333 mouseClick(backButton);
334
335 // Check temp scope is gone
336
337=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
338--- tests/qmltests/Dash/tst_DashContent.qml 2016-03-29 03:47:39 +0000
339+++ tests/qmltests/Dash/tst_DashContent.qml 2016-05-17 18:24:15 +0000
340@@ -215,7 +215,7 @@
341 verify(pageHeader, "Could not find the scope page header.");
342 var innerHeader = findChild(pageHeader, "innerPageHeader");
343 verify(innerHeader, "Could not find the scope page header.");
344- compare(innerHeader.config.title, scopesModel.getScope(data.index).name);
345+ compare(innerHeader.title, scopesModel.getScope(data.index).name);
346 }
347
348 function test_is_active_data() {
349@@ -515,10 +515,18 @@
350 }
351
352 function test_navigationShowFilterPopup() {
353- goToSecondLevel();
354-
355 var dashContentList = findChild(dashContent, "dashContentList");
356+ var pageHeader = findChild(dashContentList.currentItem, "scopePageHeader")
357 var settingsButton = findChild(dashContentList.currentItem, "settingsButton");
358+ var searchButton = findChild(dashContentList.currentItem, "search_button");
359+ var cancelButton = findChild(dashContentList.currentItem, "cancelButton");
360+ var searchTextField = findChild(pageHeader, "searchTextField");
361+ var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
362+ var headerContainer = findChild(pageHeader, "headerContainer");
363+
364+ // test that closing the filters popover without a search unfocuses and removes the navigation
365+ mouseClick(searchButton);
366+ tryCompare(peExtraPanel, "visible", true);
367
368 var filtersPopover = findChild(shell, "filtersPopover")
369 verify(!filtersPopover);
370@@ -526,8 +534,33 @@
371 mouseClick(settingsButton);
372
373 filtersPopover = findChild(shell, "filtersPopover")
374-
375- verify(filtersPopover);
376+ verify(filtersPopover);
377+
378+ mouseClick(shell, shell.width - 1, shell.height - 1);
379+
380+ tryCompare(pageHeader.extraPanel, "visible", false);
381+ tryCompare(headerContainer, "showSearch", true);
382+ tryCompare(searchTextField, "focus", false);
383+
384+ mouseClick(cancelButton);
385+ tryCompare(headerContainer, "showSearch", false);
386+ tryCompare(headerContainer, "contentY", headerContainer.height);
387+
388+ // test within a navigation
389+ goToSecondLevel();
390+
391+ filtersPopover = findChild(shell, "filtersPopover")
392+ verify(!filtersPopover);
393+
394+ mouseClick(settingsButton);
395+
396+ filtersPopover = findChild(shell, "filtersPopover")
397+ verify(filtersPopover);
398+
399+ mouseClick(shell, shell.width - 1, shell.height - 1);
400+
401+ tryCompare(pageHeader.extraPanel, "visible", false);
402+ tryCompare(headerContainer, "showSearch", true);
403 }
404
405 function test_primaryFilter() {
406@@ -625,5 +658,31 @@
407 tryCompareFunction(function() { return dashContentList.currentItem.item.scope.id == nextScopeId; }, true);
408 compare(dashContentList.currentIndex, 0);
409 }
410+
411+ function test_extraPanel() {
412+ var dashContentList = findChild(dashContent, "dashContentList");
413+ var pageHeader = findChild(dashContentList.currentItem, "scopePageHeader")
414+ pageHeader.searchEntryEnabled = true;
415+ pageHeader.searchHistory.clear();
416+
417+ pageHeader.searchHistory.addQuery("Search1");
418+ pageHeader.searchHistory.addQuery("Search2");
419+
420+ pageHeader.triggerSearch();
421+ tryCompare(pageHeader.extraPanel, "visible", true);
422+
423+ var searchTextField = findChild(pageHeader, "searchTextField");
424+ compare(searchTextField.focus, true);
425+
426+ var recentSearches = findChild(pageHeader.extraPanel, "recentSearchesRepeater");
427+ verify(recentSearches, "Could not find recent searches");
428+
429+ waitForRendering(recentSearches);
430+
431+ mouseClick(recentSearches.itemAt(0));
432+ compare(pageHeader.searchQuery, "Search2");
433+ tryCompare(pageHeader.extraPanel, "visible", false);
434+ compare(searchTextField.focus, false);
435+ }
436 }
437 }
438
439=== modified file 'tests/qmltests/Dash/tst_DashPageHeader.qml'
440--- tests/qmltests/Dash/tst_DashPageHeader.qml 2016-03-29 03:47:39 +0000
441+++ tests/qmltests/Dash/tst_DashPageHeader.qml 2016-05-17 18:24:15 +0000
442@@ -147,30 +147,6 @@
443 doResetSearch();
444 }
445
446- function test_extraPanel() {
447- searchEnabled = true;
448- pageHeader.searchHistory.clear();
449-
450- pageHeader.searchHistory.addQuery("Search1");
451- pageHeader.searchHistory.addQuery("Search2");
452-
453- pageHeader.triggerSearch();
454-
455- tryCompare(pageHeader.extraPanel, "visible", true);
456-
457- var searchTextField = findChild(pageHeader, "searchTextField");
458- compare(searchTextField.focus, true);
459-
460- var recentSearches = findChild(pageHeader.extraPanel, "recentSearchesRepeater");
461- verify(recentSearches, "Could not find recent searches");
462- waitForRendering(recentSearches);
463- mouseClick(recentSearches.itemAt(0));
464-
465- compare(pageHeader.searchQuery, "Search2");
466- tryCompare(pageHeader.extraPanel, "visible", false);
467- compare(searchTextField.focus, false);
468- }
469-
470 function test_popup_closing_data() {
471 return [
472 { tag: "with search text", searchText: "foobar", hideSearch: false },
473
474=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
475--- tests/qmltests/Dash/tst_GenericScopeView.qml 2016-03-29 03:47:39 +0000
476+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2016-05-17 18:24:15 +0000
477@@ -442,8 +442,8 @@
478
479 var innerHeader = findChild(header, "innerPageHeader");
480 verify(innerHeader, "Could not find the inner header");
481- verify(Qt.colorEqual(innerHeader.config.foregroundColor, data.foreground),
482- "Foreground color not equal: %1 != %2".arg(innerHeader.config.foregroundColor).arg(data.foreground));
483+ verify(Qt.colorEqual(innerHeader.__styleInstance.foregroundColor, data.foreground),
484+ "Foreground color not equal: %1 != %2".arg(innerHeader.__styleInstance.foregroundColor).arg(data.foreground));
485
486 var background = findChild(header, "headerBackground");
487 verify(background, "Could not find the background");
488
489=== modified file 'tests/qmltests/Dash/tst_PreviewView.qml'
490--- tests/qmltests/Dash/tst_PreviewView.qml 2016-03-29 03:47:39 +0000
491+++ tests/qmltests/Dash/tst_PreviewView.qml 2016-05-17 18:24:15 +0000
492@@ -98,7 +98,7 @@
493 var header = findChild(view, "innerPageHeader");
494 verify(header, "Could not find the preview header");
495
496- compare(header.config.title, "Mock Scope");
497+ compare(header.title, "Mock Scope");
498 }
499
500 function test_header_style() {
501@@ -107,8 +107,8 @@
502
503 var innerHeader = findChild(header, "innerPageHeader");
504 verify(innerHeader, "Could not find the inner header");
505- verify(Qt.colorEqual(innerHeader.config.foregroundColor, UbuntuColors.darkGrey),
506- "Foreground color not equal: %1 != %2".arg(innerHeader.config.foregroundColor).arg(UbuntuColors.darkGrey));
507+ verify(Qt.colorEqual(innerHeader.__styleInstance.foregroundColor, UbuntuColors.darkGrey),
508+ "Foreground color not equal: %1 != %2".arg(innerHeader.__styleInstance.foregroundColor).arg(UbuntuColors.darkGrey));
509
510 var background = findChild(header, "headerBackground");
511 verify(background, "Could not find the background");

Subscribers

People subscribed via source and target branches