-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Turn terminal links into anchors using xterm addon #13645
Turn terminal links into anchors using xterm addon #13645
Conversation
Thanks for making a pull request to jupyterlab! |
Thanks for submitting your first pull request! You are awesome! 🤗 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @mgcth
Would you mind adding a test for this feature?
You can add it in galata/test/jupyterlab/terminal.test.ts
by starting with a copy of that test:
test('Terminal should open in Launcher cwd', async ({ page, tmpPath }) => { |
@fcollonval, thanks for pointing me in the right direction. Would something like this be enough? A mouse hover shows it's a link. That's implemented in 91184ff (snapshot not yet uploaded). |
You 🚀 Thanks a lot for adding the test. The snapshots are very sensitive especially for terminals as their configuration highly depends on the OS. Therefore to get the correct reference snapshot for the CI OS setup, we use a bot that can be triggered by commenting on a PR: bot please update snapshots
|
You can see the status of the bot job there: https://github.com/jupyterlab/jupyterlab/actions/workflows/galata-update.yml |
Documentation snapshots updated. |
Galata snapshots updated. |
Looks like 38b142c didn't activate the underline. It does when I run the test locally with both |
bot please update snapshots |
Documentation snapshots updated. |
Galata snapshots updated. |
Is there a way to debug this other than trying it on a Linux machine? I tried creating a Ubuntu 20.04 developer environment through VirtualBox on my mac but during the jupyterlab install |
Well, maybe a screenshot test is not the way to go forward if it is problematic. We can try two things:
|
Trying the exact code If it doesn't work, I can try the suggestions but would need some help with where to put those tests. bot please update snapshots |
Documentation snapshots updated. |
Galata snapshots updated. |
I checked and neither of the suggestions I proposed works:
Since there is no good way to test this, I would propose:
|
@fcollonval, looking at the test report it seems like your trial succeeds (underline is visible). Thanks for the help! bot please update snapshots |
Documentation snapshots updated. |
Galata snapshots updated. |
Documentation snapshots updated. |
Galata snapshots updated. |
536b65a
to
fa2caf5
Compare
Add xterm-addon-web-links to terminal widget Add galata test for xterm-addon-web-links In terminal web link test click->hover Try with different position Try codegen snippet as is Trial: capture underline for link Update only the needed snapshot
fa2caf5
to
11e38c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mgcth
@meeseeksdev please backport to 3.6.x
|
#13751) Co-authored-by: Mladen Gibanica <11275336+mgcth@users.noreply.github.com>
* Rebases to include changes from #13645 * Reverts Xterm 5 changes from local master * Removes nested A tag * Fix code style Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
* Rebases to include changes from #13645 * Reverts Xterm 5 changes from local master * Stops showing toolbar on collapsed input cells
* Rebases to include changes from jupyterlab#13645 * Reverts Xterm 5 changes from local master * Removes nested A tag * Fix code style Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
* Rebases to include changes from jupyterlab#13645 * Reverts Xterm 5 changes from local master * Stops showing toolbar on collapsed input cells
References
Fixes #5489.
Code changes
Adding
xterm-addon-web-links
addon topackages.json
and towidget.ts
, and loading it below theFitAddon
.User-facing changes
Turn terminal hyperlinks into anchors users can click and be taken to that link in a new tab.
Backwards-incompatible changes
None, as far as I know.