Skip to content

Add a setting to disable the dock panel padding#18760

Merged
krassowski merged 3 commits into
jupyterlab:mainfrom
jtpio:labshell-padding
Apr 20, 2026
Merged

Add a setting to disable the dock panel padding#18760
krassowski merged 3 commits into
jupyterlab:mainfrom
jtpio:labshell-padding

Conversation

@jtpio

@jtpio jtpio commented Apr 14, 2026

Copy link
Copy Markdown
Member

References

Some users would prefer to have a more compact dock panel to save a few pixels here and there.

So this PR proposes to add a new setting to the JupyterLab shell to allow for such control on the dock panel.

Code changes

  • Add a new --jp-dock-panel-padding CSS variable so themes can control the value directly, without adding it explicitly to the base themes
  • Add a setting so the dock panel padding can be enabled or disabled by users

User-facing changes

The default stays the same as before.

jupyterlab-dockpanel-padding.mp4

Backwards-incompatible changes

None

AI usage

  • YES: Some or all of the content of this PR was generated by AI.
  • YES: The human author has carefully reviewed this PR and run this code (keep this PR "draft" until the answer is YES)
  • AI tools and models used: Opus 4.6 & GPT 5.4

@jupyterlab-probot

Copy link
Copy Markdown

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@jtpio jtpio added this to the 4.6.0 milestone Apr 14, 2026
@github-actions github-actions Bot added pkg:application tag:CSS For general CSS related issues and pecadilloes Design System CSS labels Apr 14, 2026
@jtpio jtpio added enhancement and removed pkg:application tag:CSS For general CSS related issues and pecadilloes Design System CSS labels Apr 14, 2026
@jtpio jtpio marked this pull request as ready for review April 14, 2026 13:49

@krassowski krassowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea. I would use this setting in a few places myself.

It could be more discoverable if it was added in Theme settings but I see how it belongs in Shell given that this element is only used by JupyterLab Shell.

I also wondered if we should call it --jp-private-dock-panel-padding to avoid confusing theme authors who may want to set it to to a different value say 3px, but I think if they set it on :root then it will still work as expected.

@github-actions github-actions Bot added pkg:application tag:CSS For general CSS related issues and pecadilloes Design System CSS labels Apr 20, 2026
@jtpio

jtpio commented Apr 20, 2026

Copy link
Copy Markdown
Member Author

Thanks for the review!

I also wondered if we should call it --jp-private-dock-panel-padding to avoid confusing theme authors who may want to set it to to a different value say 3px, but I think if they set it on :root then it will still work as expected.

That makes sense, just pushed a new commit to do that rename.

@krassowski krassowski merged commit 31e019f into jupyterlab:main Apr 20, 2026
101 checks passed
@jtpio jtpio deleted the labshell-padding branch April 20, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Design System CSS enhancement pkg:application tag:CSS For general CSS related issues and pecadilloes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants