Weather app does not search the local city before proceeding to search online

Bug #1434319 reported by Nekhelesh Ramananthan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Weather App
Triaged
Medium
Nekhelesh Ramananthan

Bug Description

When the user presses the search button and searches for a location, the weather app immediately searches for that city online without first confirming that the local city list has the city or not. We should do this to reduce bandwidth usage and if now it kind of questions the presence of a local city list.

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

How would the app know to start searching online? With the current methodology, it might be nice to search the local list for the first 3 characters or so. With the strategy outlined in lp:1434318, maybe it'd be best to start searching online after the 3rd query of the list.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Actually in the clock app the strategy we use is to search the local list using the SDK SortFilterModel. When the model has 0 results, it then proceeds to search online. So it may search online only after noticing that there are 0 local results available. I will try to get a MP for this when I find some time.

Changed in ubuntu-weather-app:
assignee: nobody → Nekhelesh Ramananthan (nik90)
Revision history for this message
Victor Thompson (vthompson) wrote :

What would happen if I search for a city, like Rome, but I actually want "Rome, New York, USA"? I don't think waiting until there are 0 results is a good strategy.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Well if you search for "Rome" and and get only "Rome, Italy" returned from the local list which is not what you were looking for, then I would assume that the user should be more specific and type "Rome, New York" which would then retrieve the results from the online provider. And to be honest, the SortFilterModel is pretty much instant, so the user wouldn't even notice where the results are coming from.

Revision history for this message
Martin Borho (martin-borho) wrote :

I don't know if it's worth the effort, since there are only 43 locations in the local list. And mostly not more than one per country.

Revision history for this message
Martin Borho (martin-borho) wrote :

In the old app, there's a timer on the search field, which starts searches only after roughly a second after the typing has started.

See http://bazaar.launchpad.net/~ubuntu-weather-dev/ubuntu-weather-app/trunk/view/head:/components/AddLocationPage.qml#L154

Would be easy to reuse.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.