falling-fruit / falling-fruit-web

Mobile-friendly website for Falling Fruit
https://beta.fallingfruit.org
GNU General Public License v3.0
38 stars 22 forks source link

Persist map settings / add map settings to URLs #517

Open ezwelty opened 2 weeks ago

ezwelty commented 2 weeks ago

We will eventually need to support the many legacy url parameters (see https://github.com/falling-fruit/falling-fruit-web/issues/246) that control map settings:

https://fallingfruit.org/?z=11&y=47.41426&x=8.55928&m=true&t=roadmap&l=false&c=forager,freegan

At the same time, there are good reasons to persist map settings so that they survive map refresh (https://github.com/falling-fruit/falling-fruit-web/issues/516). Even better, that they persist between visits on the same device, as the language selector appears to do already.

So to recap:

wbazant commented 6 days ago

No full plan for this yet, but I had some thoughts, there's a difference between params and settings:

There are controls which we want to persist into Redux because we want them to be linkable - users can share them with one another, but maybe in the future if we had a type page it could link to a map with only that type checked, e.g. /map?types=1337. Meanwhile, there are also controls that are individual to the user: site language is the most obvious one, but maybe someone with accessibility needs or a specific device they use will prefer a particular map type or a label setting.

We should also support params from the old site but that can be a one way binding - and almost as a separate issue, there should be a local storage backup of settings.