jupyter / jupyter-js-notebook

JupyterLab notebook
BSD 3-Clause "New" or "Revised" License
46 stars 18 forks source link

Web Version of Qt Console #170

Open afshin opened 8 years ago

afshin commented 8 years ago

In addition to the notebook interface, we need to implement a web-based version of the console interface. Here are some of the tasks that will get us there:

cc @blink1073 @jasongrout

ellisonbg commented 8 years ago

Yep, and a lot of this refactoring will also help us in hooking up kernels to standalone text editors.

On Mon, Apr 11, 2016 at 1:17 PM, A. Darian notifications@github.com wrote:

In addition to the notebook interface, we need to implement a web-based version of the console interface. Here are some of the tasks that will get us there:

  • Create a ConsolePanel as a container that holds a ConsoleWidget, similar to the way the notebook works.
  • The first child of the ConsoleWidget needs to be a CodeCell
  • The ConsoleWidget needs a set of keyboard bindings to emulate the Qt Console application.
  • The execution of the code cell needs to be separated from the notebook because it is common functionality.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/jupyter/jupyter-js-notebook/issues/170

Brian E. Granger Associate Professor of Physics and Data Science Cal Poly State University, San Luis Obispo @ellisonbg on Twitter and GitHub bgranger@calpoly.edu and ellisonbg@gmail.com

blink1073 commented 8 years ago

@afshin,

Up/down at the edge of a codemirror: https://github.com/jupyter/notebook/blob/master/notebook/static/notebook/js/cell.js#L234

blink1073 commented 8 years ago

It looks like the current notebook is still using the deprecated payload shell response for the pager:

https://github.com/jupyter/notebook/blob/master/notebook/static/notebook/js/codecell.js#L347

http://jupyter-client.readthedocs.org/en/latest/messaging.html#execution-results

cc @minrk

blink1073 commented 8 years ago

@afshin,

Completion: https://github.com/jupyter/notebook/blob/41d6da235cbf3bcf6d7f818e11a066e0fd12ff8b/notebook/static/notebook/js/completer.js#L173 Tooltip for inspection: https://github.com/jupyter/notebook/blob/41d6da235cbf3bcf6d7f818e11a066e0fd12ff8b/notebook/static/notebook/js/tooltip.js#L189

blink1073 commented 8 years ago

@minrk, ah, I see now "Payloads are considered deprecated, though their replacement is not yet implemented."

This statement is confusing, I would say it isn't deprecated until there is actually a preferred replacement.

blink1073 commented 8 years ago

@afshin, it looks like all of these will be relevant to you: http://jupyter-client.readthedocs.org/en/latest/messaging.html#payloads-deprecated

afshin commented 8 years ago

@blink1073 you're a monster. Thank you!

minrk commented 8 years ago

@blink1073 payloads are something that we don't like, and know that we will remove/replace when we get the chance. Since we know that, we want to avoid things like proposing new payloads, etc., but they still exist because we haven't come up with a replacement for the few things they are used for. If you have a better way to communicate "avoid using these if you can, but that's not always possible," A PR to the doc would be welcome.

afshin commented 8 years ago

@minrk in order to cover functionality that the Qt Console currently offers, e.g., using the interactive help system, we'll need to use payloads. Do you have any input on how we should approach this?

cc: @blink1073 @sccolbert

help

jasongrout commented 8 years ago

Does the qtconsole use payloads to implement the interactive help? It looks to me like help() just uses raw_input() to do help. You can see that if you do help() in the Jupyter notebook. It looks like you just have to implement the stdin connection: http://jupyter-client.readthedocs.org/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets

minrk commented 8 years ago

@jasongrout pager output is a payload. @afshin yes, I think the frontend should support payloads. Sorry for the confusion. The comment in the docs mainly pertains to kernels, where we would like to avoid doing new things with payloads until we can come up with their replacement, express a preference to do things without payloads where there's an option.

afshin commented 8 years ago

@minrk Thanks for the clarification!

jasongrout commented 8 years ago

Ah, thanks for the clarification, @minrk.

afshin commented 8 years ago

FYI, this is the current state of affairs (which now includes history):

console

afshin commented 8 years ago

tooltip

Carreau commented 8 years ago

Nitpick from screenshots, Out[ don't have space before the square bracket to align.

afshin commented 8 years ago

@Carreau, thanks for the input. @blink1073 just created this issue for it: https://github.com/jupyter/jupyter-js-notebook/issues/221

blink1073 commented 8 years ago

The output input, as it were.

afshin commented 8 years ago

Current state of affairs:

completion

jan-matthis commented 8 years ago

Not sure if this is the right place to throw this in: It would be very handy to have the web console closely integrated with the notebook, e.g. through magic commands. Something like %qtweb could spawn a console connected to the current kernel in a new tab or in an overlay. %qtdebug might spawn a web console with %debug executed inside, so that ipdb can be used with autocompletion and history.

blink1073 commented 8 years ago

Hi @jan-matthis, thank you, those are both excellent suggestions. We've moved development over to https://github.com/jupyter/jupyterlab. @afshin, do you want to migrate the top level comment over there and link to this issue?

afshin commented 8 years ago

@blink1073 @jan-matthis Sure, will do. Great suggestions.

blink1073 commented 8 years ago

Migrated to https://github.com/jupyter/jupyterlab/issues/76