jupyterlab icon indicating copy to clipboard operation
jupyterlab copied to clipboard

Debugger: Unable to Copy/Paste Paths

Open mlucool opened this issue 1 year ago • 4 comments
trafficstars

Problem

It's hard to copy paths from the debugger.

Things tried:

  1. Selecting the text from here is not possible image

  2. Once you open a file, the right click->show in file browser does not work

Proposed Solution

Make option 1 above work. 2 may be possible in some cases but not all. In cases where it is, it would be nice if that worked too.

mlucool avatar Apr 24 '24 18:04 mlucool

Once you open a file, the right click->show in file browser does not work

Currently the debugger always opens read-only view of the file for files opened via source panel. The read-only view does not implement the "Show in File Browser" option as it is not connected to any file browser:

image

But if file is opened for edition, then it is there:

image

Maybe the solution (and a better UX) would be to open files that are in the jupyter root directory for edition in the first place?

krassowski avatar Apr 25 '24 11:04 krassowski

"Show in File Browser" is implemented in docmanager; for it to work on editors created by debugger using the readonly factory we would need to expand the API of docmanager to allow creation of widgets:

  • using the readonly factory
  • using context backed by static source rather than services-backed context This would introduce a lot of additional complexity to one of the core packages.

krassowski avatar Apr 25 '24 11:04 krassowski

Another option would be having a copy button next to the path.

krassowski avatar Apr 26 '24 10:04 krassowski

Maybe the solution (and a better UX) would be to open files that are in the jupyter root directory for edition in the first place?

My goal was not to edit the file but navigate to the file in terminal. In my case, the file was read only on the FS anyway.

Another option would be having a copy button next to the path.

The path has one button next to it and I think adding another button would make it feel too cramped. That being said, maybe if it only appear as an overlay on hover somewhere that could be a fair tradeoff?

mlucool avatar Apr 26 '24 11:04 mlucool