-
Notifications
You must be signed in to change notification settings - Fork 501
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
Create tree plugin #1374
Create tree plugin #1374
Conversation
@trungleduc you mentioned offline that interacting with the file browser items in this PR only requires 1 click, instead of the double click like in JupyterLab? There is an issue to add this behavior in JupyterLab so that it could be configured, which would be especially useful for Notebook 7: jupyterlab/jupyterlab#14071 Do you think this could be implemented upstream? This could go in JupyterLab 4.1 as a new feature. |
I was able to implement this feature since in the case of voila, I don't need other interactions like multiple selections or drag/drop. So I just need to overwrite the single click handler and disable all others. Upstreaming this is not a technical problem but I think we need more UX studies before adding the single click behavior to Lab. |
} | ||
|
||
handleEvent(event: Event): void { | ||
if (event.type === 'click') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can make this part configurable in JupyterLab:
Maybe it would be fine if it is behind a user setting (opt-in)? |
Indeed, I've just realized that we don't have any advanced interactions (drag/drop, ...) in the Notebook v6 browser. I'll open a PR after finishing this one. I'll keep the implementation here to release Voila ASAP and will reuse the upstream version once it's released. |
Yes, and in Notebook 7 we can use the checkboxes to select multiple items.
Makes sense, it might take a little while to get this released in JupyterLab. Thanks! |
Please update galata references |
Co-authored-by: Jeremy Tuloup <[email protected]>
Please update galata references |
@jtpio could you re-take a look at this PR? I will release RC after this PR and update the documentation after that. |
@@ -84,7 +84,8 @@ jobs: | |||
|
|||
- name: Create the conda environment | |||
shell: bash -l {0} | |||
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs=18 yarn ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" ipykernel | |||
# TODO unpin pyzmq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the issue with pyzmq
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 25.1.1
is not available as wheel yet on Mac OS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok, maybe mentioning this in the comment could be useful for later when we get back to it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant next to the TODO, or in a new issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Maybe a note in the changelog (as a highlight) would also be useful (but could also be done later). edit: opened #1377 |
Co-authored-by: Jeremy Tuloup <[email protected]>
voila/app.py
Outdated
@@ -671,6 +680,13 @@ def init_handlers(self) -> List: | |||
"no_cache_paths": ["/"], | |||
}, | |||
), | |||
( | |||
url_path_join( | |||
self.server_url, r"/voila/api/contents%s" % path_regex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious: could exposing this endpoint allow someone access the content of other files on disk when they are not supposed to? For example when starting voila with voila basics.ipynb
and trying to access another notebook via this endpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed this endpoint is leaking the file structure (not the content) of the current working directory in the case of starting Voila with one notebook, I'll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok thanks for confirming 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by 9c48666
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
And CI all green.
References
Closes #1372
Code changes
pyzmq
is pinned to 25.1.0 on the Mac OS pipeline because25.1.1
is not available as wheel yet on Mac OSUser-facing changes
--classic-tree
CLI option, theVoilaConfiguration.classic_tree
config or?classic-tree=True
in the query string.Backwards-incompatible changes