Skip to content
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

Saving collapsed/hidden map content #49

Closed
royludo opened this issue May 17, 2017 · 10 comments
Closed

Saving collapsed/hidden map content #49

royludo opened this issue May 17, 2017 · 10 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@royludo
Copy link
Contributor

royludo commented May 17, 2017

Saving a file with collapsed nodes deletes its children and breaks the links.

@royludo royludo added the bug Something isn't working label May 17, 2017
@royludo royludo self-assigned this May 17, 2017
@ugurdogrusoz
Copy link
Contributor

Yes, this is a problem we have since SBGNML doesn't address the concept of "collapsed" nodes. What do you recommend we do? I don't think this is an urgent issue though.

@royludo
Copy link
Contributor Author

royludo commented May 17, 2017

it's not just the collapsed status, the problem is we lose information, as the children of the collapsed node are not written in the file. I will correct this. For the collapsed status itself, yes, I don't see what we can do.

@ugurdogrusoz
Copy link
Contributor

But how do you propose to restore collapsed children? Do you mean to persist the map as if the collapsed node is expanded?

@royludo
Copy link
Contributor Author

royludo commented May 17, 2017

Yes, that's what I had in mind. Are you ok with that ?

@ugurdogrusoz
Copy link
Contributor

Let s please discuss first

@ugurdogrusoz ugurdogrusoz changed the title Saving collapsed node Saving collapsed nodes May 31, 2017
@ugurdogrusoz
Copy link
Contributor

@ugurdogrusoz
Copy link
Contributor

In fact, if this is to be supported, we should also consider persisting hidden nodes/edges

@ugurdogrusoz ugurdogrusoz changed the title Saving collapsed nodes Saving collapsed/hidden map content Jul 10, 2017
@ugurdogrusoz
Copy link
Contributor

As discussed in our regular meeting, we should persist both collapsed and hidden content in our SBGNML files using extension support (at map level). If the hidden, collapsed status is difficult to restore, we should leave this for later releases. In any case, this should be done after submaps are implemented (we have a 3rd compound node type).

@ugurdogrusoz ugurdogrusoz added feature New feature or request and removed bug Something isn't working labels Jul 14, 2017
@royludo
Copy link
Contributor Author

royludo commented Jul 25, 2017

Now if an element is hidden it can be saved properly with a <hidden/> tag attached. Same for collapsed element. Children aren't changed, but the collapsed element itself gets a <collapsed/> tag.

Both those tags are part of a <newt> extension. So results can look like this in sbgnml:

<extension>
  <newt>
    <hidden/>
    <collapsed/>
  </newt>
</extension>

I didn't want to immediately change the behavior of Newt, because the loading part isn't implemented yet. But when everything works, we'll need to remove :visible from those lines https://github.com/iVis-at-Bilkent/sbgnviz.js/blob/unstable/src/utilities/json-to-sbgnml-converter.js#L73

These extension additions were quite simple so I didn't change libsbgn.js for this newt-specific thing.

@ugurdogrusoz ugurdogrusoz added this to the version 1.0 milestone Aug 16, 2017
@hasanbalci hasanbalci reopened this Aug 18, 2017
kinimesi added a commit to iVis-at-Bilkent/sbgnviz.js that referenced this issue Aug 21, 2017
kinimesi added a commit to iVis-at-Bilkent/sbgnviz.js that referenced this issue Aug 23, 2017
@kinimesi kinimesi assigned ugurdogrusoz and unassigned kinimesi Aug 23, 2017
@ugurdogrusoz
Copy link
Contributor

Excellent

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

No branches or pull requests

4 participants