Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Toggle button and sidebar visibility #289

Closed
jtpio opened this issue Dec 16, 2019 · 3 comments · Fixed by #505
Closed

Toggle button and sidebar visibility #289

jtpio opened this issue Dec 16, 2019 · 3 comments · Fixed by #505
Labels
Milestone

Comments

@jtpio
Copy link
Member

jtpio commented Dec 16, 2019

Originally posted in #239 (comment).

If we want to be able to manage the lifecycle of the debugger and the sidebar separately, we need to handle a few other cases:

  • Automatically create the sidebar when switching the button on
  • Closing the sidebar should switch the buttons off.

At first it sounds reasonable to always show the toggle buttons if the kernel supports debugging.

At the moment we can end up in situations like the following:

debugger-sidebar-lifecycle

@jtpio jtpio added enhancement New feature or request ui labels Dec 16, 2019
@jtpio jtpio added this to the 0.1.0 milestone Dec 16, 2019
@jtpio jtpio self-assigned this Dec 16, 2019
@jtpio jtpio mentioned this issue Dec 16, 2019
3 tasks
@jtpio jtpio modified the milestones: 0.1.0, 0.2.0 Dec 17, 2019
@jtpio jtpio removed their assignment Dec 17, 2019
@jtpio
Copy link
Member Author

jtpio commented Dec 18, 2019

An alternative could be to have something similar to the notebook tools panel in the left area:

notebook-tools-lifecycle

The debugger sidebar would be added automatically if the kernel supports debugging, and removed when switching to a kernel without support for debugging, or to a different widget (not backed by a kernel).

But even that can lead to some tricky edge cases. For example the notebook tools in JupyterLab is not removed from the left area when the notebook widget is disposed but doesn't have the focus:

notebook-tools-lifecycle2

@jtpio jtpio modified the milestones: 0.2.0, Future Mar 6, 2020
@jtpio jtpio modified the milestones: Future, 0.3.0 Jul 21, 2020
@jtpio
Copy link
Member Author

jtpio commented Jul 21, 2020

Now that the debugger extension uses the kernel spec to know whether a kernel supports debugging: #457

One way to implement such UX would be:

  • check all the available kernel specs
  • if at least one kernel supports debugging, show the sidebar
  • otherwise hide it

A couple more ideas were mentioned in jupyterlab/frontends-team-compass#75, so this is of course open for discussions.

@jtpio
Copy link
Member Author

jtpio commented Jul 22, 2020

Looks like hiding the whole sidebar when no kernel with support for debugging (i.e xeus-python not installed), sound like the way to go for now.

This will make the debugger frontend completely invisible to end-users that install JupyterLab from scratch without xeus-python.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant