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

Scrolling over notebook got unexpected jump backs #243

Open
AllanChain opened this issue Jun 14, 2024 · 3 comments
Open

Scrolling over notebook got unexpected jump backs #243

AllanChain opened this issue Jun 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@AllanChain
Copy link

AllanChain commented Jun 14, 2024

Description

With jupyterlab-myst installed, scrolling over the notebook is not smooth. Specifically, when I try to scroll up, it can sometimes jump back, and I have to scroll multiple times to get to the place I want. Like the following screen recording:

Kooha-2024-06-14-21-56-28.mp4

Without jupyterlab-myst installed, I can scroll smoothly without issue.

Reproduction steps:

  1. Create a new venv

  2. Install jupyterlab and jupyterlab-myst

  3. Launch JLab and create a notebook

  4. Put something in and make it scrollable

  5. Scroll to the bottom and slowly scrolling up

Proposed solution

Sorry, I don't have any idea what's causing this issue.

Additional notes

Maybe it is related to jupyterlab/jupyterlab#15795, but I can't reproduce that issue without jupyterlab-myst installed.

Environment:

  • Browser: Firefox and Chromium
  • JupyterLab: 4.2.2
  • jupyterlab-myst: 2.4.2
@AllanChain AllanChain added the bug Something isn't working label Jun 14, 2024
@agoose77
Copy link
Collaborator

Thanks for this report. Looks like it might be a performance issue of some kind. I'll dig in to this.

@krassowski
Copy link

I can reproduce this. Related to jupyterlab/jupyterlab#16326

The problem is that myst changes height of the cell after it is attached; this pushes the viewport down, which in turns detaches the cell, preventing user from scrolling up. There may be a way to fix it upstream in JupyterLab.

In the meantime a simple solution would be to cache the rendered content so that it is shown immediately when cell gets attached. It seems that the markdown cells when rendered with myst start from a blank state and are populated afterwards.

To make it easier to reproduce I would suggest using a markdown cell with admonition and a mermaid diagram.

@earlbellinger
Copy link

Having recently developed course materials using jupyterlab-myst, I am experiencing this bug quite frequently. I hope this can be resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants