NASA-IMPACT / veda-ui

Frontend for the Dashboard Evolution project
Other
17 stars 4 forks source link

[E&A] Preselection of presets and hand-drawn polygons across page reloads #950

Open dzole0311 opened 3 weeks ago

dzole0311 commented 3 weeks ago
  1. When a preset is selected and the page is reloaded, the preset option is not shown as selected. We should probably keep this selection as a url parameter ("preset=Alaska") and then load it in the PresetSelector, so that the user knows which state was selected.
  2. Additionally, we should highlight the selected hand-drawn geometries on the map across page reloads. If I draw 3 polygons, select 2 of them and reload the page, they are not again selected due to diverging states between MapboxDraw and our React atoms. We already keep the state of the selected aois in the url, so we should switch those to "simple_select" mode so that they can be automatically highlighted
  3. It might be a good idea to differentiate the colors of the geometries based on if they are "static" (presets, file uploads) or hand-drawn (@faustoperez any thoughts?)
faustoperez commented 2 weeks ago

It might be a good idea to differentiate the colors of the geometries based on if they are "static" (presets, file uploads) or hand-drawn (@faustoperez any thoughts?)

To simplify the work I suggest (for now) that they be differentiated by the presence of the edit handles, but use the same "this is a shape" stroke and fill color 👍