Merge lp:~vthompson/ubuntu-weather-app/reboot-anchor-location-pages into lp:ubuntu-weather-app

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 48
Merged at revision: 47
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-anchor-location-pages
Merge into: lp:ubuntu-weather-app
Diff against target: 27 lines (+3/-3)
2 files modified
app/ui/HomePage.qml (+3/-0)
app/ui/LocationPane.qml (+0/-3)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-anchor-location-pages
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+261316@code.launchpad.net

Commit message

* Set contentHeight declaratively.

Description of the change

* Set contentHeight declaratively.

Currently, if you have multiple locations and one is on the other side of the world, you will likely get a different number of days in the forecast--this causes the contentHeight to be incorrect. If the first location has 4 days of forecast, but the second only has 3, then in some cases the user will experience the first location being "clipped" to only see the first 3 days. Additionally, the 2nd location would see excessive whitespace at the end of the view.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

LGTM :-)

P.S. Have we worked out where the +units.gu(3) is coming from yet? If not should we copy the code comment with the FIXME: ?

review: Approve
48. By Victor Thompson

Add back commentary.

Revision history for this message
Victor Thompson (vthompson) wrote :

I've added the commentary back in.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Thanks for the extra commentary change :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/ui/HomePage.qml'
2--- app/ui/HomePage.qml 2015-05-29 02:38:23 +0000
3+++ app/ui/HomePage.qml 2015-06-07 13:39:33 +0000
4@@ -95,6 +95,9 @@
5 id: locationFlickable
6 width: parent.width
7 height: parent.height
8+
9+ // FIXME: not sure where the 3GU comes from, PullToRefresh or something in HomePage?
10+ contentHeight: locationPages.currentItem.childrenRect.height + units.gu(3)
11 contentWidth: parent.width
12
13 Behavior on contentHeight {
14
15=== modified file 'app/ui/LocationPane.qml'
16--- app/ui/LocationPane.qml 2015-05-09 03:23:34 +0000
17+++ app/ui/LocationPane.qml 2015-06-07 13:39:33 +0000
18@@ -40,9 +40,6 @@
19 height: childrenRect.height
20 anchors.fill: parent.fill
21
22- // FIXME: not sure where the 3GU comes from, PullToRefresh or something in HomePage?
23- onHeightChanged: locationFlickable.contentHeight = locationItem.height + units.gu(3)
24-
25 function emptyIfUndefined(variable, append) {
26 if (append === undefined) {
27 append = ""

Subscribers

People subscribed via source and target branches

to all changes: