Automatic resizing of the console prompt in Jupyterlab 4.4.0 and later

In Jupyterlab <4.4.0, the prompt area of IPython consoles had the nice behavior that these would automatically resize (up to a certain height) when the number of lines of code written to them exceeded their height.
Here’s what I’m talking about (if the previous sentence was incomprehensible, English is not my native language):

Gif of properly working version can’t be posted (one media per post for new users)
Please see below, I’ll put it in the first reply to this post.

As you can see, adding new lines to the prompt automatically resizes it.

Starting with Jupyterlab 4.4.0, this behavior appears to have been removed.
Here’s a demo with 4.4.2, (which can also be replicated it in 4.4.0)

Console prompt does not resize automatically in v4.4.2

After scouring the Github issues, changelog and Discourse posts, I’m still unsure whether this is the intended behavior in newer versions?
I also tried to find a configuration setting which deals with the prompt resizing, but to no avail.
I’d really like to restore the old behavior which I find much more practical to work with.

Should the default fixed size behavior be intended, could anyone enlighten me as to whether it’s possible to restore the automatic resizing behavior of v4.3.6 and before?

Thanks a lot!

Environment

Installed via miniconda following the guidelines:

# Configuration was cleaned before running each test
# Inspected `jupyter --paths` for existing user files: 
mv ~/.jupyter ~/.jupyter.bak
mv ~/.local/share/jupyter ~/.local/share/jupyter.bak

# Latest (v4.4.2)
conda create -n jlab-latest --override-channels --strict-channel-priority -c conda-forge -c nodefaults jupyterlab

# Last “good” version
conda create -n jlab-4.3.6 --override-channels --strict-channel-priority -c conda-forge -c nodefaults jupyterlab=4.3.6

Here’s the “automatic resizing” behavior I am referring to, run in Jupyterlab 4.3.6:

Console prompt resizes automatically in v4.3.6

Yes, that’s correct. The change was introduced by Allow changing the position of the code console prompt cell, add settings and toolbar items by jtpio · Pull Request #13837 · jupyterlab/jupyterlab · GitHub and I recall it being discussed as a trade-off for all the other enhancements included and that there was an intend to fix it later. I don’t see an issue tracking this, would you like to open one on GitHub?

3 Likes

Thank you for the explanations @krassowski. I think I’ll stick with the Jupyterlab rationale and move my prompt to the left/right.

I personally think that if this annoyed at least one person we should try to fix it. I opened Restore automatic resizing of the console prompt in Jupyterlab 4.4? · Issue #17597 · jupyterlab/jupyterlab · GitHub

4 Likes

This (really) annoyed a second person; I appreciate you opening this ticket and hopefully resolving this soon.

1 Like