Location enhancement
Location should be applied in all pages consistantly, ie if a location is applied it should not be lost when I change page:
- the location applied (ex: Lyon) should clearly appear in the user interface (homepage logged and not logged; events, activties, groups - calendar beta is only nice to have)
- the displayed results should be filtered accordingly
- the user must have the possibility to clear the location (a cross is there but it doesn't work properly)
Location by order of priority would be:
- empty (then distance should be empty too, or even not shown)
- setup by user (already in place in user parameters but not applied consistantly) - which would override the admin instance setup
- choosen by the user at any time, either by using "get my location" or by entering a value manually. Get my location already exist (small pin) but it should stand out more (a button with text "Use my location")
Nice to have: Having the possibility to select the location of the homepage in the URL (ex: URL https://mobilizon.fr/?locationName=Île-de-France&lat=48.8534951&lon=2.3483915&distance=25_km&page=1)
Note: after this change is done, "logged home page" should only show the agenda ("events nearby" are not needed anymore)
Note Pomme Setop Lahax:
- Only coordinates are stored in the URL. When converting the coordinates back in the location text, it could show something completely different from the user prompt. Ex: I input a city, the coordinates take the "center" for the city, but when converting back to a text it would select a specific street. One idea is to put the "location name (user prompt)" in the URL (so it can be bookedmarked) and also in session storage (cause we can not put it in all the links, ex link when clicking an event)
- behavior of location name in URL is different in homepage and in seach page (from homepage is keeps only the city name, from search page it keeps the whole prompt --> rather keep the behavior of search page URL for the whole website)
- challenge if having the same info both in the search field, the URL and the session storage --> what's the master, how to keep them in sync when one is modified? Setop input, URL would prevail (ex: if somebody receives a URL)
Out of scope: #933 (note: we'll have location driven by URL, so the admin will have the possibility to redirect his homepage to his chosen location) To be done later: #1492
Edited by setop