-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Implement viewport tracking and reactive rendering in scrollbar #16392
Implement viewport tracking and reactive rendering in scrollbar #16392
Conversation
Thanks for making a pull request to jupyterlab! |
@krassowski - This is really nice! As a parallel, I use the mini view in VSCode to traverse quickly to where my edits to the source file are, and I am not sure if this is a useful way to use the viewport in the notebook. If so, adding color to modified cells may be useful. It would definitely be nice to add this and get some feature parity with other IDEs. |
Thank you for the suggestion! I implemented it in #16432. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @krassowski, this looks great.
There is currently a gap between a selected item and the top separator, but not the bottom separator. And the viewport also seems to be a bit too low
Yes, I had the same thought and completely agree that this could be useful, but since this is an additional behaviour change (as of today the virtual scrollbar does not scroll when you move the viewport outside of it) I would defer it to a separate PR. I opened #16518 to track this. |
Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @krassowski, looks good to me.
References
Code changes
WindowedList.IRenderer.createScrollbarItem
can now return eitherHTMLElement
(as before) orIScrollbarItem
defined as:IScrollbarItem.render
is called to modify the node reactivelyUser-facing changes
Backwards-incompatible changes
None