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

Fix Jupyter plugin resize behavior #2352

Merged
merged 2 commits into from
Aug 31, 2023
Merged

Fix Jupyter plugin resize behavior #2352

merged 2 commits into from
Aug 31, 2023

Conversation

texodus
Copy link
Member

@texodus texodus commented Aug 30, 2023

Fixes perspective-python's Jupyter plugin resize behavior to be vertical-only in notebook/cell mode, and non-resizable in other modes. Previous versions of Perspective allowed this plugin to be resized in both dimension, but this resizability overrides responsiveness to the notebook (or browser) dimension changes, leading to awkward user interactions when one wants to change the width of the notebook after using Perspective.

This PR may break Voila, as per the note in the CSS I removed. Instead, I made this removed behavior "default" and made <perspective-viewer> within a Notebook the selector for height, which should work? But we have no tests nor convenient way to verify this. Additionally, I maintain the Voila fix was not correct - if we're going to distinguish behavior that is specific to Voila, it can't share classnames with Jupyter.

@texodus texodus added bug Concrete, reproducible bugs and removed cla-present labels Aug 30, 2023
@timkpaine
Copy link
Member

timkpaine commented Aug 30, 2023

Voila moved to JupyterLab proper as a front end instead of something hand rolled, so it will likely have better compatibility now (once we upgrade to JupyterLab 4) https://github.com/voila-dashboards/voila/releases/tag/v0.5.0

@@ -311,6 +311,7 @@ def run_check(self):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
Copy link
Member

Choose a reason for hiding this comment

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

Here are 2 others you might consider adding, though discoverability via this mechanism is not terribly popular https://github.com/timkpaine/ipydagred3/blob/0d8f858b84b7f65d9de5aa5ae59e54a502e3b5b2/pyproject.toml#L30

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Yep that's where I got mine from

@texodus texodus merged commit 01cbbb0 into master Aug 31, 2023
12 checks passed
@texodus texodus deleted the jlab-fixes branch August 31, 2023 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants