Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Dropdown search #314

Open
Uj947nXmRqV2nRaWshKtHzTvckUUpD opened this issue Jun 7, 2022 · 7 comments
Open

Dropdown search #314

Uj947nXmRqV2nRaWshKtHzTvckUUpD opened this issue Jun 7, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@Uj947nXmRqV2nRaWshKtHzTvckUUpD

The search bar should have a fropdown list showing found location matching search string and should contain the country or country code

@prestosole
Copy link
Member

prestosole commented Jun 7, 2022

We had considered it before, but all the choices required some sort of GMS intervention, which we don't like in Clima. However, please feel free to offer any suggestions you may have!

@triallax
Copy link
Member

triallax commented Jun 7, 2022

Just like @prestosole said, we want to make it clear that we are not going to accept any GMS usage in Clima. That being said, we can use https://openweathermap.org/api/geocoding-api, which, given a complete city name (plus an optional country code, and a state name for US locations, which is also optional), will give back up to five matching locations.

#267 is related.

@triallax triallax added the enhancement New feature or request label Jun 7, 2022
@Uj947nXmRqV2nRaWshKtHzTvckUUpD
Copy link
Author

just fo reference - the open source project "forecastie" (https://f-droid.org/en/packages/cz.martykan.forecastie/) also uses openweathermap and it is able to show a list of matching locations without GMS

@triallax
Copy link
Member

triallax commented Jun 7, 2022

@fusionneur does it show matching locations even if you don't type the complete city name? For instance, does it show you cities named "London" if you put in "Londo"?

@prestosole
Copy link
Member

@mhmdanas it does not, actually; It shows an "invalid city name" type error.

@Uj947nXmRqV2nRaWshKtHzTvckUUpD
Copy link
Author

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented Jun 7, 2022

yes you're right, it seems that forecastie isn't actually able to show matches based on part of the city's name. However if there are multiple cities with same name (eg. 4 cities named Rome in US and 1 in IT) they are shown in a different list, unlike in Clima. Also it seems that both clima and forecastie are able to correct misspelled cities (eg. Valeta -> Valletta)

@triallax
Copy link
Member

triallax commented Jun 8, 2022

However if there are multiple cities with same name (eg. 4 cities names Rome in US and 1 in IT) they are shown in a different list, unlike in Clima.

Well, that's exactly what I believe OpenWeatherMap supports, so we're gonna use that.

Also it seems that both clima and forecastie are able to correct misspelled cities (eg. Valeta -> Valletta)

Clima doesn't do anything of the sort, it's almost certaintly OpenWeatherMap doing that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants