Skip to content

Conversation

@andyscho
Copy link
Contributor

Resolves #7445 by checking if notebooks/<path> paths are directories before attempting to load them as notebooks.

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch andyscho/notebook/notebooks-route-directory-redirect-to-tree

@andyscho andyscho force-pushed the notebooks-route-directory-redirect-to-tree branch from 22aa6d8 to 3820e3e Compare August 26, 2024 07:28
@jtpio
Copy link
Member

jtpio commented Sep 6, 2024

Nice, thanks @andyscho for looking into this!

@jtpio jtpio added this to the 7.3.0 milestone Sep 6, 2024
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!


NotebookHandler.redirect = redirect
await jp_fetch("notebooks", "jlab_test_notebooks")
assert redirected_url == "/a%40b/tree/jlab_test_notebooks"
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding this test!

In addition to this test, maybe it could be interesting to add a UI test to mimic real user interactions: https://github.com/jupyter/notebook/tree/main/ui-tests

But we can track that in a separate issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

notebooks/<path> directory urls show error instead of redirecting to tree/<path> urls

3 participants