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
=== modified file 'plugins/Dash/listviewwithpageheader.cpp'
--- plugins/Dash/listviewwithpageheader.cpp 2016-09-08 13:57:38 +0000
+++ plugins/Dash/listviewwithpageheader.cpp 2016-09-08 13:57:38 +0000
@@ -1392,10 +1392,6 @@
13921392
1393 m_contentHeightDirty = false;1393 m_contentHeightDirty = false;
1394 adjustMinYExtent();1394 adjustMinYExtent();
1395 if (contentHeight + m_minYExtent < height()) {
1396 // need this since in the previous call to adjustMinYExtent contentHeight is not set yet
1397 m_minYExtent = 0;
1398 }
1399 m_inContentHeightKeepHeaderShown = m_headerItem && m_headerItem->y() == contentY();1395 m_inContentHeightKeepHeaderShown = m_headerItem && m_headerItem->y() == contentY();
1400 setContentHeight(contentHeight);1396 setContentHeight(contentHeight);
1401 m_inContentHeightKeepHeaderShown = false;1397 m_inContentHeightKeepHeaderShown = false;
14021398
=== modified file 'tests/plugins/Dash/listviewwithpageheadertest.cpp'
--- tests/plugins/Dash/listviewwithpageheadertest.cpp 2016-09-08 13:57:38 +0000
+++ tests/plugins/Dash/listviewwithpageheadertest.cpp 2016-09-08 13:57:38 +0000
@@ -2008,6 +2008,22 @@
2008 QTRY_COMPARE(lvwph->m_minYExtent, 610.);2008 QTRY_COMPARE(lvwph->m_minYExtent, 610.);
2009 }2009 }
20102010
2011 void testRemoveItemCutContents()
2012 {
2013 view->rootObject()->setHeight(921);
2014 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 0), Q_ARG(QVariant, 6));
2015 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 1000));
2016 QTRY_COMPARE(lvwph->m_visibleItems.count(), 1);
2017 QTRY_COMPARE(lvwph->contentHeight(), 1050.);
2018 scrollToBottom();
2019 QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 530));
2020 QTRY_COMPARE(lvwph->m_visibleItems.count(), 2);
2021 QMetaObject::invokeMethod(model, "removeItems", Q_ARG(QVariant, 1), Q_ARG(QVariant, 1));
2022 QTRY_COMPARE(lvwph->m_visibleItems.count(), 1);
2023 verifyItem(0, 50., 530., false);
2024 QTRY_COMPARE(lvwph->m_minYExtent, 530.);
2025 }
2026
2011private:2027private:
2012 QQuickView *view;2028 QQuickView *view;
2013 ListViewWithPageHeader *lvwph;2029 ListViewWithPageHeader *lvwph;

Subscribers

People subscribed via source and target branches