keithamoss / mapa

2 stars 0 forks source link

Add an undo button for each icon moving session and change the default operating mode #1190

Open keithamoss opened 2 months ago

keithamoss commented 2 months ago

The user sometimes mistakenly moves icons.

The buttons appears next to the moving lock (this also makes it a bit more obvious that you're in moving mode).

The button is disabled/greyed to start with.

We log to local state/redux when the user moves an icon and we just let the undo button page backwards through that set and pops them off the top until it's empty.

Should the map jump around to centre on the position of the icon you've moved?

keithamoss commented 2 months ago

Maybe https://usehooks.com/usehistorystate?

keithamoss commented 2 months ago

Change the operating mode so the default is to only allow one move before it turns itself off.

When turned on, show an icon to the left that makes it sticky. (The current behaviour.)

keithamoss commented 2 months ago

Default operating mode and the 'sticky' button is done.

Discuss how the undo should work given the new sticky mode.