c2corg / v6_ui

UI for c2c.org v6
GNU Affero General Public License v3.0
7 stars 12 forks source link

User Preference Specifications #598

Closed fjacon closed 7 years ago

fjacon commented 8 years ago

Todo:

Relies on https://github.com/c2corg/v6_api/issues/402

asaunier commented 8 years ago

@tsauerwein made me realize that v5 region filters also include countries and administrative areas (FR departements or CH cantons) in addition to ranges. I think ranges are most of the time enough, but yes there are cases where the other region types are useful. For instance if you leave in a place where no range has been defined yet (but then it probably means there are not much activity in this area). Or if you only want to see the outings in Valais.

It's not that easy to display all 3 types of regions at the same time in a map (or maybe by displaying each type in a distinct layer? but then you might not see that a region is selected if the layer is not activated). On the other hand it's more intuitive (you figure out easily what regions are interesting for you even though you don't know the name on c2c and see the exact limits of the regions).

A problem of a region text selector is that it might take quite a lot of space in the page since there are many regions: 678 according to http://www.camptocamp.org/areas (among them 90 ranges http://www.camptocamp.org/areas/list/atyp/1). We could use tabs and scrollbared sections but then again you might not see that some region is selected?

If using a map selector, it's probably a good idea to only retrieved simplified geometries of the areas!

Since there is quite a lot of regions, I wonder if this preferences page should not be redis-cached on the UI-side with the list of areas retrieved by a UI-server-side request to the API (one for all). Then the client-side would only make API requests to get/update the user-related list of prefed regions.

tsauerwein commented 8 years ago

It's not that easy to display all 3 types of regions at the same time in a map (or maybe by displaying each type in a distinct layer? but then you might not see that a region is selected if the layer is not activated).

These are the main problems I see with the map.

We could use tabs and scrollbared sections but then again you might not see that some region is selected?

We could display the selected areas in a separate select box, so that it is easy to see which areas are selected. You could then also unselect areas in this box.

c2corg-area-selector

asaunier commented 8 years ago

Arf, this regions selector looks way more tricky and complicated to build than I expected!

Existing solution in v5

sans titre

A few remarks:

For v6

tsauerwein commented 8 years ago

I think the component should consist of three elements:

c2corg-area-selector

This would allow to select an area by searching for the name but also to explore areas if you are not sure about the name. And with the box showing the selected areas you know exactly what you have chosen.

asaunier commented 8 years ago

Not bad indeed :)

asaunier commented 8 years ago
  • A tree or a component like in v5 where you have three tabs with groups.
  • A search to directly choose an area using its name.
  • A box where you see the selected areas, and where you can unselect areas.

This proposal makes sense indeed.

But I have several concerns:

I wonder if a good compromise (could be improved later) would not be to:

Sounds reasonable?

tsauerwein commented 8 years ago

For me, yes. We can still improve it later.