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
Collapse debugger panel when disabling debugger #13088
Conversation
Thanks for making a pull request to jupyterlab! |
Thanks for submitting your first pull request! You are awesome! 🤗 |
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 for opening this PR @yanmulin
Would you mind not closing the tab if multiple debug sessions are active (see screencast) or place this behind a setting?
I don't think we can figure out if there are other opened widgets with an active debug session. @afshin is that correct? |
Performance and UX wise:
So ideally I would see the behaviour as switching to most recently used non-debugger sidebar widget on that side first and only if debugger is the only tab collapsing the right sidebar. I'm not sure how feasible it is though. |
@fcollonval A quick solution is to add a global variable to track the number of active debugger sessions. It increments when a session is started and decrements when a session is stopped. But not sure if it is a good idea. |
@krassowski Couldn't trigger the layout shift on my side with a random big SVG found online. The cells just expand horizontally. Is that because the SVG not big enough? |
I agree this is not an elegant solution - let's add a settings for this new feature. Do you need pointer for that?
I think @krassowski was making a general comment that changing the width of a notebook will trigger style recalculation (and layout shift as the content distribution will change). This can freeze the UI if the notebook is large and/or contains highly complex views. |
@fcollonval added a setting option. |
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.
Sorry for the late feedback @yanmulin.
Would you mind accepting the suggestion to make the settings follow the format name?
@yanmulin here the layout shift has two meanings:
I mentioned both together, but you do not the (2) to have the (1). The performance consequences of layout shift in the sense of (1) are more severe when there are many nodes; SVG visualisations can have thousands or even millions of nodes, but this is not a precondition of layout shift occurring. Here is an example of (1) - in visible in the debugger and (2) - visible because the print output with expanded/collapsed side panel takes either one or two lines: Even if we remove the |
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Co-authored-by: Frédéric Collonval <fcollonval@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 @yanmulin
@meeseeksdev please backport to 3.5.x |
…13187) Co-authored-by: Lyuwen Yan <yans1996@outlook.com>
References
Addressing the issue: #13018
Code changes
listen to Debugger
terminated
event and collapse the debugger panel if it is visible.User-facing changes
Before
After
Backwards-incompatible changes
None