Merge lp://staging/~gary-wzl77/ubuntu-weather-app/fix_1518888 into lp://staging/ubuntu-weather-app
- fix_1518888
- Merge into reboot
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Andrew Hayzen | ||||||||
Approved revision: | 222 | ||||||||
Merged at revision: | 251 | ||||||||
Proposed branch: | lp://staging/~gary-wzl77/ubuntu-weather-app/fix_1518888 | ||||||||
Merge into: | lp://staging/ubuntu-weather-app | ||||||||
Diff against target: |
470 lines (+210/-34) 13 files modified
AUTHORS (+2/-0) CMakeLists.txt (+5/-1) app/components/CurrentLocation.qml (+5/-22) app/components/HomeHourly.qml (+1/-1) app/data/WeatherApi.js (+2/-1) app/data/keys.js (+1/-1) app/ubuntu-weather-app.qml (+170/-4) app/ui/HomePage.qml (+3/-0) app/ui/LocationPane.qml (+3/-1) debian/changelog (+3/-0) manifest.json.in (+2/-1) po/com.ubuntu.weather.pot (+8/-2) ubuntu-weather-app.url-dispatcher (+5/-0) |
||||||||
To merge this branch: | bzr merge lp://staging/~gary-wzl77/ubuntu-weather-app/fix_1518888 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Hayzen | Approve | ||
Jenkins Bot | continuous-integration | Approve | |
Victor Thompson | Pending | ||
Review via email: mp+281719@code.staging.launchpad.net |
Commit message
1.Add url-dispatcher to enable user to navigate weather app from weather scope
2.Add argument(display) to show hourly view when its value is "hourly" on startup
Description of the change
1.Add url-dispatcher to enable user to navigate weather app from weather scope.
2.Add argument(display) to show hourly view when its value is "hourly" on startup.
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
- 194. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
Andrew Hayzen (ahayzen) wrote : | # |
Thanks for starting this :-)
I've found a few issues while looking at the code:
1) You are using Arguments not Connections { target: UriHandler; onOpened: { ... } } which means that the UrlHandler only works when the app is first started, not if the application was already running. Please refer to the docs [0] or music app [1] for how this works.
2) The idea is that this will be run from the scope, however you can search for any location in the scope and you can have any set of locations loaded in the weather app. So I could be on London in the scope, then click to open the weather-app and the weather-app could be at Berlin, this would not be very useful.
I suggest that you provide the latitude and longitude into the UriHandler so use something such as weather:
The weather could the detect if the location exists and switch to the relevant page, or if it doesn't show a temporary view that allows them to view the info, but also save that as a location in their list.
It's probably best that a mail thread is started between the weather app devs, if we want to discuss the protocol design further.
Furthermore could you add yourself to the AUTHORS file and add an entry into the debian/changelog (use the tool $ dch ).
0 - https:/
1 - http://
Gary.Wang (gary-wzl77) wrote : | # |
Thanks for your reply.
1) You are using Arguments not Connections { target: UriHandler; onOpened:
{ ... } } which means that the UrlHandler only works when the app is first
started, not if the application was already running. Please refer to the
docs [0] or music app [1] for how this works.
A: Good suggestion, will fix in next MR update.
2) The idea is that this will be run from the scope, however you can search
for any location in the scope and you can have any set of locations loaded
in the weather app. So I could be on London in the scope, then click to
open the weather-app and the weather-app could be at Berlin, this would not
be very useful.
A: That's also an idea from David who reviews weather scope. will fix in
weather scope at first.
I suggest that you provide the latitude and longitude into the UriHandler
so use something such as weather:
London hourly this could be weather:
forecast you could then use weather:
A: weather:
to keep current implementation(url parameters) by appending geo
information. E.g.
weather:
weather:
The weather could the detect if the location exists and switch to the
relevant page, or if it doesn't show a temporary view that allows them to
view the info, but also save that as a location in their list.
A: That's my general idea for this as well. if location exists, switch to
the relevant page. if not, searching location info based on lat&lng at
firstly, and switch to the regarding page then.
Thanks. Will update the MR later on.
On Wed, Jan 6, 2016 at 8:40 PM, Andrew Hayzen <email address hidden> wrote:
> Review: Needs Fixing
>
> Thanks for starting this :-)
>
> I've found a few issues while looking at the code:
> 1) You are using Arguments not Connections { target: UriHandler; onOpened:
> { ... } } which means that the UrlHandler only works when the app is first
> started, not if the application was already running. Please refer to the
> docs [0] or music app [1] for how this works.
> 2) The idea is that this will be run from the scope, however you can
> search for any location in the scope and you can have any set of locations
> loaded in the weather app. So I could be on London in the scope, then click
> to open the weather-app and the weather-app could be at Berlin, this would
> not be very useful.
>
> I suggest that you provide the latitude and longitude into the UriHandler
> so use something such as weather:
> London hourly this could be weather:
> forecast you could then use weather:
>
> The weather could the detect if the location exists and switch to the
> relevant page, or if it doesn't show a temporary view that allows them to
> view the info, but also save that as a location in their list.
>
> It's probably best that a mail thread is started between the weather app
> devs, if we want to discuss the protocol design further.
>
>
> Furtherm...
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:195
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Gary.Wang (gary-wzl77) wrote : | # |
Hi Andrew
1. Does the missing API key cause test run failed?
2. Is there any access limits for following API, at times I didn't get respond from it for a long time
http://
Thanks.
- 195. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
Andrew Hayzen (ahayzen) wrote : | # |
1) Yup, you will require the API keys to OWM/TWC to run the tests, please message me privately if you require them
2) geonames does have a limit and there is a bug 1326918 to migrate to the ubuntu one.
- 196. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 197. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 198. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 199. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 200. By Andrew Hayzen
-
* Use sidestage so that tablets don't go into portrait mode.
Approved by Jenkins Bot, Alan Pope .
- 201. By Victor Thompson
-
* Change translatable string from "rain" to "precipitation". Fixes: https:/
/bugs.launchpad .net/bugs/ 1521701. Approved by Jenkins Bot, Bartosz Kosiorek.
- 202. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 203. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 204. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 205. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 206. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 207. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 208. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 209. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 210. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 211. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 212. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 213. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 214. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 215. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 216. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 217. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 218. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 219. By Launchpad Translations on behalf of ubuntu-weather-dev
-
Launchpad automatic translations update.
- 220. By Gary.Wang
-
Add url-dispatcher to support for app launching from weather scope
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:220
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Andrew Hayzen (ahayzen) wrote : | # |
This looks to be progressing well, is there a silo or debs for the scope so that we can test this? Or are you manually running a the URI-handler from a command? If so do you mind sharing to assist in the testing of the branch?
Gary.Wang (gary-wzl77) wrote : | # |
Hi Andrew
Sorry for the late response,
I've been cleaning up the bugs on my hand, The following link you can find a armhf-based test scope, which allows you to open weather app from the scope and check the current temperature for three different locations.
London(
Berlin(mitte)
Roma(trevi)
https:/
Please playing around it and verify it on the device.
Thanks.
Sorry again for the delay.
P.S due to the API count limitation, sometimes main view didn't navigate to specific location page as we didn't get current temperature information.
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:221
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Andrew Hayzen (ahayzen) wrote : | # |
I've installed the scope and this branch on my device.
I've noticed a few functional issues to discuss first:
1) When I open via the scope, it causes all of the views (swiping across) to change to have the hourly view already shown, is this a design decision or an issue? (I wasn't expecting *all* the locations to change to hourly view, maybe only the location I had clicked in the scope)
2) I know you said there were API limitations, but I have not yet been able to select one of the locations in the scopes and then receive the respective location in the app. It always jumps to my 2nd non-location detected location.
Could you describe the expected scenarios here? For example
- if you click on a location and you already have the location, I assume it would jump to it?
- if you click on a location and you don't already have the location, I assume it will add a section - but will this be temporary? or remain in the saved list?
Also are you expecting this to work with both OpenWeatherMap and TheWeatherChannel.
If you want to discuss any of these issues with me, feel free to ping me (ahayzen) on IRC. I'm around in London daytime.
Gary.Wang (gary-wzl77) wrote : | # |
Sorry for the late reply(Just got back from vacation).
Basically, regarding the issue you have that
" It always jumps to my 2nd non-location detected location."
I guess you got the problem by checking the location from scope that app has recorded in db.
Indeed, i can reproduce it and fixed it in the latest commit.
Could you describe the expected scenarios here? For example
- if you click on a location and you already have the location, I assume it would jump to it?
A: Yes
- if you click on a location and you don't already have the location, I assume it will add a section - but will this be temporary? or remain in the saved list?
A:It will add a new location and save it in the location list and navigate to hourlyView to show the location's weather info.
I record a video to show how it works under the scenarios you mentioned above.
https:/
Pre-condition:
App only records my current location(Chengdu)
1. Click 'London' in scope to add a new location(Belvedere) in weather app(scenario 2)
2. Click 'Berlin' in scope to add a new location(Mitte) in weather app(scenario 2)
3. Click 'London' again from scope to jump to respective location(Belvedere) in weather app (scenario 1)
4. Click 'Roma' from scope to add a new location(Trevi) in weather app (scenario 2)
P.S:
1.if weather information is not able to be fetched via lat&lng due to api limits, the expected result is "Just open the app and stays at hourly view"
2.During my testing, new feature works fine with two providers(open weather map/the weather channel). In general, as long as backend APIs support to retrieve weather info via latitude and longitude, there would be no problem to add new provider in the future.
Andrew Hayzen (ahayzen) wrote : | # |
As discussed, it seems my issues occur when a manual location (London) has been added via the search functionality in the app.
Otherwise, when I don't have and manual search locations added, this functions as expected :-)
Gary.Wang (gary-wzl77) wrote : | # |
OKay, after taking a closer look, basically it's a bug of the scope, not weather app. I hardcoded the location name("London") for each item in scope. That's why it always jumps to the detected location(London) during your testing.
After the following change was made in scope, it should be working well.
- std::string openUri = "weather:
+std::string openUri = "weather:
I attached the latest scope. Could you please have a check again?
https:/
Sorry for the noise.
Thanks. :)
Andrew Hayzen (ahayzen) wrote : | # |
OK this is looking better, the only thing i've noticed is that if I have London as a location, when I click London it still jumps to London rather than Belvedere. But I'm thinking that is expected as it is coming from the &city=" + loc + " part of the uri.
So functionally I think this is pretty much there, I'll work on doing a code review next :-)
Andrew Hayzen (ahayzen) wrote : | # |
So testing this I’ve found that the restoration of which index you had previously selected is broken (but it also appears to be in trunk as well?)
Also in the code you have stated "NOTE: potential minor issue: cities with the same name in different countries", I think the best thing todo is report a bug with low priority stating the scenario in which this could happen.
Therefore I'm going to approve this branch, and we can fix the other issues separately.
PASSED: Continuous integration, rev:194 /core-apps- jenkins. ubuntu. com/job/ weather- app-ci/ 32/ /core-apps- jenkins. ubuntu. com/job/ generic- update- mp/304/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /core-apps- jenkins. ubuntu. com/job/ weather- app-ci/ 32/rebuild
https:/