neomap icon indicating copy to clipboard operation
neomap copied to clipboard

Create / Update / Duplicate layer

Open stellasia opened this issue 4 years ago • 3 comments

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

We should move to something like:

  • If layer has never been rendered: "Create New Layer"
  • If the layer has already been rendered: "Update Layer", "Duplicate Layer"

@jodom , what do you think?

stellasia avatar Nov 29 '20 10:11 stellasia

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 avatar Dec 06 '20 05:12 okjodom

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

okjodom avatar Dec 06 '20 05:12 okjodom

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.

stellasia avatar Dec 06 '20 08:12 stellasia