RISE icon indicating copy to clipboard operation
RISE copied to clipboard

Very early Jupyterlab extension prototype

Open damianavila opened this issue 6 years ago • 38 comments

Hey folks, particularly @parmentelat and @athornton who were interested in this issue, this is what I have today... in fact is something I did several months ago and I did not have time to continue working on it. But, it will give you ideas about how to port RISE to a jupyterlab extension.

I tested this with the latest jupyterlab and it seems to work OK.

Some things I would like to highlight:

  1. This implements a very basic slideshow with 4 cells... we should generalize the behavior to deal with any number of cells as RISE do, but I started this simple to have something working.
  2. You will see a lot of commented code, some of them it probably non-sense but maybe it could give you information about how the thing evolved.
  3. Currently, this is implemented as a button in the toolbar, such as RISE... but maybe an Open with... option (right click over the notebook file) and something at the menu level is better... in that way, we should only migrate the parts that convert from the notebook view into the slideshow view. The steps going from the slide to the notebook view, it does not make sense in an Open with... scenario, I think.
  4. I added here a helper npm package called reveal_rise which provides the reveal.css content with some modification to remove the RESET styles, otherwise, it resets the style of the whole application I have already pushed the helper into the npm site, but I wanted to give you some context about it.

Finally, if we can work together on this, I believe we can have a better prototype, much closer to RISE in a few weeks. Let's see how it goes!

Let me know if you have questions or any other things to discuss...

damianavila avatar May 07 '18 21:05 damianavila

Looking forward to get RISE in jupyterlab !

gsemet avatar May 16 '18 20:05 gsemet

@parmentelat @athornton, please let me know if you are playing with this... Next week, I will probably spend some time on the extension since I will be colocated with Jupyter/JupyterLab devs at the annual team meeting which I hope help leverage and accelerate the ongoing thing :wink:

damianavila avatar May 21 '18 17:05 damianavila

Hello Damian; nope, I have not had the time to look into this any deeper so far, sorry

parmentelat avatar May 22 '18 11:05 parmentelat

I am not going to get to it before next week; I've been pulled sideways to work on horizontal scalability of some of our components and haven't had time to do much upstream work.

athornton avatar May 22 '18 17:05 athornton

I don't know what's wrong with me today, but this again should not have been closed, re-opening

parmentelat avatar May 22 '18 17:05 parmentelat

Thank you for you effort guys! I am looking forwards to seeing this implemented. CheersThank you for you effort guys! I am looking forwards to seeing this implemented. Cheers

Bamieh avatar May 27 '18 09:05 Bamieh

Starting to poke at it a little today. I'm also on the hook to support a workshop we're hosting, so I don't know how much time I will really have today and tomorrow, but just wanted to say that I've at least got a story to work on it in my project cycle that starts tomorrow.

athornton avatar May 31 '18 16:05 athornton

@athornton @parmentelat I have made a commit cleaning all the historical comments and pushing a little markupSlides function taking care of the slide type of cells. So you have an idea about how that would work. Things are functional but in a very light version and prone to have errors... let's see how it continues :wink:

damianavila avatar Jun 01 '18 22:06 damianavila

Awesome! Thank you. I will try to play some this weekend before getting sucked into setting up for the LSST Europe conference next week.

athornton avatar Jun 02 '18 21:06 athornton

Hi,

first of all, congrats on this, I find the prospect of using Jupyter-lab for blended presentations with code and content exciting!

I was wondering if you have an idea, when do you expect to have a minimum stable version (or should I stick to jupyter for now)? I plan to use it in my course, i think it would it really help students understand things better.

Best,

egavves avatar Jun 03 '18 14:06 egavves

I was wondering if you have an idea, when do you expect to have a minimum stable version (or should I stick to jupyter for

I would expect to have some minimal stable version by August, meaning main functionality but without all the niceties of the current RISE implementation.

damianavila avatar Jun 05 '18 16:06 damianavila

Does this truly require jupyterlab < 0.17?

davclark avatar Aug 24 '18 14:08 davclark

Does this truly require jupyterlab < 0.17?

I have it working with jupyterlab 0.32.1 I need to catch up with the latest version yet.

damianavila avatar Aug 24 '18 15:08 damianavila

https://github.com/lsst-sqre/RISE has a version that builds against 0.34 but it is untested. Feel free to grab it though.

athornton avatar Aug 24 '18 15:08 athornton

@athornton: is your patch just a matter of doing this on an existing rise-5.4.2 ?

jupyter.exe  labextension install jupyterlab_rise

stonebig avatar Aug 26 '18 12:08 stonebig

Jupyterlab-1.0 is coming (apparently in october). Is there an alternative in Jupyterlab, if this is not available ?

stonebig avatar Sep 08 '18 06:09 stonebig

Strongly looking forward to the extension supporting jupyterlab XD

leeweizhe1993 avatar Oct 23 '18 02:10 leeweizhe1993

Strongly looking forward to the extension supporting jupyterlab XD

Strongly looking forward to having time to work on this :wink: Hopefully, I can devote some time in the next few weeks/months, but no promises (but I would try to do my best to push it forward).

damianavila avatar Dec 24 '18 00:12 damianavila

Hi!

I tried today (windows 10, jupyter-lab 0.35.3), followed the instructions for installing in a dev environment (conda). I had to change the dependencies settings in the json file to allow for jupyter-lab > 0.16.2 (see below).

  "dependencies": {
    "@jupyterlab/application": ">=0.16.2",
    "@jupyterlab/notebook": ">=0.16.2",
    "reveal.js": "^3.6.0",
    "reveal_rise": "^1.0.0"
  },

The install went smoothly (no error at least).

However the button for RISE lost its content and is almost invisible.

screenshot-2019-1-16 jupyterlab

Looking at the HTML code for the button, I got:

<button class="myButton jp-ToolbarButtonComponent" title="RISE me"></button>

It seems that the icon is missing.

However (bis), nothing happens when I click on the button

capture

Any idea what is happening?

juliensiebert avatar Jan 16 '19 17:01 juliensiebert

for the record, I've been playing a bit with the jlab extension
in particular I have ported it to jlab-1.0.0, which is about to be announced

at that stage, what we have is

  • a button added in the menubar - it ends up on the rightmost position, it's suboptimal but well
  • the ability to enter reveal mode
  • but styling is poor (reveal.css needs patching)
  • themes are not supported
  • no actions are exposed

so this is a very early thing that needs a lot more work.

I am unsure how to move forward on that matter though; the next step clearly is related to #486, so maybe we should discuss on that first.

parmentelat avatar Jul 02 '19 09:07 parmentelat

I realize I haven't been very clear; I have not committed anything yet on this path because I have started to split the repo into /classic/ and /rise-reveal/ as part of #486; I plan on reinjecting the jupyterlab code after that in /jlab/
I just wanted to avoid any duplicated work

parmentelat avatar Jul 02 '19 15:07 parmentelat

for the record, I've been playing a bit with the jlab extension in particular I have ported it to jlab-1.0.0, which is about to be announced

Great!

at that stage, what we have is

This is a description pretty close to the things I left on that PR. The logic was pretty primitive and just supporting a particular notebook, IIRC. Did you make some work to generalize that?

so this is a very early thing that needs a lot more work.

I totally agree :wink: It started as a simple experiment to see how difficult would be to port RISE to Lab.

I am unsure how to move forward on that matter though; the next step clearly is related to #486, so maybe we should discuss on that first.

I have already provided you with feedback on that issue. We agreed on several things.

damianavila avatar Jul 04 '19 19:07 damianavila

I just wanted to avoid any duplicated work

OK, makes sense!

damianavila avatar Jul 04 '19 19:07 damianavila

as mentioned in #270, I'd recommend to not merge this branch, as I have essentially kind-of rebased it - but for jlab-1.0, and within the new repo layout - on top of the split-rise-reveal branch

I think it makes sense to keep the PR open for the contents of this discussion though

parmentelat avatar Jul 05 '19 08:07 parmentelat

Just to mention that I had asked a couple questions on discourse on this topic, people interested in tackling this jupyterlab extension thing (please, in the jlab-redeuxbranch) are invited to check these 2 threads

  • https://discourse.jupyter.org/t/jlab-extension-newbie-naive-questions/1535/3
  • https://discourse.jupyter.org/t/loading-css-from-a-node-module-into-jlab-extension/1570/3

parmentelat avatar Jul 20 '19 16:07 parmentelat

I resurrected this PoC and now works on JupyterLab 2.0.1 (https://youtu.be/6zYzJ5Tspyg).

Will update this branch soon for those interested.

damianavila avatar Mar 14 '20 21:03 damianavila

OMG yes! This would be amazing.

jbusecke avatar Mar 17 '20 00:03 jbusecke

Almost the entire PyHEP conference was given as notebook talks; but mostly just scrolling JupyterLab pages. It would be fantastic if RISE would come back for JupyterLab!

henryiii avatar Jul 16 '20 21:07 henryiii

Hey @damianavila

many thanks for taking the time to clean all that up; I just gave that a try

running jupyter lab on our examples/ subdir, I could start the slideshow on README.ipynb
unfortunately that's about all I could do; subsequent attempts at running rise in the same lab session - including on the same notebook - seems to be failing; had to reload the jupyterlab app from the browser to be able to run rise again (edit: when clicking the rise icon a second time or on another notebook, I get a white page and that's it...) other example notebooks do not seem to work at all - even as a first attempt

so I understand this is a rough sketch; plus, this is my first time ever, so I may be misusing something; but could you please write in (even short) words what is expected to work or not at this point ?

thanks again !

parmentelat avatar Nov 01 '20 15:11 parmentelat

This is a rough sketch... working with some local notebook without any subslides... let me just push that notebook in the lab directory as well...

Currently exploring several ideas before going straight with the porting...

damianavila avatar Nov 01 '20 15:11 damianavila