Change prompt cell position for the NumPy REPL (do not merge)#872
Change prompt cell position for the NumPy REPL (do not merge)#872agriyakhetarpal wants to merge 1 commit intonumpy:mainfrom
Conversation
✅ Deploy Preview for numpy-org ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thanks @agriyakhetarpal! Wondering if the example code could even be directly part of the input cell directly, using the That way the dedicated code panel could even be removed. Not sure if this would be better for users wanting to try numpy, since copy pasting may be a good way to better understand what each line does. But sharing this just as another option to consider. |
|
I agree! The instructions in the dedicated code panel could also be moved above the REPL and below the "Use the interactive shell [...]" text, instead of being in that code snippet. |
For reference I opened jupyterlab/jupyterlab#17819 to look into improving this. Although this would not have any impact if the default position is set to |

Brief description of what is fixed or changed
This PR changes the prompt cell position for the NumPy REPL from the default (
bottom) toleft. This is, at the moment, not intended to be merged, as it is solely for trying out the new feature that was introduced the recent JupyterLite 0.6 release. Here is a visual diff:import numpy as npsnippetThis might currently remain blocked until jupyterlab/jupyterlab#17597 is resolved (I previously attempted to fix this in JupyterLite, but I was later prompted to the fact that the fix lies in JupyterLab instead). I would be on the fence here personally, as both of the layouts look fine to me. However, if the line length in a code snippet is long, say, >70 characters, some of them might get hidden until the layout is expanded manually.
A follow-up item could be to introduce a
width/ratioelement (for theleftor therightpositions) which could control the initial state of the prompt cell panel's and the output side panel's widths – it's currently split 50-50 between both but I could see a use case for a 40-60 or 30-70 split (or vice versa).cc: @jtpio
Closes gh-869