-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify graph metadata using UI #317
Comments
I would like to work on this issue. |
@jlaw9 @adbharadwaj Can you help @bruce-wayne99 to get started on fixing this issue? Thanks for the offer, @bruce-wayne99. We welcome new contributors! |
@bruce-wayne99, Thanks for offering to work on this issue. Here is how I would do it I was a newbie in GraphSpace project. Step 1You can find detailed documentation on how the graph information, tags, title, and legend is populated using the following link. Graph Data Attributes Attributes Treated Specially by GraphSpace Although the above-mentioned sub-section should be sufficient, I highly encourage you to understand go through entire section on CYJS format to get a more thorough understanding. Step 2Go through our update/put Here are some useful links: Step 3Since the API call for this feature will be from UI, we don't have to authenticate our calls using BasicAuth. Instead, we need to authenticate it using CSRF tokens. The good thing is we already have a JS API to handle graph update in our JS library. All you need to worry about is sending in the right input data and hence, step 1 and 2 is really important. Here is a sample call where we are updating the graph to make it public. apis.graphs.update(graph_id, {
'is_public': 1
},
successCallback = function (response) {
// This method is called when group_to_graph relationship is successfully deleted.
// The entry from the table is deleted.
$(e).parent().find('.unshare-graph-btn').removeClass('hidden');
$(e).addClass('hidden');
},
errorCallback = function (xhr, status, errorThrown) {
// This method is called when error occurs while deleting group_to_graph relationship.
$.notify({
message: xhr.responseJSON.error_message
}, {
type: 'danger'
});
}); Step 4Write the code !! @bruce-wayne99, I would be happy to discuss the user experience flow with you on this thread, if you need to. Some tips:
|
@adbharadwaj I actually thought of adding buttons like 'Edit name', 'Add Tag', 'Remove Tag', 'Edit description' in the graph table. As shown in the figure below. |
@bruce-wayne99 In principle, this UI is good but a challenge is that as we expand the list of items we want to be editable the number of buttons increases. Another option to consider is show an "Edit" icon (usually looks like a pen). Upon clicking this icon, either (i) a new page opens up that allows editing of all metadata associated with the graph or I like option (i) more since it allows metadata that is not shown in the table to edited. But a minor drawback is that it requires opening a new page. @adbharadwaj Comments? |
@tmmurali So, Iam thinking of implementing an Edit icon for each graph and on clicking the Edit option a new modal opens up just like the way for Remove where for each meta data field an input tag can be specified where he can enter new values for the data and clicking the submit button triggers an AJAX request. |
I like what @tmmurali suggested in option (i). Another option would be to create a new page for editing and that means you will have to add a new url-route. I would rather create a client-side util on the graph page. So instead of editing from the graphs list page, users should be editing on the page for a given graph. Something like edit description feature in GitHub. Let me know if you have more questions. |
@adbharadwaj i have implemented editing name and title of the graph. The following is a gif of the implementation. Please have a look at it. |
@bruce-wayne99 Looks promising! |
@adbharadwaj sorry for the late response, I was having exams, since the graph visualization and graph information are on different panels, should i display the name, description, tags, title for the graph in the visualization tab and then provide edit/cancel options for the user in the visualization tab? |
@bruce-wayne99 We need to split this into two parts.
|
@adbharadwaj I have implemented editing name,title,description functionality. gif of the implementation : |
Thanks. This implementation looks nice.
Is the edit button seen only by the user of the graph?
…On Mon, Feb 12, 2018 at 3:46 AM, Subramanyam Makam ***@***.*** > wrote:
@adbharadwaj <https://github.com/adbharadwaj> I have implemented editing
name,title,description functionality. gif of the implementation :
[image: final]
<https://user-images.githubusercontent.com/25129274/36088891-1e900b70-0fff-11e8-873c-ef7137b244ec.gif>
I have gone through the tags implementation github but there are using a
new page for displaying all the tags and editing them as shown in the
screen shot.
[image: screenshot from 2018-02-12 14-10-04]
<https://user-images.githubusercontent.com/25129274/36088898-259f2c5c-0fff-11e8-80ea-7c44dcfc60e9.png>
Please suggest me regarding implementation of add/remove tags.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#317 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGkWUJ2FVaHVNNTNaS-p6iLkyb6lk9DGks5tT_pdgaJpZM4O6aC1>
.
|
Sorry. I meant to say "owner of the graph".
…On Mon, Feb 12, 2018 at 10:49 AM, T. M. Murali ***@***.***> wrote:
Thanks. This implementation looks nice.
Is the edit button seen only by the user of the graph?
On Mon, Feb 12, 2018 at 3:46 AM, Subramanyam Makam <
***@***.***> wrote:
> @adbharadwaj <https://github.com/adbharadwaj> I have implemented editing
> name,title,description functionality. gif of the implementation :
> [image: final]
> <https://user-images.githubusercontent.com/25129274/36088891-1e900b70-0fff-11e8-873c-ef7137b244ec.gif>
> I have gone through the tags implementation github but there are using a
> new page for displaying all the tags and editing them as shown in the
> screen shot.
> [image: screenshot from 2018-02-12 14-10-04]
> <https://user-images.githubusercontent.com/25129274/36088898-259f2c5c-0fff-11e8-80ea-7c44dcfc60e9.png>
> Please suggest me regarding implementation of add/remove tags.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#317 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGkWUJ2FVaHVNNTNaS-p6iLkyb6lk9DGks5tT_pdgaJpZM4O6aC1>
> .
>
|
Yes, the edit button will only appear if user-id is same as the owner-id. |
@bruce-wayne99 Looks great. Few more suggestions.
Let me know if you have any questions. |
@adbharadwaj Sir, @tmmurali Sir, |
@bruce-wayne99 A few more suggestions,
Basically, use your discretion to come up with a neat UI. |
@adbharadwaj Sir,
|
@bruce-wayne99 @adbharadwaj This implementation looks good. Two points:
|
@adbharadwaj , @tmmurali Sir,
|
@bruce-wayne99 Do not worry about the notification in this pull request. That will be taken care when we merge the notifications pull request. For now, just unite the edits under one button and let us know. |
@adbharadwaj, @tmmurali Sir, |
The main missing UI features to modify graph metadata are:
Users should be able to edit the title and tags in the "Graph Visualization" tab and the graph inforomation/legend in the "Graph Information" tab
The text was updated successfully, but these errors were encountered: