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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Experimental] JupyterLab integration #755

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

[Experimental] JupyterLab integration #755

wants to merge 8 commits into from

Conversation

jcheng5
Copy link
Collaborator

@jcheng5 jcheng5 commented Oct 9, 2023

  • %%reactive cell magic does not reliably clear previous output or put new output in the right place
  • Create non-notebook equivalent of %%reactive
    • Display all top-level expressions (or at LEAST the last one). Also useful for express mode
    • Auto-detect if a matplotlib figure has changed and show it
    • Have displayhook render all objects like Jupyter does
    • ipywidgets? 馃槵
  • On cell clear/delete/etc., kill any observers that originated from that cell
  • Re-establish connections with existing kernels on page load (right now, connections are only opened from the kernel side, when the ipython extension loads)
  • Figure out what to do when opening an .ipynb with Shiny inputs/outputs. If it doesn't "just work" make sure we let the user know they need to re-run or whatever. (Like for example the %load_ext shiny.notebook won't call itself, right?)

  • Replace triple-click gesture with JupyterLab context menu
  • Separate into separate repo, maybe
  • Document everything
  • Internal documentation
  • Less hackery on Shiny internals (especially setting default contexts)
  • Try to add Lit dependency*
  • Try to add @jupyterlab/console dependency and get things working for console*
  • Figure out where to log errors, especially ones caught by the Effect in the %%reactive implementation
  • If session closes (on the server side), due to e.g. observer throwing unhandled exception, needs to have a visual indication for the user as well as some idea of how to proceed. OR, don't close the session on unhandled exception, but instead show the error in the owning block.

* Last time I tried to add a JS dependency, jlpm build stopped working and I had to delete the extension and start over

@jcheng5 jcheng5 changed the title JupyterLab integration [Experimental] JupyterLab integration Oct 9, 2023
Notable omissions:
- Race conditions on startup
- Reloading the shiny.notebook kernel extension, or starting a second
  notebook, does weird things to the browser state
- HTML dependencies are thrown away
@render.xxx decorators now self-register with the currently active
session's (or module's) output. You can still use an explicit
output decorator if you want to set other options, although at
this time doing so doesn't prevent the initial implicit output
registration from happening.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant