Murali-group / GraphSpace

The interactive graph sharing website.
http://graphspace.org
GNU General Public License v2.0
30 stars 41 forks source link

Bulk edit, remove, and share graphs in the UI #322

Open jlaw9 opened 7 years ago

jlaw9 commented 7 years ago

Currently there is no way to remove or share more than one graph at once in the UI. It would be great to be able to select multiple graphs and then operate on them in the following ways:

manishkk commented 6 years ago

Hi, I would like to work on this issue. Sharing/Unsharing and removing seems to be straightforward and should be easy to implement and so is adding tags. But for modifying existing tags I'm assuming we show only those tags which are present in all of the selected graphs?

Two options for the above implementation:(i) I can maintain a list of all the selected graphs client side and then send ajax requests in a loop for all of them for specific tasks thus utilizing the existing infrastructure or (ii) we can create a new API endpoint altogether where I send a list of all the ids and do this on the backend.

I'm leaning towards the first option as it utilizes existing functions and endpoints.

Let me know what you think.

adbharadwaj commented 6 years ago

@manishkk Option 1 sounds fine to me. I think that before you implement, we need to find state the corner cases clearly. For example, how would we edit tags for multiple graphs at the same time? How would the UX look like? Do we even really need that feature?

@jlaw9 Can you help with UX? What kind of user flow are you looking for?

manishkk commented 6 years ago

@jlaw9 same question as @adbharadwaj do we really need this feature for tags? Anyway, should I go ahead and start implementing it for other features like sharing/unsharing?

manishkk commented 6 years ago

@adbharadwaj I started working on implementing sharing and here's the current workflow. I plan to change the alert to a better looking modal or simply disabling the share button in case no graph has been selected.

Share multiple graphs

adbharadwaj commented 6 years ago

@manishkk Can you state how you are planning to handle the corner cases?

manishkk commented 6 years ago

@adbharadwaj What do you mean by corners cases here? Do you mean corner cases for tags only or corner cases for tags, unshare/share and remove together.

jlaw9 commented 6 years ago

For tags I was thinking of something like is implemented in #317, but the edit button would be for tags only. So it would be similar to the share button you added @manishkk. Maybe you can just hide the button until some graphs are selected.

The use case I was thinking for tags is the following: a user uploads 500+ graphs with a specific tag. They later want to change and/or add new tags to this group of graphs. We would need to allow the user to select all the graphs they uploaded (probably using the tag they uploaded their graphs with), and edit their tags. The "select all" checkbox would need to be able to select all of the graphs returned by the current search result, not just the currently visible graphs.

Also, we would need to make sure that the edit box only shows the tags present for all of the selected graphs so the user can remove a tag only if it's common to all of them. Similarly with graph sharing, we should only allow the option to unshare the selected graphs with a group if all of the selected graphs are shared with that group.

jlaw9 commented 6 years ago

Another point is that we should probably change the "Visibility" column to a "groups" or "sharing" column so you can easily see what groups a graph is shared with on the main page allowing you to see before/after the bulk-edit of sharing.

adbharadwaj commented 6 years ago

@manishkk I meant corner cases for tags, unshare/share and remove separately.