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

Open from path - changes the current file browser directory #7260

Open
anoopkatti opened this issue Sep 25, 2019 · 2 comments
Open

Open from path - changes the current file browser directory #7260

anoopkatti opened this issue Sep 25, 2019 · 2 comments

Comments

@anoopkatti
Copy link

anoopkatti commented Sep 25, 2019

Description

When you open a file with 'File' -> 'Open from path', it changes the directory in the file browser to the directory of the file that is opened.

'Open from path' allows one to open any file on the file system. However,

  1. It doesn't necessarily mean that I want to switch my current file browser directory to this one.
  2. More importantly, if the target directory has 100s of 1000s of files and I wish to open only one of those file from its path, then changing the browser directory to this directory will just crash jupyter.

This behaviour did not exist in jupyterlab version 0.35.6. I am observing this behaviour in 1.1.4.

Reproduce

  1. Go to 'File'
  2. Click on 'Open from path'
  3. Enter the path to a file and press enter

Expected behavior

When I open a file from 'Open from path', I expect that the file opens and the file browser doesn't change the directory.

Context

  • Operating System and version:
  • Browser and version:
  • JupyterLab version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here.
@jasongrout
Copy link
Contributor

Thanks for bringing this up. It seems pretty natural as well to expect the filebrowser to open to the relevant directory so that the file is highlighted. If you type a directory in the dialog, that is even explicitly indicating the filebrowser should open the directory.

So how do we address both expectations? What is a natural way to discern the user expectation? A system-wide setting? A checkbox in the open dialog? It would be useful to have a user survey to understand what percentage have each expectation.

@jasongrout
Copy link
Contributor

Your second point is compelling. Of course, we really should fix jlab to handle 1000s of files if it isn't. Does it really crash?

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

No branches or pull requests

2 participants