Merge lp:~vthompson/ubuntu-weather-app/reboot-chance-of-rain into lp:ubuntu-weather-app

Proposed by Victor Thompson on 2015-06-29
Status: Merged
Approved by: Andrew Hayzen on 2015-07-25
Approved revision: 60
Merged at revision: 66
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-chance-of-rain
Merge into: lp:ubuntu-weather-app
Diff against target: 76 lines (+14/-5)
4 files modified
app/components/DayDelegate.qml (+8/-3)
app/components/ForecastDetailsDelegate.qml (+1/-1)
app/ui/LocationPane.qml (+1/-1)
debian/changelog (+4/-0)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-chance-of-rain
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-07-25
Andrew Hayzen Approve on 2015-07-25
Nekhelesh Ramananthan (community) 2015-06-29 Needs Fixing on 2015-06-29
Review via email: mp+263211@code.launchpad.net

Commit message

Add chance of rain

Description of the change

Add chance of rain

To post a comment you must log in.
Nekhelesh Ramananthan (nik90) wrote :

I added several cities but I did not see "Chance of rain" being displayed for any of them despite it showing that it would rain for that day. Am I missing something?

review: Needs Fixing
Victor Thompson (vthompson) wrote :

I think the API is only available from TWC
On Jun 29, 2015 4:43 AM, "Nekhelesh Ramananthan" <email address hidden>
wrote:

> Review: Needs Fixing
>
> I added several cities but I did not see "Chance of rain" being displayed
> for any of them despite it showing that it would rain for that day. Am I
> missing something?
> --
>
> https://code.launchpad.net/~vthompson/ubuntu-weather-app/reboot-chance-of-rain/+merge/263211
> You are the owner of
> lp:~vthompson/ubuntu-weather-app/reboot-chance-of-rain.
>

Andrew Hayzen (ahayzen) wrote :

Other than the debian/changelog being incorrect, as discussed, LGTM :-)

review: Approve
60. By Victor Thompson on 2015-07-25

Merge and resolve conflicts

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/DayDelegate.qml'
2--- app/components/DayDelegate.qml 2015-06-26 21:51:28 +0000
3+++ app/components/DayDelegate.qml 2015-07-25 21:53:56 +0000
4@@ -31,7 +31,8 @@
5 property alias high: highLabel.text
6 property alias low: lowLabel.text
7
8- property alias chanceOfRain: chanceOfRainForecast.chance
9+ property alias description: descriptionForecast.text
10+ property alias chanceOfRain: chanceOfRainForecast.value
11 property alias humidity: humidityForecast.value
12 property alias pollen: pollenForecast.value
13 property alias sunrise: sunriseForecast.value
14@@ -186,15 +187,19 @@
15
16 // Overview text
17 Label {
18- id: chanceOfRainForecast
19+ id: descriptionForecast
20 color: UbuntuColors.coolGrey
21 fontSize: "x-large"
22 horizontalAlignment: Text.AlignHCenter
23 text: i18n.tr("Chance of rain")
24 width: parent.width
25 visible: false // FIXME: add overview text eg "Chance of flurries"
26+ }
27
28- property int chance: 0
29+ ForecastDetailsDelegate {
30+ id: chanceOfRainForecast
31+ forecast: i18n.tr("Chance of rain")
32+ imageSource: "../graphics/extended-information_chance-of-rain.svg"
33 }
34
35 ForecastDetailsDelegate {
36
37=== modified file 'app/components/ForecastDetailsDelegate.qml'
38--- app/components/ForecastDetailsDelegate.qml 2015-06-26 21:51:28 +0000
39+++ app/components/ForecastDetailsDelegate.qml 2015-07-25 21:53:56 +0000
40@@ -39,7 +39,7 @@
41 Label {
42 id: forecastLabel
43 elide: Text.ElideRight
44- width: units.gu(8)
45+ width: units.gu(14)
46 }
47
48 Label {
49
50=== modified file 'app/ui/LocationPane.qml'
51--- app/ui/LocationPane.qml 2015-06-26 22:20:20 +0000
52+++ app/ui/LocationPane.qml 2015-07-25 21:53:56 +0000
53@@ -98,7 +98,7 @@
54 low: Math.round(forecasts[x][tempUnits].tempMin).toString() + settings.tempScale,
55 high: (forecasts[x][tempUnits].tempMax !== undefined) ? Math.round(forecasts[x][tempUnits].tempMax).toString() + settings.tempScale : "",
56 image: (forecasts[x].icon !== undefined && iconMap[forecasts[x].icon] !== undefined) ? iconMap[forecasts[x].icon] : "",
57- chanceOfRain: forecasts[x].propPrecip === undefined ? -1 : forecasts[x].propPrecip,
58+ chanceOfRain: emptyIfUndefined(forecasts[x].propPrecip, "%"),
59 humidity: emptyIfUndefined(forecasts[x].humidity, "%"),
60 sunrise: forecasts[x].sunrise || SunCalc.SunCalc.getTimes(getDate(forecasts[x].date), data.location.coord.lat, data.location.coord.lon).sunrise.toLocaleTimeString(),
61 sunset: forecasts[x].sunset || SunCalc.SunCalc.getTimes(getDate(forecasts[x].date), data.location.coord.lat, data.location.coord.lon).sunset.toLocaleTimeString(),
62
63=== modified file 'debian/changelog'
64--- debian/changelog 2015-07-25 21:09:37 +0000
65+++ debian/changelog 2015-07-25 21:53:56 +0000
66@@ -2,6 +2,10 @@
67
68 [ Victor Thompson ]
69 * Sync debian version with click version.
70+ * Use sunrise/sunset from API if available, otherwise use calculated times
71+ * Allow adding the current location as a duplicate to the Locations List.
72+ * Add chance of rain
73+ * Add conditions text to day delegate.
74 * Default to OWM if the key file for TWC is blank.
75
76 [ Andrew Hayzen ]

Subscribers

People subscribed via source and target branches

to all changes: