-
Notifications
You must be signed in to change notification settings - Fork 18
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
Comments
Thanks for this report. Looks like it might be a performance issue of some kind. I'll dig in to this. |
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. |
Having recently developed course materials using jupyterlab-myst, I am experiencing this bug quite frequently. I hope this can be resolved! |
Same here; it's been one of the main UI annoyances that was reported by our students. |
I'm also trying to push MyST in notebooks but if the myst extension is the one upsetting notebook rendering I may have to remove it and downgrade all the MyST upgrades I added into notebooks till next presentation of course in October 2025. |
It's a real shame that this is causing regressions for people. There are definitely some bugs that we can fix here. The notebook code is quite hard to architect around, so it might take some time. But I am going to dedicate some cycles to this. |
@agoose77 thanks.. let me know if there's anything I can hlep look out for or test |
I would appreciate some testing with jupyterlab/jupyterlab#16950. I anticipate that this might not fully solve the problem, but believe it should alleviate it at least partially. |
I have tried jupyterlab/jupyterlab#16950, but I think the problem is still there. With the same notebook as the previously attached video, I got jumps at the same position with or without jupyterlab/jupyterlab#16950. I tried another notebook (Markdown version attached below), without jupyterlab/jupyterlab#16950, I got jumps both at the bottom and around the top of Notebook exampletitle: Test document
|
Thanks! One idea for a workaround is to not detach cells when the change in cell heights is caused not by user action (execution) but by cell re-rendering and changing its height - and only attach cells in that case (if there was a long cell and it is now very short user needs to see cells below). I also explored pinning the height of a cell as it enters the viewport for some time but it is hard to implement without side effects. |
Thanks for your investigations here @krassowski. In general, I want to do another pass at how we integrate the MyST renderer with the notebook/cell widget; right now, it feels very hard to cleanly connect the two due to the private implementation of parts of the widgets. We plan to get around to this very soon. |
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:
Create a new venv
Install jupyterlab and jupyterlab-myst
Launch JLab and create a notebook
Put something in and make it scrollable
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:
The text was updated successfully, but these errors were encountered: