Code Monkey home page Code Monkey logo

jupyterlab-unfold's Introduction

jupyterlab-unfold

Extension status Github Actions Status Binder PyPI Conda (channel only)

An IDE-like file browser

jupyterlab-unfold

Requirements

  • JupyterLab >= 4.0.0,<5.0

Install

To install the extension, execute:

pip install jupyterlab-unfold

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab-unfold

Contributing

Development install

Note: You will need NodeJS to build the extension package.

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
# Change directory to the jupyterlab-unfold directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm run build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False

Development uninstall

pip uninstall jupyterlab-unfold

In development mode, you will also need to remove the symlink created by jupyter labextension develop command. To find its location, you can run jupyter labextension list to figure out where the labextensions folder is located. Then you can remove the symlink named jupyterlab-unfold within that folder.

Acknowledgement

This extension was inspired from https://github.com/youngthejames/jupyterlab_filetree, but the code reuses the core-JupyterLab filebrowser and replaces it by default.

jupyterlab-unfold's People

Contributors

agoose77 avatar fcollonval avatar jtpio avatar krassowski avatar martinrenou avatar michaelchia avatar skbitsp avatar telamonian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jupyterlab-unfold's Issues

integration with "favorites" extension - Display of selected favorite

Disclaimer : this topic is linked to an interaction issue between 2 jupyterlab extensions - therefore, I just consider it as an enhancement and not a bug

Problem : The selected favorite is not highlighted

When using favorites extension, the tree us corectly expended to the selected favorite, BUT, the selected favorite is not highlighted nor selected.

Solution

when selecting a favorite, scroll to the selected folder / file, select it & highlight it

Describe alternatives you've considered

  • a partial solution (scroll or selection or highlight) would also be interesting
  • this issue may be linked to favorite package. In this case, tell it and forward the issue (or let me know so I can forward it) to the favorite package.

Additional context

PS : favorites extension WoW with standard JL3 file browser is working correctly.

  • Jupyterlab version: 3.2.9
  • Python package version: 3.8.12
  • jupyterlab-unfold version: 0.2.2
  • Operating System and its version: Debian 11

"Auto-collapse" feature

Issue description (New feature)

When going deep in the arborescence, all folders fully expand and therefore turns the tree "unreadable" on the long run

Ideal solution

A toggle button a the right of "File Browser" to collapse the files and folders not belonging to the active path (collapse != hidden)
Untoggle the button will restore the natural visibility of expanded files & folders (WoW as per today)

Alternative

  • Untoggle "auto-collapse" just restores current WoW (without restoring folders expansion as before toggle it the first time)
  • toggle button to activate / unactivate extension could do the job either (but I'm not sure that it is possible without refreshing the page)

Additional context

  • Jupyterlab version: 3.2.9
  • Python package version: 3.8.12
  • jupyterlab-unfold version: 0.2.2
  • Operating System and its version: Debian 11

Incompatibility with jupyterlab-github extension

Description

Installing jupyterlab-unfold extension seems to break the jupyterlab-github extension: entering a GitHub username in the jupyterlab-github extension does not show a list of repositories as it should.

If the jupyterlab-unfold extension is uninstalled (and nothing else changed), the GitHub extension works again as intended. Therefore, I suspect that the issue is with the jupyterlab-unfold extension rather than with jupyterlab-github. However, please do let me know if I should also raise an issue in jupyterlab-github.

Reproduce

From a clean environment:

  1. Install JupyterLab and extensions:
pip install --user --upgrade jupyter jupyterlab jupyterlab-unfold jupyterlab-github
  1. Launch JupyterLab:
jupyter lab
  1. GitHub browsing does not work in the extension.
  2. Uninstall jupyterlab-unfold:
pip uninstall jupyterlab-unfold
  1. Now the GitHub browsing works again.

Context

  • Package versions:
jupyterlab v3.6.3
jupyterlab-unfold v0.2.2
jupyterlab-github v3.0.1
  • Tested on the following operating systems:
CentOS 7.9
AlmaLinux 8.7
macOS 13.2
  • Tested with the following browsers:
Firefox ESR v.102.8.0
Safari 16.3
  • The command line outputs are below, they seem to be almost identical aside from the timestamps. Outputs with --debug are too long to paste, but they seem to be also quite similar, at least in the parts related to jupyterlab-github.
Command Line Output with `jupyterlab-unfold` installed (GitHub browsing doesn't work):
[W 2023-04-06 10:29:58.335 ServerApp] jupyter_server_terminals | error adding extension (enabled: True): Jupyter Server Terminals requires Jupyter Server 2.0+
    Traceback (most recent call last):
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 320, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 166, in __init__
        super().__init__(*args, **kwargs)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/traitlets/traitlets.py", line 1361, in __init__
        value = self._traits[key]._cross_validate(self, getattr(self, key))
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/traitlets/traitlets.py", line 746, in _cross_validate
        value = obj._trait_validators[self.name](obj, proposal)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/traitlets/traitlets.py", line 1233, in __call__
        return self.func(*args, **kwargs)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 175, in _validate_name
        self._module, self._metadata = get_metadata(name)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/utils.py", line 60, in get_metadata
        module = importlib.import_module(package_name)
      File "/Users/dmitrykondratyev/miniforge3/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "", line 1030, in _gcd_import
      File "", line 1007, in _find_and_load
      File "", line 986, in _find_and_load_unlocked
      File "", line 680, in _load_unlocked
      File "", line 790, in exec_module
      File "", line 228, in _call_with_frames_removed
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server_terminals/__init__.py", line 9, in 
        raise RuntimeError("Jupyter Server Terminals requires Jupyter Server 2.0+")
    RuntimeError: Jupyter Server Terminals requires Jupyter Server 2.0+
[I 2023-04-06 10:29:58.373 ServerApp] jupyter_server_fileid | extension was successfully linked.
[I 2023-04-06 10:29:58.375 ServerApp] jupyter_server_ydoc | extension was successfully linked.
[I 2023-04-06 10:29:58.377 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-04-06 10:29:58.377 ServerApp] jupyterlab_github | extension was successfully linked.
[I 2023-04-06 10:29:58.378 ServerApp] nbclassic | extension was successfully linked.
[I 2023-04-06 10:29:58.378 ServerApp] nbdime | extension was successfully linked.
[I 2023-04-06 10:29:58.530 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-04-06 10:29:58.552 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-04-06 10:29:58.553 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager
[I 2023-04-06 10:29:58.553 FileIdExtension] ArbitraryFileIdManager : Configured root dir: /Users/dmitrykondratyev
[I 2023-04-06 10:29:58.553 FileIdExtension] ArbitraryFileIdManager : Configured database path: /Users/dmitrykondratyev/Library/Jupyter/file_id_manager.db
[I 2023-04-06 10:29:58.553 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file.
[I 2023-04-06 10:29:58.553 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE
[I 2023-04-06 10:29:58.553 ServerApp] jupyter_server_fileid | extension was successfully loaded.
[I 2023-04-06 10:29:58.554 ServerApp] jupyter_server_ydoc | extension was successfully loaded.
[I 2023-04-06 10:29:58.554 LabApp] JupyterLab extension loaded from /Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyterlab
[I 2023-04-06 10:29:58.554 LabApp] JupyterLab application directory is /Users/dmitrykondratyev/.local/share/jupyter/lab
[I 2023-04-06 10:29:58.555 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-04-06 10:29:58.556 ServerApp] jupyterlab_github | extension was successfully loaded.
[I 2023-04-06 10:29:58.558 ServerApp] nbclassic | extension was successfully loaded.
[W 2023-04-06 10:29:58.624 ServerApp] nbdime | extension failed loading with message: No module named 'jupyter_server_mathjax'
[E 2023-04-06 10:29:58.624 ServerApp] nbdime | stack trace
    Traceback (most recent call last):
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 355, in load_extension
        extension.load_all_points(self.serverapp)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 229, in load_all_points
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 229, in 
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 222, in load_point
        return point.load(serverapp)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 148, in load
        return loader(serverapp)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/nbdime/__init__.py", line 15, in load_jupyter_server_extension
        from .webapp.nb_server_extension import _load_jupyter_server_extension
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/nbdime/webapp/nb_server_extension.py", line 49, in 
        from .nbdimeserver import (
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/nbdime/webapp/nbdimeserver.py", line 16, in 
        from jupyter_server_mathjax.app import STATIC_ASSETS_PATH
    ModuleNotFoundError: No module named 'jupyter_server_mathjax'
[I 2023-04-06 10:29:58.626 ServerApp] Serving notebooks from local directory: /Users/dmitrykondratyev
[I 2023-04-06 10:29:58.626 ServerApp] Jupyter Server 1.23.6 is running at:
[I 2023-04-06 10:29:58.626 ServerApp] http://localhost:8888/lab?token=20e9b5146b351c10b8c9775e2963b513585265da4dbe3d21
[I 2023-04-06 10:29:58.626 ServerApp]  or http://127.0.0.1:8888/lab?token=20e9b5146b351c10b8c9775e2963b513585265da4dbe3d21
[I 2023-04-06 10:29:58.626 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-04-06 10:29:58.631 ServerApp]
To access the server, open this file in a browser:
    file:///Users/dmitrykondratyev/Library/Jupyter/runtime/jpserver-23601-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/lab?token=20e9b5146b351c10b8c9775e2963b513585265da4dbe3d21
 or http://127.0.0.1:8888/lab?token=20e9b5146b351c10b8c9775e2963b513585265da4dbe3d21

[W 2023-04-06 10:30:00.683 ServerApp] 404 GET /api/me?1680791400577 (::1) 8.95ms referer=http://localhost:8888/lab
[E 2023-04-06 10:30:00.749 ServerApp] Uncaught exception GET /lab/api/settings?1680791400582 (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/lab/api/settings?1680791400582', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
result = await result
tornado.iostream.StreamClosedError: Stream is closed
[W 2023-04-06 10:30:00.915 ServerApp] 404 GET /api/me?1680791400909 (::1) 2.15ms referer=http://localhost:8888/lab/workspaces/auto-m?reset
[W 2023-04-06 10:30:02.050 LabApp] Could not determine jupyterlab build status without nodejs
[E 2023-04-06 10:30:02.075 ServerApp] Uncaught exception GET /github?1680791402066 (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/github?1680791402066', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
result = await result
File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/tornado/gen.py", line 234, in wrapper
yielded = ctx_run(next, result)
File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyterlab_github/init.py", line 95, in get
headers={"Authorization": "token {}".format(token)}
UnboundLocalError: local variable 'token' referenced before assignment
[W 2023-04-06 10:30:02.076 ServerApp] Unhandled error
[E 2023-04-06 10:30:02.077 ServerApp] {
"Host": "localhost:8888",
"Accept": "/",
"Referer": "http://localhost:8888/lab/workspaces/auto-m?reset",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15"
}
[E 2023-04-06 10:30:02.077 ServerApp] 500 GET /github?1680791402066 (::1) 2.75ms referer=http://localhost:8888/lab/workspaces/auto-m?reset

Command Line Output with `jupyterlab-unfold` uninstalled (GitHub browsing works):
[W 2023-04-06 10:30:54.943 ServerApp] jupyter_server_terminals | error adding extension (enabled: True): Jupyter Server Terminals requires Jupyter Server 2.0+
    Traceback (most recent call last):
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 320, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 166, in __init__
        super().__init__(*args, **kwargs)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/traitlets/traitlets.py", line 1361, in __init__
        value = self._traits[key]._cross_validate(self, getattr(self, key))
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/traitlets/traitlets.py", line 746, in _cross_validate
        value = obj._trait_validators[self.name](obj, proposal)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/traitlets/traitlets.py", line 1233, in __call__
        return self.func(*args, **kwargs)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 175, in _validate_name
        self._module, self._metadata = get_metadata(name)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/utils.py", line 60, in get_metadata
        module = importlib.import_module(package_name)
      File "/Users/dmitrykondratyev/miniforge3/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "", line 1030, in _gcd_import
      File "", line 1007, in _find_and_load
      File "", line 986, in _find_and_load_unlocked
      File "", line 680, in _load_unlocked
      File "", line 790, in exec_module
      File "", line 228, in _call_with_frames_removed
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server_terminals/__init__.py", line 9, in 
        raise RuntimeError("Jupyter Server Terminals requires Jupyter Server 2.0+")
    RuntimeError: Jupyter Server Terminals requires Jupyter Server 2.0+
[I 2023-04-06 10:30:54.982 ServerApp] jupyter_server_fileid | extension was successfully linked.
[I 2023-04-06 10:30:54.984 ServerApp] jupyter_server_ydoc | extension was successfully linked.
[I 2023-04-06 10:30:54.986 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-04-06 10:30:54.986 ServerApp] jupyterlab_github | extension was successfully linked.
[I 2023-04-06 10:30:54.988 ServerApp] nbclassic | extension was successfully linked.
[I 2023-04-06 10:30:54.988 ServerApp] nbdime | extension was successfully linked.
[I 2023-04-06 10:30:55.142 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-04-06 10:30:55.160 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-04-06 10:30:55.160 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager
[I 2023-04-06 10:30:55.161 FileIdExtension] ArbitraryFileIdManager : Configured root dir: /Users/dmitrykondratyev
[I 2023-04-06 10:30:55.161 FileIdExtension] ArbitraryFileIdManager : Configured database path: /Users/dmitrykondratyev/Library/Jupyter/file_id_manager.db
[I 2023-04-06 10:30:55.161 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file.
[I 2023-04-06 10:30:55.161 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE
[I 2023-04-06 10:30:55.161 ServerApp] jupyter_server_fileid | extension was successfully loaded.
[I 2023-04-06 10:30:55.161 ServerApp] jupyter_server_ydoc | extension was successfully loaded.
[I 2023-04-06 10:30:55.162 LabApp] JupyterLab extension loaded from /Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyterlab
[I 2023-04-06 10:30:55.162 LabApp] JupyterLab application directory is /Users/dmitrykondratyev/.local/share/jupyter/lab
[I 2023-04-06 10:30:55.164 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-04-06 10:30:55.164 ServerApp] jupyterlab_github | extension was successfully loaded.
[I 2023-04-06 10:30:55.167 ServerApp] nbclassic | extension was successfully loaded.
[W 2023-04-06 10:30:55.232 ServerApp] nbdime | extension failed loading with message: No module named 'jupyter_server_mathjax'
[E 2023-04-06 10:30:55.232 ServerApp] nbdime | stack trace
    Traceback (most recent call last):
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 355, in load_extension
        extension.load_all_points(self.serverapp)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 229, in load_all_points
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 229, in 
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 222, in load_point
        return point.load(serverapp)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyter_server/extension/manager.py", line 148, in load
        return loader(serverapp)
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/nbdime/__init__.py", line 15, in load_jupyter_server_extension
        from .webapp.nb_server_extension import _load_jupyter_server_extension
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/nbdime/webapp/nb_server_extension.py", line 49, in 
        from .nbdimeserver import (
      File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/nbdime/webapp/nbdimeserver.py", line 16, in 
        from jupyter_server_mathjax.app import STATIC_ASSETS_PATH
    ModuleNotFoundError: No module named 'jupyter_server_mathjax'
[I 2023-04-06 10:30:55.234 ServerApp] Serving notebooks from local directory: /Users/dmitrykondratyev
[I 2023-04-06 10:30:55.234 ServerApp] Jupyter Server 1.23.6 is running at:
[I 2023-04-06 10:30:55.234 ServerApp] http://localhost:8888/lab?token=86737c66885cd2fff2860c892308fbcae714360fc0e331f0
[I 2023-04-06 10:30:55.234 ServerApp]  or http://127.0.0.1:8888/lab?token=86737c66885cd2fff2860c892308fbcae714360fc0e331f0
[I 2023-04-06 10:30:55.234 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-04-06 10:30:55.239 ServerApp]
To access the server, open this file in a browser:
    file:///Users/dmitrykondratyev/Library/Jupyter/runtime/jpserver-23726-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/lab?token=86737c66885cd2fff2860c892308fbcae714360fc0e331f0
 or http://127.0.0.1:8888/lab?token=86737c66885cd2fff2860c892308fbcae714360fc0e331f0

[W 2023-04-06 10:30:57.437 ServerApp] 404 GET /api/me?1680791457225 (::1) 26.02ms referer=http://localhost:8888/lab
[E 2023-04-06 10:30:57.493 ServerApp] Uncaught exception GET /lab/api/settings?1680791457230 (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/lab/api/settings?1680791457230', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
result = await result
tornado.iostream.StreamClosedError: Stream is closed
[W 2023-04-06 10:30:57.648 ServerApp] 404 GET /api/me?1680791457644 (::1) 1.55ms referer=http://localhost:8888/lab/workspaces/auto-U?reset
[W 2023-04-06 10:30:58.766 LabApp] Could not determine jupyterlab build status without nodejs
[E 2023-04-06 10:30:58.774 ServerApp] Uncaught exception GET /github?1680791458768 (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/github?1680791458768', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
result = await result
File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/tornado/gen.py", line 234, in wrapper
yielded = ctx_run(next, result)
File "/Users/dmitrykondratyev/.local/lib/python3.9/site-packages/jupyterlab_github/init.py", line 95, in get
headers={"Authorization": "token {}".format(token)}
UnboundLocalError: local variable 'token' referenced before assignment
[W 2023-04-06 10:30:58.776 ServerApp] Unhandled error
[E 2023-04-06 10:30:58.776 ServerApp] {
"Host": "localhost:8888",
"Accept": "/",
"Referer": "http://localhost:8888/lab/workspaces/auto-U?reset",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15"
}
[E 2023-04-06 10:30:58.776 ServerApp] 500 GET /github?1680791458768 (::1) 2.84ms referer=http://localhost:8888/lab/workspaces/auto-U?reset

Web Browser Output The console outputs look identical in both cases.

jupyterlab-unfold make the shareable link not work.

jupyterlab version: 3.1.0 release in conda-forge
python version: 3.9.6 in conda-forge
jupyterlab-unfold version: 0.1.2 from pypi
platform: windows 10 pro.

After installing the jupyterlab-unfold, open the shareable link in the browser will not direct you to the exact notebook/folder as before. Disable the jupyterlab-unfold will make this function work again.

Besides, I fix the jupyterlab root dir in the config.

'Last modified' column missing. Add?

Description
Currently, it is not possible to show the 'last modified' column when jupyterlab-unfold is activated

Go to settings > file browser > check 'last modified'.

Python package version:
Python 3.10.5
Extension version:
Name: jupyterlab-unfold
Version: 0.3.0
Operating System and its version: Linux debian 10
Browser and its version: Chrome Version 122.0.6261.112 (Official Build) (x86_64)

Arrow left to collapse, arrow right to expand

Is your feature request related to a problem? Please describe.

We can already expand (unfold) the navigation tree by pressing enter, but it is not obvious how to close (collapse, fold) it.

Describe the solution you'd like

I would like the tree to expand/collapse when pressing arrow right/left as in jupyterlab/jupyterlab#11615

Describe alternatives you've considered

Backspace could work for collapsing too, but arrows seem more natural in the tree context.

Additional context

  • Python package version: 0.1.6
  • Extension version: 0.1.6
  • Operating System and its version: Ubuntu

Fold/unfold also happens by right click

Right click to a folder name displays the context menu as expected, but it also triggers fold/unfold. Can you please limit folding/unfolding to left click only?

Incompatible with Jupyterlab 4.0.3

Running with 4.0.3 the file explorer interfaces is broken. No files shown, and no buttons work.

Switching to v3.60 of jupyterlab solved the issue.

Does not work with a custom drive

Description

jupyterlab-unfold does not work with a custom drive, which might be one reason for which it does not work with the jupyterlab-github extension.

Cannot change or drill into folders anymore?

The normal expected JupyterLab behavior of changing or drilling into a folder is gone.

Double-clicking expands folders, but there is no way to make a folder and set the current working folder anymore. We need this functionality back to drill into folder to set the current working folder.

Right click file/folder not possible since 0.3.1

Description

In jupyterlab-unfold version == 0.3.1, it is not possible to right click a single folder or file in an unfolded directory. This is the case for the latest Jupyterlab version, but also for older versions. Tested from (Jupyterlab version 4.1.5 and over). It seems the handle is not pointing towards the correct location of the file or dir, only to the WORKDIR of jupyterlab. See screenshots:

Screenshot 2024-05-28 at 17 18 29
Screenshot 2024-05-28 at 17 18 35

As this eliminates the whole purpose of this unfold extension, I hope you can resolve it with this information:

Reproduce

  1. Unfold a directory
  2. Right click on the child directory/file

Expected behavior

When a directory is unfolded, one should be able to right click the file. This worked perfectly in jupyterlab-unfold version == 0.3.0. See screenshot:
Screenshot 2024-05-28 at 17 23 52

Allow to set root directory

Is your feature request related to a problem? Please describe.

If I open a project / workspace, I'd like to work in the project root and not have the full path from my home-dir to the project folder open.

Describe the solution you'd like

Double-click should open the folder as new root, exactly like the normal jupyterlab file browser.
Single-click in the file tree should expand/collapse the folder.
Also, a context menu with change to folder should be added.

Example taken from dolphin file browser:
image

Describe alternatives you've considered

Additional context

  • Python package version:
    0.2.2 installed from conda-forge

  • Extension version:
    jupyterlab-unfold v0.2.2 enabled OK (python, jupyterlab-unfold)

  • Operating System and its version:
    RockyLinux 8

Improve integration with jupyter-git extension

jupyterlab 3.2.1
jupyterlab-git 0.33.0
jupyterlab-server 1.2.0
jupyterlab-unfold 0.1.6

It seems that this great extension is not fully compatible with another great extension jupyter-git.
jupyter-git requires the user to select an "active folder" in the FileBrowser that is a git repository. But jupyterlab-unfold doesn't allow to change the "active folder".
One solution is to start jupyter lab in a git repository but it prevent browsing files outside of that repository.
It would be great if the "active folder" could be changed by a double-click or a right click.

Not possible to upload files to folder

Description

When dragging a file to a folder with the jupyterlab-unfold extension, nothing happens.

  1. Pick a file
  2. Drag to jupyterlab browser

Expected behavior

File should be hooked to the folder where the file is dragged to, placed there.

  • Python package version:
  • Python 3.10.5
  • Extension version:
  • Name: jupyterlab-unfold
    Version: 0.3.0
  • Operating System and its version: Linux debian 10
  • Browser and its version: Chrome Version 122.0.6261.112 (Official Build) (x86_64)

Cannot rename folders

Description

It's impossible to rename folders
renaming-folders

Reproduce

  1. Open jupyterlab
  2. Try to rename an existing folder

Expected behavior

Folder is renamed

Context

  • Python package version: 0.1.6
  • Operating System and its version: Ubuntu 20.04
  • Browser and its version: Firefox 93.0
JupyterLab v3.2.2
/home/ian/mambaforge/envs/micro/share/jupyter/labextensions
        jupyterlab-unfold v0.1.6 enabled OK (python, jupyterlab-unfold)
        jupyterlab-vimrc v0.5.2 enabled OK
        jupyter-matplotlib v0.10.2 enabled OK
        @axlair/jupyterlab_vim v0.14.5 enabled OK (python, jupyterlab_vim)
        @lckr/jupyterlab_variableinspector v3.0.9 enabled OK (python, lckr_jupyterlab_variableinspector)
        @ryantam626/jupyterlab_code_formatter v1.4.10 enabled OK (python, jupyterlab-code-formatter)
        @telamonian/theme-darcula v3.1.1 enabled OK (python, theme-darcula)
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)
Command Line Output
[W 2021-11-15 17:25:24.621 ServerApp] Unknown error renaming file: Untitled Folder 1/Untitled Folder 1 [Errno 2] No such file or directory: '/home/ian/Documents/oss/tmp/Untitled Folder 1/Untitled Folder 1'
[E 2021-11-15 17:25:24.622 ServerApp] {
      "Host": "localhost:8886",
      "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0",
      "Accept": "*/*",
      "Accept-Language": "en-US,en;q=0.5",
      "Accept-Encoding": "gzip, deflate",
      "Referer": "http://localhost:8886/lab",
      "Content-Type": "text/plain;charset=UTF-8",
      "Authorization": "token 9e97d4e5422c8349cf05ed8fe7a6ecb5b1a7d3ef7f47501b",
      "X-Xsrftoken": "2|b3949570|68c9b6dc756c0f9684d21fa04e416a13|1635354133",
      "Origin": "http://localhost:8886",
      "Content-Length": "32",
      "Dnt": "1",
      "Connection": "keep-alive",
      "Cookie": "username-localhost-8890=\"2|1:0|10:1636399185|23:username-localhost-8890|44:NWJiMDk5YmJkMWExNDRhZWI4N2VhM2Y4Yjk3YmM1NjM=|cfe836e4c45c8c1fafecffcd0344081ba3de01322ec9b1c4be67b8469ebb490b\"; username-localhost-8888=\"2|1:0|10:1635825409|23:username-localhost-8888|44:YzhhM2Y1ZDMzNmQ5NDRjYmE0YjI2ZDgzNDMzNzYwNTg=|5658e9a9dd0c7a4dd24329d8fa393a31e8e9c328561c44a4bbed21754bbb2849\"; username-localhost-8889=\"2|1:0|10:1635807344|23:username-localhost-8889|44:M2Q2ZmMxZDBhMjNhNDc3ZjhhNTU5YTVkYWMxNmZlNzQ=|7ddf16768ce0925a3092d2be76a1dedaba5bd80a539d4da883d6e57bc0e8e717\"; _xsrf=2|b3949570|68c9b6dc756c0f9684d21fa04e416a13|1635354133; username-localhost-8891=\"2|1:0|10:1636493273|23:username-localhost-8891|44:YTg0NzJmNTdiY2VmNGE0MzhlYmQxZGI5ZmIyMDVhYzg=|e5de07f6344b77b8837f1a737a77c31b1b7b35a4d5eb9a276192c3ba388b4a45\"; username-localhost-8892=\"2|1:0|10:1636471953|23:username-localhost-8892|44:ZTg1NDZmODc2ZTZhNDE4YWJkOTdlYWZiMmQ2YTU5N2Y=|0ee0e755e3c73b920246841b7ee8b5f49774449cc980bfd7660008a4dcf0427a\"; username-localhost-8905=\"2|1:0|10:1636122516|23:username-localhost-8905|44:MTBlMGNjNWM3ZjI5NGQ1Njk2ZGY1YmEyODdhMDAxNmE=|040b76ba04bd931e3fc0bd843389765e7189d9c21417f88960945b6baa82f6bd\"; username-localhost-8916=\"2|1:0|10:1636123028|23:username-localhost-8916|44:YWRjNzUxZGRmNGI0NDIyOTgxNDhmYzEyMGU4MTNhNjY=|ace4edb7c59a01a279074231c6d06bd59d4626f0c219013167d7164441e2e8b7\"; username-localhost-8829=\"2|1:0|10:1636165271|23:username-localhost-8829|44:Y2I2YzUxZTE0OWY5NDU5ZWI1NjZmYTViOTAwM2MzYjU=|4df4f95f13c5a52b06cb49106805c7f4090e93a0856ecf6c1bff090d87b7b9d3\"; username-localhost-8885=\"2|1:0|10:1636163324|23:username-localhost-8885|44:ZGZhNWYyMWJiNjZhNDQ0ZGI0YTBlMjE5YmYwMmQ3YTA=|0d203b22db339956a200224ffc0dbedf6e49fd992793f872c529c54dd6e4de71\"; username-localhost-8914=\"2|1:0|10:1636164291|23:username-localhost-8914|44:MWNmNTg1MWNmMTNiNGY4ZWE3NDVmZTljNGFhYWNmZTA=|a45c078c525354f5dab9b3c08796156c01203cb381d6382d3bdf580daa928c31\"; username-localhost-8879=\"2|1:0|10:1636165308|23:username-localhost-8879|44:OWI1MDA0NWQ1Y2U1NDJmYTljYWUwNmZjNzBlYjU3MTY=|b0536fa602502a8136d7741c641b08a5be76e54536062e155af267b79b324d79\"; username-localhost-8932=\"2|1:0|10:1636228893|23:username-localhost-8932|44:YTM4NDQ5Yjg2NWNmNDViODk1Yzk0MDIxNjBhOWU2Yjg=|d62382ee2c63a7c6b05d119d6fda1a3c4e30f0e66be81424de1857ce57db2289\"; username-localhost-8826=\"2|1:0|10:1636322352|23:username-localhost-8826|44:ZGEyM2U2NTdmMzQ1NGQ1N2IxMmQ2ZDllZmRkZDE0ZTU=|74734fe4fb8f0df64759fa2f3a543802f91f2b7041057ec3360c6a903070309c\"; username-localhost-8987=\"2|1:0|10:1636322413|23:username-localhost-8987|44:ZmUwZmVjMDJiMDBlNDRhZTkxZjlkYmExNDExMTRiNzQ=|f1c456619319a108c9383368c2095c9559e21ea789c75250c29d962c75647f73\"; username-localhost-8845=\"2|1:0|10:1636322329|23:username-localhost-8845|44:MjAxMmU1OTU4NTUxNDcyMGIzOTAzNDQxYWZlYWZkOWY=|f298d6441fa44cf822607bbef4e218ffc8bcc5e72f35eee64be5dd2232381eae\"; username-localhost-8949=\"2|1:0|10:1636999176|23:username-localhost-8949|44:ZDBhNGQ1MjM4MzU4NDI4Mzk5YmQ2OWYxNzVkYWJkZmE=|a9d5bce820a8ee35818ac7f679175c20a3504c0dec3e03752729a0a1ef35556e\"; username-localhost-8809=\"2|1:0|10:1637015010|23:username-localhost-8809|44:YWE4MWM4NTYwYjRhNDZjMWEzY2E5MzY1N2RiYjQ4MGM=|a8d7764d5a0b4b572e0c1e622815d4a837dd99cf55f069c0ed448a8334ac1c04\"; username-localhost-8902=\"2|1:0|10:1636493277|23:username-localhost-8902|44:ZTgwYmM2NGEwZTczNDU1ZDgxOTZiYjFiMDJhOTRhNmM=|944a1703667c9bfbdb757538b28f54a2135175e3728102e3b6cf7f44bb4eb6ad\"; username-localhost-8925=\"2|1:0|10:1636482875|23:username-localhost-8925|44:MmFlOWU3MWYyNGM0NDZjOWIyYTYyZGYzYjE3Y2M4ODE=|80915eb66620cd4102010c185804886f6a6a0d1fbdceb6e01c3900e56a23b646\"; username-localhost-8811=\"2|1:0|10:1636575969|23:username-localhost-8811|44:ZDRjM2UyNTcwMWFkNDg0NmJkOTAyZjEwMjU0NTg2YTQ=|8c9c2af938b508b68f82ee80bbe5532839f4478b643e9985748e1bdd9e34a024\"; username-localhost-8927=\"2|1:0|10:1637008230|23:username-localhost-8927|44:OTQ4YzEzYTAxNDAyNGIyNWE2ZGUzNDNjNzBmMjU5NjY=|9d3c87242bb0d8ce620d634f703c624c8cc64a3e4623671bffdaadd6cbd30145\"; username-localhost-8820=\"2|1:0|10:1636743478|23:username-localhost-8820|44:ZDk1NTc3M2RiODllNDE2MWIwOWY4ZjgwNjMxYTJlNDc=|8c0628e4440f091426456e01f8200870a1df01f7b0247225ac1e5e20388d9208\"; username-localhost-8874=\"2|1:0|10:1636750679|23:username-localhost-8874|44:OWE5OGJiMzkyNzE1NGI1MWFhY2EwOWZjZTk5ZDVmYTE=|036a366eb619afcc1ab6c378dad8ddd2ecce504c0175b424a4ff89d9b60c297c\"; username-localhost-8952=\"2|1:0|10:1636750786|23:username-localhost-8952|44:NDYyMjYxZmFjODk2NDBlYmI4Yzk5MTJhYWI3MDFjMmY=|25a54fe7f9ad5439fb1146c30a4113f957b16acda513afca2705c280858e4737\"; username-localhost-8794=\"2|1:0|10:1637008504|23:username-localhost-8794|44:NDQyN2UzODg2NjRiNGVmYzk3OGEzN2YzZWNkNDk5MjA=|1e3a615422776cf301075d47d1f1d424b8274c5ee98c6f9051389fd1a24d29de\"; username-localhost-8945=\"2|1:0|10:1636999246|23:username-localhost-8945|44:NGM0ZTA1ZGVhZjg3NGNjYzg4ZjJkYTY0YWRlNDJjZjg=|af054b17bd05920d2144244e907d026fc7c4885de11c639a3f529708fa9f40ba\"; username-localhost-8886=\"2|1:0|10:1637015123|23:username-localhost-8886|44:ZTgwYjI2NWE2MjZhNGY1YWExNWY1YTU0NDkzNzBkYzY=|1c0be175fcdadc0d783af021aa2cebc9afb2de01b9238d5a018cff92a1e3709a\"",
      "Sec-Fetch-Dest": "empty",
      "Sec-Fetch-Mode": "cors",
      "Sec-Fetch-Site": "same-origin",
      "Sec-Gpc": "1",
      "Pragma": "no-cache",
      "Cache-Control": "no-cache"
    }
[E 2021-11-15 17:25:24.622 ServerApp] 500 PATCH /api/contents/Untitled%20Folder%201/Untitled%20Folder%201?1637015124616 (127.0.0.1) 1.46ms referer=http://localhost:8886/lab

Right-click expands folder in addition to showing context menu

Description

Right-click expands folder in addition to showing context menu

Reproduce

  1. Right click on a folder in the unfold panel
  2. See it gets expanded and menu shows up

right-click

Expected behavior

Only menu shows up

Context

  • Python package version: 0.1.6
  • Browser and its version: Chrome

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.