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

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

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

yuvipanda
Copy link
Contributor

@yuvipanda yuvipanda commented Jun 8, 2021

  • 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
Copy link
Contributor

github-actions bot commented Jun 8, 2021

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
Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

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

Thanks!

@jtpio
Copy link
Member

jtpio commented Jun 9, 2021

Show directory listing if path is a directory

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

@yuvipanda
Copy link
Contributor Author

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

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

welcome bot commented Jun 9, 2021

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

@jtpio
Copy link
Member

jtpio commented Jun 9, 2021

@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