Murali-group / GraphSpace

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

Build graph descriptions and node/edge pop-ups from JSON instead of HTML #311

Open jlaw9 opened 7 years ago

jlaw9 commented 7 years ago

Currently users need to know HTML to create good looking graph descriptions and node and edge popups. We should either replace the HTML with our own JSON structure for defining lists and tables, or support something like markdown in the popups making it easier for users to create.

If we go with our own JSON structure, I think this kind of structure would work:

"popup": {
    "list": [ 
        "item1", 
        "item2",
        [
             "subitem1"
        ]
    ],
    "table": [
         [ "col1", "col2"],
         "..."
     ]
}

where 'list' and 'table' sections would be converted to htmls lists and tables, and the text inside would still support HTML allowing for users to set external links and colors and such.

The most common features I put in node and edge popups are:

  1. external links
  2. lists and lists of lists
  3. bold and italics words
  4. line separating sections

Here's an example node popup: image

In the graph description section, the most common features are:

  1. node and edge tables which contain
    • colors
    • shapes (SVG images which can be set in html specifically)
  2. external links
jlaw9 commented 7 years ago

When we plan on implementing something like this, we should keep in mind that it would be nice to be able to view these attributes on the node/edge table tabs and to search/select/filter based on node/edge attributes. Not sure how we could incorporate this.

I guess I'm thinking of having node and edge tables similar to Cytoscape. First of all, that would allow for better syncing between Cytoscape and GraphSpace. Seems like that would be a somewhat difficult endeavor to add to GraphSpace.