-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add RISE-lab plugin for jupyterlab_rise #326
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I've left a comment about the plugin activation logic. Other than that it looks good to me.
plugins/rise-lab.js
Outdated
} | ||
|
||
isActive() { | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can break other plugins activation. Would there be a more robust way to detect it's called in a jupyterlab_rise context?
Alternatively, we could exclude the plugin here:
Line 350 in 6735cec
if (id === 'generic') continue; |
but I'd rather go with the former approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point. So this would break automatic plugin selection. I'll check if there is a way to tell whether we are in the correct context without waiting for the presentation to be loaded, but it will take a while until I'll get around to that. If I don't find anything, would it be permissible to do a waitForSelector
and only return after a not-too-long timeout?
Ok, I've added a very basic |
This adds a plugin for jupyterlab_rise. The current RISE plugin is not compatible with it. It is not very smart, instead of trying to access the underlying reveal.js, it steps through the slides and observes whether the slide anchor in the window URL was updated, otherwise it assumes we reached the end.
It requires jupyter to be invoked with
jupyter lab
(notjupyter notebook
), and then to be passed an URL of the form:http://server:port/rise/your_path/your_notebook.ipynb?token=your_token
Works for me, maybe it will be useful for others!
closes #325