Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Mimic classic notebook behavior for /tree/<path>#159

Merged
jtpio merged 1 commit into
jupyterlab:mainfrom
yuvipanda:tree-redirect
Jun 9, 2021
Merged

Mimic classic notebook behavior for /tree/<path>#159
jtpio merged 1 commit into
jupyterlab:mainfrom
yuvipanda:tree-redirect

Conversation

@yuvipanda

@yuvipanda yuvipanda commented Jun 8, 2021

Copy link
Copy Markdown
Contributor
  • Show directory listing if path is a directory
  • Show notebook if path is a notebook
  • Return file contents if path is any other file

Copied from https://github.com/jupyter/notebook/blob/6fe9755971dba3357054766806d56cb8c6c1bca7/notebook/tree/handlers.py#L39

Fixes #153

@github-actions

github-actions Bot commented Jun 8, 2021

Copy link
Copy Markdown
Contributor

Binder 👈 Launch RetroLab on Binder

- Show directory listing if path is a directory
- Show notebook if path is a notebook
- Return file contents if path is any other file

Copied from https://github.com/jupyter/notebook/blob/6fe9755971dba3357054766806d56cb8c6c1bca7/notebook/tree/handlers.py#L39

Fixes jupyterlab#153

@jtpio jtpio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jtpio

jtpio commented Jun 9, 2021

Copy link
Copy Markdown
Member

Show directory listing if path is a directory

For this to properly work we'll probably need #15.

@yuvipanda

Copy link
Copy Markdown
Contributor Author

@jtpio yep! It currently just shows base tree view.

@jtpio jtpio merged commit 752e21f into jupyterlab:main Jun 9, 2021
@welcome

welcome Bot commented Jun 9, 2021

Copy link
Copy Markdown

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

@jtpio

jtpio commented Jun 9, 2021

Copy link
Copy Markdown
Member

@meeseeksdev please backport to 0.2.x

meeseeksmachine pushed a commit to meeseeksmachine/retrolab that referenced this pull request Jun 9, 2021
jtpio added a commit that referenced this pull request Jun 9, 2021
…on-0.2.x

Backport PR #159 on branch 0.2.x (Mimic classic notebook behavior for /tree/<path>)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/tree/<path> should redirect to /notebooks/<path> if <path> is a notebook file

2 participants