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

[terminal] map localhost to external links #6663

Conversation

akosyakov
Copy link
Member

What it does

It allows to open localhost links from terminal as external.

Generally we should always use OpenerService to apply complete logic. Don't take shortcuts to concrete handlers or try to implement them using WindowService.

How to test

  • for regressions tests that it still works locally
  • if possible test in remote environments, but obviously with some changes to ExternalUriService.toRemoteHost
    • for Gitpod:
return `${localhost.port}-${window.location.hostname.substr(window.location.hostname.indexOf('-') + 1)}`;

Review checklist

Reminder for reviewers

@akosyakov akosyakov added the terminal issues related to the terminal label Nov 29, 2019
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

To open localhost links remotely.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@akosyakov akosyakov force-pushed the ak/terminal_open_localhost_link_remotely branch from 1c7b0c6 to 932a6e6 Compare November 29, 2019 19:01
@akosyakov
Copy link
Member Author

@vince-fugnitto should be fixed now, i've opened a PR from my fork, so there can be some travis issues, like github rate limit

@akosyakov akosyakov changed the title [terminal] map to localhost links to proper external links [terminal] map localhost to external links Nov 29, 2019
@vince-fugnitto
Copy link
Member

@vince-fugnitto should be fixed now, i've opened a PR from my fork, so there can be some travis issues, like github rate limit

It looks like the CI has passed :)
I am however not sure on how to test the functionality or expose the bug on master.

@akosyakov
Copy link
Member Author

@vince-fugnitto:

  • Start something on localhost
  • Print its address to the terminal with echo
  • When you click the page should open.
  • Before it will work only if Theia works locally on localhost as well, now given that a product implements ExternalUriService properly the page with the proper external URI should be opened.

Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

LGTM

@svenefftinge svenefftinge merged commit 7bc8379 into eclipse-theia:master Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal issues related to the terminal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants