Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Web Version of Qt Console #170

Open
8 of 11 tasks
afshin opened this issue Apr 11, 2016 · 23 comments
Open
8 of 11 tasks

Web Version of Qt Console #170

afshin opened this issue Apr 11, 2016 · 23 comments

Comments

@afshin
Copy link
Member

afshin commented Apr 11, 2016

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.
  • Create a ConsoleModel that is similar to a NotebookModel but does not have a notion of arbitrary cell insertion.
  • The first child of the ConsoleWidget needs to be a RawCellWidget to hold a banner and the second needs to be a CodeCellWidget to hold the prompt.
  • 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.
  • After every prompt execution, a new CodeCell needs to be generated to become the new prompt.
  • The UI needs to be styled to look like the Qt Console application.
  • The history functionality of the Qt Console needs to be implemented (i.e. navigating through past commands via arrow keys).
  • The contextual tooltip feature of the Qt Console needs to be implemented.
  • The pager functionality of leaving the prompt and residing within a different interactive context (i.e., entering the interactive help) needs to be implemented.
  • The completion functionality (i.e., tab completion) of the Qt Console needs to be implemented. This should be done in a way that allows the notebook, or other widgets potentially, to use it as well.

cc @blink1073 @jasongrout

@ellisonbg
Copy link

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
#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
Copy link
Member

@blink1073
Copy link
Member

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
Copy link
Member

@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
Copy link
Member

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

@afshin
Copy link
Member Author

afshin commented Apr 22, 2016

@blink1073 you're a monster. Thank you!

@minrk
Copy link
Member

minrk commented Apr 25, 2016

@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
Copy link
Member Author

afshin commented Apr 25, 2016

@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
Copy link
Member

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
Copy link
Member

minrk commented Apr 26, 2016

@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
Copy link
Member Author

afshin commented Apr 26, 2016

@minrk Thanks for the clarification!

@jasongrout
Copy link
Member

Ah, thanks for the clarification, @minrk.

@afshin
Copy link
Member Author

afshin commented Apr 29, 2016

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

console

@afshin
Copy link
Member Author

afshin commented May 16, 2016

tooltip

@Carreau
Copy link
Member

Carreau commented May 24, 2016

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

@afshin
Copy link
Member Author

afshin commented May 26, 2016

@Carreau, thanks for the input. @blink1073 just created this issue for it: #221

@blink1073
Copy link
Member

The output input, as it were.

@afshin
Copy link
Member Author

afshin commented May 27, 2016

Current state of affairs:

completion

@jan-matthis
Copy link

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
Copy link
Member

blink1073 commented Jun 15, 2016

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
Copy link
Member Author

afshin commented Jun 15, 2016

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

@blink1073
Copy link
Member

Migrated to jupyterlab/jupyterlab#76

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants