Closed gitriley closed 4 years ago
@gitriley,
Excellent questions. Responses below, looping in @cynthiamah:
captions don't show up for datasets. Actually, dataset captions don't even appear to be available from the projectJSON. Also, I don't think there's anywhere to edit it. So should we include them at all?
Yes. I've renamed the "caption" field to description (just pushed) and added it to the project detail serializer.
How should we approach copying, both for datasets and maps? It should be simple, I think, but I wanted to consult you since it seems like more of a backend task.
Agreed. This needs to be a server-side function. Skip for now.
Also, I've been thinking about the wording for this action: "Copy Map" vs. "Make a Copy" vs. "Duplicate Map". Right now it's "Copy Map", but I tend to associate that with copy/paste actions.
Agreed. I like "Duplicate Map" / "Duplicate Dataset"
How to delete datasets. I don't think we've built this functionality anywhere yet. Also, do we even allow it?
Yes. This is already being done now, when a map is deleted that has layers that link to empty datasets. If those empty datasets are not referenced in other maps, they are also deleted on the backend. For more info on that, see the "destroyMap" method in the dataManager:
What happens if a dataset is in use by 1 or more layers.
Good question! A validation error is thrown: the 'DELETE' method checks for layer dependencies before deleting the dataset. See the model code.
Related to deleting the datasets...
Let's discuss this one on the phone.
I changed the maps to a list view. Let me know what you think. I can make adjustments there pretty easily.
Sounds good to me.
Also, for the dataset and map items, we can currently open them through the dropdown menu. However, it also makes sense to me to just be able to access them by clicking on their titles. I did this with the dataset list just to check it out.
I agree.
There does appear to be some problems with the print view as well, both in this new map and in the main app.
Let's skip "print functionality for now (and omit from dropdown menu). This is a bigger task.
@vanwars Here's the Project Detail screen. There are still a few issues to finalize, but I wanted to create the PR to get a discussion going.
A couple of things:
captions don't show up for datasets. Actually, dataset captions don't even appear to be available from the projectJSON. Also, I don't think there's anywhere to edit it. So should we include them at all? This is just in response to Cynthia's initial mockup, which had a description for each dataset.
How should we approach copying, both for datasets and maps? It should be simple, I think, but I wanted to consult you since it seems like more of a backend task. Also, I've been thinking about the wording for this action: "Copy Map" vs. "Make a Copy" vs. "Duplicate Map". Right now it's "Copy Map", but I tend to associate that with copy/paste actions.
How to delete datasets. I don't think we've built this functionality anywhere yet. Also, do we even allow it? What happens if a dataset is in use by 1 or more layers.
Related to deleting the datasets, I'm having a sort of awkward situation where the model for each dataset-item is actually itself a collection. i.e. a dataset is the model, but it is also a collection of records. It's problematic because we have an array of datasets (record collections), and when I try create a Backbone.Collection from that array, it works, but Backbone serializes all the existing Collection methods into model attributes. As an alternative, I'm just creating some dummy models that only grab the relevant info from the datasets, and passing those into the childviews. (This is sort of hard to explain, but see here). Everything works, but I'm just mentioning this because it will probably be relevant when deleting the datasets.
I changed the maps to a list view. Let me know what you think. I can make adjustments there pretty easily.
Also, for the dataset and map items, we can currently open them through the dropdown menu. However, it also makes sense to me to just be able to access them by clicking on their titles. I did this with the dataset list just to check it out.
There does appear to be some problems with the print view as well, both in this new map and in the main app.