Skip to content
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

Debugger: Unable to Copy/Paste Paths #16235

Closed
mlucool opened this issue Apr 24, 2024 · 4 comments · Fixed by #16246
Closed

Debugger: Unable to Copy/Paste Paths #16235

mlucool opened this issue Apr 24, 2024 · 4 comments · Fixed by #16246

Comments

@mlucool
Copy link
Contributor

mlucool commented Apr 24, 2024

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
Copy link
Member

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
Copy link
Member

"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
Copy link
Member

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

@mlucool
Copy link
Contributor Author

mlucool commented Apr 26, 2024

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?

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

Successfully merging a pull request may close this issue.

3 participants