Merge lp:~aacid/unity8/fixLVWPHItemsCutTop into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 2556
Merged at revision: 2622
Proposed branch: lp:~aacid/unity8/fixLVWPHItemsCutTop
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/fixLVWPHRemoveItemShowHeader
Diff against target: 41 lines (+16/-4)
2 files modified
plugins/Dash/listviewwithpageheader.cpp (+0/-4)
tests/plugins/Dash/listviewwithpageheadertest.cpp (+16/-0)
To merge this branch: bzr merge lp:~aacid/unity8/fixLVWPHItemsCutTop
Reviewer Review Type Date Requested Status
Michał Sawicz Abstain
Unity8 CI Bot continuous-integration Needs Fixing
Josh Arenson Approve
Review via email: mp+302044@code.launchpad.net

Commit message

LVWPH: Fix items cut on top in the dash (or at least some instances of it)

This reverts a workaround for tests failing introduced in r2121

The commit log of that revision says "The other solutions involve implementing maxYExtent"
which we actually implemented in r2351 so the workaround would not seem needed anymore
and on top of it is causing brokenness so remove it

Description of the change

* Are there any related MPs required for this MP to build/function as expected?
Prerequisite

 * Did you perform an exploratory manual test run of your code change and any related functionality?
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

How to reproduce in real life:
 * Install the com.canonical.scopes.ctripflights_0.5.2_armhf.click scope (ask Albert if you don't have it)
 * Search flights from TAO to NKG
 * See how contents cut on top

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2554
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1884/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2459
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1337
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1337
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1337
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2487
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2374
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2374
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2374
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2367/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2367/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2367/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2367/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2367/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2367/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2367/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2367/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2367
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2367/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Josh Arenson (josharenson) wrote :

I can still reproduce the issue occasionally.

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

> I can still reproduce the issue occasionally.

Searching flights from TAO to NKG? Or from other destinations? I can't seem to reproduce here at all :/

Which phone are you using?

If you can reproduce it "easily enough", can you check if it's what is the position on screen of the airports you select? The vertical position is the key to reproduce this errors it seems.

Revision history for this message
Josh Arenson (josharenson) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
  Yes, after discussing w/ Albert I approve.

* Did CI run pass? If not, please explain why.
 Unrelated

review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote :

The test added here fails, so CI failure not unrelated, really...

review: Needs Fixing
lp:~aacid/unity8/fixLVWPHItemsCutTop updated
2555. By Albert Astals Cid

Merge

2556. By Albert Astals Cid

Stabilize test

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

FAILED: Continuous integration, rev:2556
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2130/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2800
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1550
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1550
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1550/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2828
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2688/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2688/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2688/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2688/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2688/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2688/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2688/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2688/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2688
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2688/artifact/output/*zip*/output.zip

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

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

FAILED: Continuous integration, rev:2556
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2145/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2820
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1564
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1564
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1564
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2848
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2707/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2707
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2707/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) :
review: Abstain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Dash/listviewwithpageheader.cpp'
2--- plugins/Dash/listviewwithpageheader.cpp 2016-09-08 13:57:38 +0000
3+++ plugins/Dash/listviewwithpageheader.cpp 2016-09-08 13:57:38 +0000
4@@ -1392,10 +1392,6 @@
5
6 m_contentHeightDirty = false;
7 adjustMinYExtent();
8- if (contentHeight + m_minYExtent < height()) {
9- // need this since in the previous call to adjustMinYExtent contentHeight is not set yet
10- m_minYExtent = 0;
11- }
12 m_inContentHeightKeepHeaderShown = m_headerItem && m_headerItem->y() == contentY();
13 setContentHeight(contentHeight);
14 m_inContentHeightKeepHeaderShown = false;
15
16=== modified file 'tests/plugins/Dash/listviewwithpageheadertest.cpp'
17--- tests/plugins/Dash/listviewwithpageheadertest.cpp 2016-09-08 13:57:38 +0000
18+++ tests/plugins/Dash/listviewwithpageheadertest.cpp 2016-09-08 13:57:38 +0000
19@@ -2008,6 +2008,22 @@
20 QTRY_COMPARE(lvwph->m_minYExtent, 610.);
21 }
22
23+ void testRemoveItemCutContents()
24+ {
25+ view->rootObject()->setHeight(921);
26+ QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 0), Q_ARG(QVariant, 6));
27+ QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 1000));
28+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 1);
29+ QTRY_COMPARE(lvwph->contentHeight(), 1050.);
30+ scrollToBottom();
31+ QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 530));
32+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 2);
33+ QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 1), Q_ARG(QVariant, 1));
34+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 1);
35+ verifyItem(0, 50., 530., false);
36+ QTRY_COMPARE(lvwph->m_minYExtent, 530.);
37+ }
38+
39 private:
40 QQuickView *view;
41 ListViewWithPageHeader *lvwph;

Subscribers

People subscribed via source and target branches