Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Make snapshots work again #247

Merged
merged 1 commit into from Oct 27, 2014
Merged

Make snapshots work again #247

merged 1 commit into from Oct 27, 2014

Conversation

kcrisman
Copy link
Member

Clicking on a revision now actually takes
you to the correct revision. Also fixed
some presentation issues for clarity.

@kcrisman
Copy link
Member Author

This should take care of #236 - ready for review.

Clicking on a revision now actually takes
you to the correct revision.  Also fixed
some presentation issues for clarity.
@kcrisman
Copy link
Member Author

If someone reviews this over the weekend I promise to cut the new sagenb on Monday!
@ppurka @jasongrout @vbraun @dimpase @kini @novoselt @lots_of_people ...

@ppurka
Copy link
Member

ppurka commented Oct 26, 2014

Hm.. it does show the revisions, but all the revisions are the same worksheet. At least that's what I am getting.

@kcrisman
Copy link
Member Author

??? Did you apply the branch? The behavior you describe is the previous (wrong) behavior. Try making a new worksheet and saving a few different times. Or an old worksheet you have saved many different times.

@ppurka
Copy link
Member

ppurka commented Oct 26, 2014

I thought I had applied the patch. I must have made some mistake then.
Sorry, I will try it again tonight.

@kcrisman
Copy link
Member Author

You may need to remove a cache or something... thanks for creating that new label, by the way. You should tell that it applied if you see "List of Snapshots" instead of "Previous sessions" in the list of revisions.

If for some reason it still doesn't work, dump it and then try just the change of worksheet = ws to worksheet = W "by hand" and see what happens; that is the key one, the rest is just window dressing.

@ppurka
Copy link
Member

ppurka commented Oct 27, 2014

Ok. Your branch works. I am ok with merging this. But Shift+Enter is currently broken in the notebook. I didn't have enough time to bisect further, but I located it to the merge commit that merges vbraun/jmol.

@ppurka
Copy link
Member

ppurka commented Oct 27, 2014

About the problem.. problem was that I thought sagenb-0.10.8.3 was being used, when 0.10.8.2 was being used in my sage.

Further comment about the shift+enter problem: I remember testing jsmol before, and at least when I was testing it (when my comment was made in the jsmol ticket), shift enter was working fine. Maybe this helps to pinpoint which commit that happened after that comment of mine broke this functionality.

Actually it is even worse: the evaluate button/text is also gone! So there is no way to evaluate a cell right now, other than Action -> Evaluate all

@kcrisman
Copy link
Member Author

Actually it is even worse: the evaluate button/text is also gone! So there is no way to evaluate a cell right now, other than Action -> Evaluate all

Actually, I had VERY similar behavior. What it ended up being was a caching issue. Because when we switch branches (especially a lot) the browser ends up using the wrong jQuery (or something like that). I was able to fix it that way. See e.g. http://trac.sagemath.org/ticket/16004#comment:98 and the comments it refers to.

That said, I think we would DEFINITELY want to check whether a true upgrade of sagenb (as opposed to all this branch switching) would have this problem, and whether removing the cache worked for that.

@ppurka
Copy link
Member

ppurka commented Oct 27, 2014

Where is the cache stored?

@kcrisman
Copy link
Member Author

I don't know, it depends on the browser. In Safari it is in the main Safari menu, in FF I had to look quite a bit and it also deleted cookies, in Chrome I didn't have the problem so I never looked.

@ppurka
Copy link
Member

ppurka commented Oct 27, 2014

For me it was chrome that was broken. Now it works in private window.

I have a different problem now. Figures dont work: I get this on plot(x)

/home/punarbasu/tmp/sage/local/lib/python2.7/site-packages/IPython/core/\
formatters.py:239: FormatterWarning: Exception in text/plain formatter:
should never launch viewer in embedded mode
  FormatterWarning,
None

And 3D plots give none as output

@vbraun
Copy link
Member

vbraun commented Oct 27, 2014

Javascript is always delivered with long caching times so you don't have to push it to the browser with every page reload. Try closing your browser (all windows) if you change branches. Ideally there would be a different "development" mode that serves javascript as non-cacheable (slower but much nicer to test).

@kcrisman
Copy link
Member Author

Basu, the other thing is http://trac.sagemath.org/ticket/17170 which you can also test and/or review.

ppurka added a commit that referenced this pull request Oct 27, 2014
@ppurka ppurka merged commit d0866b2 into sagemath:master Oct 27, 2014
@kcrisman
Copy link
Member Author

Awesome! Thanks. This afternoon I'll try to figure out how to do this properly. I guess I'll have to git rebase master again :)

@ppurka
Copy link
Member

ppurka commented Oct 27, 2014

@kcrisman thanks for all your time and attention :)
@vbraun thanks. I haven't closed my browser in a week I think ;) It could explain all these weird things.

@kcrisman
Copy link
Member Author

This fixed #236

@kcrisman kcrisman deleted the fixrevisions branch November 7, 2014 02:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants