[regression] Extra flickable margin added when using PullToRefresh
Bug #1578619 reported by
Alberto Mardegan
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Zoltan Balogh | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
High
|
Tim Peeters |
Bug Description
The attached test works fine under OTA-10, but fails in rc-proposed. This is most likely caused by https:/
To reproduce, run the attached test case with qmlscene:
1) Wait for the window to be populated (network connectivity is needed)
2) Swipe down, to trigger the pull to refresh action
3) View automatically jumps to the second page
4) navigate back to the first page
5) watch the flickable topMargin: the pulltorefresh item is now visible
If time you repeat steps 2-4, the topMargin increases.
Related branches
lp://staging/~tpeeters/ubuntu-ui-toolkit/refreshMargin
- ubuntu-sdk-build-bot: Approve (continuous-integration)
- Zsombor Egri: Approve
-
Diff: 293 lines (+182/-18)4 files modifiedsrc/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml (+36/-17)
tests/unit_x11/tst_components/tst_pulltorefresh_listview.qml (+1/-1)
tests/unit_x11/tst_components/tst_pulltorefresh_pagestack_topmargin.qml (+86/-0)
tests/unit_x11/tst_components/tst_pulltorefresh_topmargin.qml (+59/-0)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
importance: | Undecided → Critical |
assignee: | nobody → Tim Peeters (tpeeters) |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
importance: | Critical → High |
Changed in canonical-devices-system-image: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Zoltan Balogh (bzoltan) |
milestone: | none → 12 |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The bug was not introduced by the MR linked in the bug description. I reproduced the bug with this code, and pulling down the listview and releasing it with a vertical velocity:
import QtQuick 2.2 XmlListModel 2.0 Components. ListItems 1.3
anchors. fill: parent
delegate: Standard {
width: ListView.view.width
height: units.gu(5)
text: index//title
onVertical VelocityChanged : print("vv = "+verticalVelocity)
PullToRefr esh {
onRefreshingC hanged: print("refreshing = "+refreshing)
onRefresh: {
refreshin g = true;
refreshin g = false;
/ / refreshTimer. start() ;
import QtQuick.
import Ubuntu.Components 1.3
import Ubuntu.
MainView {
width: units.gu(40)
height: units.gu(71)
Page {
id: page0
title: "Reuters"
ListView {
id: view
model: 15
}
id: pullToRefresh
}
}
}
}
// Timer { refreshing = false
// id: refreshTimer
// onTriggered: pullToRefresh.
// }
}
and with UITK r1930 (before the mentioned MR) and r1918.
I think the bug was always there, the topMargin gets messed up by the PullToRefresh. However, pre-r1931, the topMargin was (incorrectly) reset to 0 when a new Page was pushed on the PageStack (which happens in onRefresh for the example linked to th ebug). Now that this no longer happens, the bug becomes visible when the Page is popped from the stack.