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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open the help in a bottom panel #6692

Open
jtpio opened this issue Jan 13, 2023 · 5 comments
Open

Open the help in a bottom panel #6692

jtpio opened this issue Jan 13, 2023 · 5 comments

Comments

@jtpio
Copy link
Member

jtpio commented Jan 13, 2023

The classic notebook (v6) opens the help panel at the bottom of the page, for example when using the following code snippet:

import math
math.pi?

image

JupyterLab inlines the help in the output:

image

Jupyter Notebook 7 does the same as JupyterLab since it uses the same notebook component:

image

Opening this issue to track this feature parity difference. Not sure this needs to be addressed for Notebook 7 but at least it's tracked somewhere.

@jtpio jtpio added this to the 7.0 milestone Jan 13, 2023
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to issues that need triage label Jan 13, 2023
@jtpio jtpio added question and removed status:Needs Triage Applied to issues that need triage labels Jan 13, 2023
@jtpio
Copy link
Member Author

jtpio commented May 25, 2023

In the classic notebook this is also called the "pager":

image

@jtpio
Copy link
Member Author

jtpio commented May 30, 2023

For reference this is handled here in JupyterLab:

https://github.com/jtpio/jupyterlab/blob/eeaa6505f658f7eaaad18ea2d7f15c3c5da0b23a/packages/outputarea/src/widget.ts#L664-L688

The content of the message contains "source": "page" as part of the payload:

{
  "content": {
    "status": "ok",
    "execution_count": 3,
    "user_expressions": {},
    "payload": [
      {
        "source": "page",
        "data": {
          "text/plain": "\u001b[0;31mType:\u001b[0m        float\n\u001b[0;31mString form:\u001b[0m 3.141592653589793\n\u001b[0;31mDocstring:\u001b[0m   Convert a string or number to a floating point number, if possible."
        },
        "start": 0
      }
    ]
  },
  "channel": "shell"
}

@jtpio
Copy link
Member Author

jtpio commented May 31, 2023

The "Messaging in Jupyter" documentation also has some information about page: https://jupyter-client.readthedocs.io/en/stable/messaging.html#payloads-deprecated

Pager output is used for introspection, or other displayed information that’s not considered output. Pager payloads are generally displayed in a separate pane, that can be viewed alongside code, and are not included in notebook documents.

@jtpio
Copy link
Member Author

jtpio commented Jun 8, 2023

It's not clear whether this will be addressed in time for 7.0. Bumping to 7.1, but if someone would like to have a look at it feel free to comment here!

@janxkoci
Copy link

janxkoci commented May 14, 2024

I'm using Jupyter with R, and in R and the classic notebook interface I can get the help in the bottom pager with either e.g. ?sin (or equivalently help(sin)), or I can get help by putting cursor in a function name and pressing F1. Note that the F1 shortcut is understood by Jupyter even if on other pages the same shortcut opens the browser's manual (as is the case for e.g. GNOME Web/Epiphany).

The same shortcut has no such effect in both Jupyterlab and the Notebook v7 interfaces. Using the ?sin method puts help inline, as in the screenshots above. In Jupyterlab, there is also the "interactive help", which stays in place when scrolling, but changes during typing, so it's not a full replacement for the classic-style pager.

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

No branches or pull requests

2 participants