Skip to content
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

Unable to hyperlink to current folder #6387

Closed
raymondw2 opened this issue Feb 4, 2022 · 3 comments · Fixed by #6885
Closed

Unable to hyperlink to current folder #6387

raymondw2 opened this issue Feb 4, 2022 · 3 comments · Fixed by #6885
Labels
bug tag:Release Blocker A must-have bug for the milestone to which it is tagged
Milestone

Comments

@raymondw2
Copy link

Description

In a markdown cell, whenever we attempt to hyperlink [current directory](./) to show the contents of the current directory like this:
Screen Shot 2022-02-01 at 4 50 15 PM copy

I get this error:
Screen Shot 2022-02-01 at 4 52 00 PM

Reproduce

  1. Go to a markdown cell
  2. Type in [current directory](./)
  3. Click on link

Expected behavior

The hyperlink should display:
Screen Shot 2022-02-01 at 4 50 15 PM copy
the contents of the current directory.

Context

  • Operating System and version:
  • Browser and version:
  • JupyterLab version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
@raymondw2 raymondw2 added the bug label Feb 4, 2022
@welcome
Copy link

welcome bot commented Feb 4, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jtpio jtpio transferred this issue from jupyterlab/retrolab Apr 27, 2022
@jtpio jtpio added this to the 7.0 milestone Apr 27, 2022
@jtpio
Copy link
Member

jtpio commented Feb 22, 2023

Checking the behavior with the latest Notebook 7 pre-release (currently 7.0.0a13).

Linking to the current directory does not show the error dialog anymore, but it also doesn't open the folder in a new browser tab:

hyperlink-current-dir.mp4

Linking to another directory tries to open the directory under /edit:

hyperlink-other-dir.mp4

@jtpio
Copy link
Member

jtpio commented May 25, 2023

Digging a bit into this, JupyterLab handles local links via the CommandLinker in this plugin:

https://github.com/jupyterlab/jupyterlab/blob/eeaa6505f658f7eaaad18ea2d7f15c3c5da0b23a/packages/rendermime-extension/src/index.ts#L66-L90

[](./) is treated as "path": "" which then does nothing because of this check: https://github.com/jupyterlab/jupyterlab/blob/eeaa6505f658f7eaaad18ea2d7f15c3c5da0b23a/packages/rendermime-extension/src/index.ts#L71

[](./folder) then tries to open folder via the document manager

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug tag:Release Blocker A must-have bug for the milestone to which it is tagged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants