osmberlin / osm-traffic-sign-tool

A proof of concept tool to help you find the right `traffic_sign=*` tag as well as recommended tags for the road that it applies to.
https://trafficsigns.osm-verkehrswende.org/
GNU Affero General Public License v3.0
18 stars 5 forks source link

Drag&Drop to change order of signs in "Selected Signs" list #34

Closed tordans closed 4 weeks ago

tordans commented 1 year ago

Context

The order is relevant for the traffic_sign=* tag.

It probably also need to be considered when updating tags.

Right now one needs to add the signs in the right order and remove them to reorder them.

Story

Add drag and drop to reorder

Research

tordans commented 4 weeks ago

The newest version supports reordering of tags by drag & drop.

https://trafficsigns.osm-verkehrswende.org/DE?signs=DE%3A239%2C1022-10%3B1000-31

This was harder to implement than I expected, mainly due to issues with handling the state in NUQS (URL) and using the list state library that react aria components rely on. I am now using framer motion reorder.