Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Create / Update / Duplicate layer #83

Open
stellasia opened this issue Nov 29, 2020 · 3 comments
Open

Create / Update / Duplicate layer #83

stellasia opened this issue Nov 29, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@stellasia
Copy link
Owner

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 stellasia added the enhancement New feature or request label Nov 29, 2020
@okjodom
Copy link
Contributor

okjodom commented Dec 6, 2020

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
Copy link
Contributor

okjodom commented Dec 6, 2020

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
Copy link
Owner Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants