stellasia / neomap

A Neo4j Desktop application to visualize nodes with geographic attributes on a map.
GNU General Public License v3.0
106 stars 13 forks source link

Create / Update / Duplicate layer #83

Open stellasia opened 3 years ago

stellasia commented 3 years ago

Right now, we always have "Create New Layer" and "Update Layer" buttons displayed.

We should move to something like:

@jodom , what do you think?

okjodom commented 3 years ago

Besides store to file, we currently don't persist layers beyond sessions. As such we don't have a clear signal for layer having been rendered/not

Starting from one layer spec with selected data points, and visual specs like name, line thickness, heatmap radius e.t.c what does it mean to create a new layer? 'Update Layer' clearly is the user is overriding already declared spec including selected data on a layer. 'Duplicate Layer' makes sense if I don't change any of the layer specs besides name. 'Create New Layer' is generic, starting off with some declared spec on a layer (existing / absolutely new), and could result in a duplication of layer (except for name + unique id)

okjodom commented 3 years ago

Do we also want to start persisting layers outside app state. For example in some weak storage like session storage which we can clear when app is closed? This is not necessary, but makes sense if we see a lot of use of store-to-file functionality

stellasia commented 3 years ago

To get the "already rendered" information, we can just update the layer's state the first time the "Create" button is clicked. "Create" means "Add to map" in my mind. Once the layer is already on the map, then we can "Update" it.