Up until now, widgets could only have one instance. Also, we were unable to remove a widget (and its data) completely, only disable. This brings both.
What I've done
- Added removeWidget mutation for widget deletion
- Updated the UI
- Moved enabling toggle to the left panel (shows on hover or selection)
- Add delete button
- Add dropdown of available widgets (from installed plugins)
The dropdown showing installed widgets will grey out widgets that are single-use and already have a single instance. Trying to delete a selected widget will show a confirmation modal before deleting.
What I haven't done
I haven't fixed an issue with the LayerTreeView components where the whole tree will be re-rendered on ANY changes made within (this includes local state). This affects the toggle's transition so it doesn't smoothly move, as well as the widget dropdown is contained within the left panel (where it should come out slightly over Cesium. Also affects the left panel's help balloons) and it will be slightly clipped the first time opening the dropdown.
How I tested
- Add/Delete widgets
- Enable/disable widgets
- Try to add a single-use widget(Storytelling) a second time (should be greyed out)