-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
improvements to the notebook graph editor #8222
Comments
this is a very ugly first draft |
Attachment: 8222.patch.gz a quick test (gets reverted in following patch) |
Attachment: 8222-part2.patch.gz cleaned up code, added orientation slider and auto maximize checkbox |
Attachment: 8222-part3.patch.gz Attachment: 8222-part4.patch.gz Fixed crashes when calling graph_editor for graphs with multiple components or fewer than 4 vertices, increased graph editor size. |
This comment has been minimized.
This comment has been minimized.
Author: Kevin Clark |
comment:2
I added 8222.patch but then both 8222-part2.patch and 8222-part3.patch failed. Maybe I am doing something wrong?!? Kevin, can you make one big patch (here is how to do that http://stackoverflow.com/questions/1224379/exporting-mercurial-patch-against-an-old-revision). Rado |
comment:3
Alright got it to work. I am uploading a big patch that contains part1,2,3 for the sagenb spkg. Part4 still needs to be applied separately to the sage tree. Everything looks great, I will post a proper review tomorrow. |
contains part1,2,3 of kevin's patches |
comment:4
Attachment: 8222-big.patch.gz Great work! I loved the spring-electric layout with auto-max (that's how I imagined it all along). Everything worked as expect, so the patch is basically ready to go. However, since we are making basically an User Interface, I have some comments on the design decisions. I am mostly guided by the mantra that passing UI decisions to the user is not a solution. We should man up and fix the most useful behavior that 99% of users will use (and maybe add the sliders hidden behind a "tweak" button or skip them all together).
Rado |
comment:5
I have implemented my vision (all of the comments above) at http://www.math.uiuc.edu/~rkirov2/js-graph-editor/ and also at the repo http://bitbucket.org/radokirov/js-graph-editor . |
Attachment: 8222-sagenb.patch.gz contains kevin's code, my improvements and the new processing library. |
Attachment: 8222-sage.patch.gz contains kevin's patch, and my JSON-fication of the graph editor code |
comment:6
I tried applying 8222-sagenb.patch and 8222-sage.patch to 4.3.4. The "sage" patch applied fine, but I got several failures with the sagenb patch. Finding no hg repo for the notebook I initiated one where I thought it belonged, at
(I can't recall the version number on the notebook and am not on the right machine). Do I need to install the development version of the notebook? (I've done this before, the drill with python setup.py -develop......) Or do I need to apply more than just the two patches? Anyway, any guidance in testing this on a stock Sage install would be welcome. Thanks, |
due to complaint I made replacement for sagenb-big patch. Based on sagenb-0.7.5.3 |
comment:7
Attachment: 8222-sagenb-mega.patch.gz Hi Rob, You are the second person complaining for the sagenb patch so I probably made the wrong patch. So I erased my sagenb folder, pasted the new code and made a new patch. Try 8222-sagenb-mega.patch. It has everything to make the graph_editor look like the one on my website. Also has fix for the loop bug you found, which the old one didn't have. There is a hg repo for the notebook, you don't need to recreate anything. Just extract and go to /sagenb-0.7.5.3/src/sagenb . Now all your "hg patch" commands should work. Here is a summary of everything needed to make this run:
Rado |
comment:8
Hi Rado, Thanks - those instructions worked just fine for me and it is running nicely. Comments later after some testing. For anybody else - two minor items - I could only find 0.7.5.1 in the directory specified on the notebook project page (which is what I used), and step (4) doesn't have a dash before "develop". Rob |
comment:9
Hi Rado and Kevin, Been experimenting with this over the weekend - very, very nice. I think I've learned enough about the pieces to be able to review this now. Were you going to (1) disable red edges? (2) turn-off auto-maximize? One suggestion I have right now (without having done a 100% thorough review) is to perhaps check very early on to see if the input is even a graph? Right now totally wrong input results in a traceback on getting the position dictionary (which is not very informative to the newbie). Let me know the status of this (ie will you be making more changes?) and I'll see about doing a careful review. I've got some longer-term, broader comments that I'll post to sage-devel right now. Rob |
The line defining graph_to_json is duplicate in graph_editor.py, that's all. |
comment:10
Attachment: 8222-removed-duplicate-line.patch.gz Hi Rob, I was waiting to see what Kevin has to say (since I basically took his code and tweaked with my personal preferences, without consulting with him). However, I haven't heard back from him. You are right we should add some type checking. I wanted to remove auto-maximize, but since it has Kevin's original work, I wanted to hear back from him. Are you in favor of removing it? If nobody else, says something, I will just make final patch with:
on the sage side:
Then Rob can review it and have the new (in my opinion much superior version of graph editor) in Sage. |
comment:18
Replying to @williamstein:
hmm, weird, it is all working on my setup. I downloaded sagenb-0.8 from #8725, applied rob's all-in-one patch, ran setup.py develop and there was nothing broken. Can Tim send me some more info on how to reproduce that bug, so I can work on fixing it? |
comment:19
Actually, I got it working on my machine already without touching anything. William's still having trouble though. |
comment:20
Replying to @TimDumol:
Maybe it was a caching issue. Also i have only tested it on Firefox and Chrome, so maybe there is some browser specific issue? |
comment:21
Since this has been confirmed to work, can this be marked positive review now? |
comment:22
This was not merged, as far as I can tell. The Sage library patch definitely isn't in, and the end of the upstream sagenb graph_editor.html indicates it wasn't merged there either. |
Changed merged from sagenb-0.8 to none |
comment:23
Notice that the graph editor hasn't worked in a long time, but this pull request fixes it! |
Changed keywords from none to graph editor |
Upstream: Reported upstream. Developers acknowledge bug. |
comment:31
See this sagenb issue, in case anyone ever wants to port this to the latest. |
comment:32
Proposing to close all sagenb tickets as outdated, so that all remaining open tickets in the notebook component are about the Jupyter notebook. |
Changed reviewer from Rob Beezer to Rob Beezer, Dima Pasechnik |
Made the following improvements to the notebook graph editor:
Upstream: Reported upstream. Developers acknowledge bug.
CC: @williamstein @fchapoton
Component: notebook
Keywords: graph editor
Author: Kevin Clark, Radoslav Kirov
Reviewer: Rob Beezer, Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/8222
The text was updated successfully, but these errors were encountered: