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

[7.1.0a0+] Default file browser writes to a custom drive if installed #7210

Open
jtpio opened this issue Jan 9, 2024 · 4 comments
Open

[7.1.0a0+] Default file browser writes to a custom drive if installed #7210

jtpio opened this issue Jan 9, 2024 · 4 comments
Labels
Milestone

Comments

@jtpio
Copy link
Member

jtpio commented Jan 9, 2024

Testing with:

The default file browser on the tree page tries to create files and directories in the installed drive, instead of the default file browser:

notebook-drive-issue.webm

Looking more closely, the model seems to be pointing to the custom drive (GitHub:)

image

This is not an issue with 7.0.6, so this is likely related to a change in the JupyterLab 4.1 pre-releases, or in some PRs targeting Notebook 7.1.

Also this does not appear to be an issue in JupyterLab:

jupyterlab-create-new-folder-context-menu.webm
@jtpio jtpio added bug status:Needs Triage Applied to issues that need triage labels Jan 9, 2024
@jtpio jtpio added this to the 7.1 milestone Jan 9, 2024
@RRosio RRosio removed the status:Needs Triage Applied to issues that need triage label Jan 9, 2024
@jtpio
Copy link
Member Author

jtpio commented Jan 10, 2024

This could be related to an upstream change w.r.t focus handling, as first clicking on the file browser widget and then creating the new directory seems to be fine:

notebook-custom-drive-focus-issue.webm

@jtpio
Copy link
Member Author

jtpio commented Jan 11, 2024

In the related command for creating a new directory, the file browser tracker currentWidget seems to be set to the custom drive (in this case the GitHub: drive):

https://github.com/jupyterlab/jupyterlab/blob/07b93390cf74fbf14d3a1dac3f662fdb4664afed/packages/filebrowser-extension/src/index.ts#L1143-L1147

const widget = tracker.currentWidget;

if (widget) {
   return widget.createNewDirectory();
}

@jtpio
Copy link
Member Author

jtpio commented Jan 11, 2024

Looking more into it, and setting a handler for the tracker currentChanged signal:

const { tracker } = factory;
tracker.currentChanged.connect(() => {
  console.log('current changed');
});

The underlying file browser tracker only seems to update its currentWidget when actively clicking on the widget themselves (clicking on the tab is not enough):

notebook-filebrowser-tracker-focus.webm

@jtpio jtpio changed the title [7.1.0a1+] Default file browser writes to a custom drive if installed [7.1.0a0+] Default file browser writes to a custom drive if installed Jan 11, 2024
@jtpio
Copy link
Member Author

jtpio commented Feb 1, 2024

This was mitigated in #7224.

Moving to 7.1.x, in case this gets fixed upstream in JupyterLab: jupyterlab/jupyterlab#15629

@jtpio jtpio modified the milestones: 7.1, 7.1.x Feb 1, 2024
@jtpio jtpio modified the milestones: 7.1.x, 7.2.x May 1, 2024
@jtpio jtpio modified the milestones: 7.2.x, 7.4.0 Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants