jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
13.81k stars 3.12k forks source link

Debugger: Unable to Copy/Paste Paths #16235

Open mlucool opened 2 weeks ago

mlucool commented 2 weeks ago

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.

krassowski commented 2 weeks ago

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 commented 2 weeks ago

"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:

krassowski commented 2 weeks ago

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

mlucool commented 2 weeks ago

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?