-
Notifications
You must be signed in to change notification settings - Fork 475
Improve ports #440
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
Improve ports #440
Conversation
b46911d
to
15c4eb0
Compare
Seems it won't be possible to add the make public/private inline action as there's no context key we can use it to enable/disabled accordingly |
because it should be part of item? |
7364fa1
to
a923830
Compare
yeah |
a923830
to
7364fa1
Compare
b0c789c
to
a5b0afb
Compare
7364fa1
to
a923830
Compare
a923830
to
e6eabe6
Compare
a5b0afb
to
dabcfa2
Compare
|
||
type PortCommand = typeof PortCommands[number]; | ||
|
||
export class GitpodPortViewProvider implements vscode.WebviewViewProvider { |
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.
Duplicate this for now as it's using configcat code on gitpod-web and migration is almost done, so not worth to move more code I think
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.
@mustard-mh Is it done can we just remove old code with this PR?
b938b64
to
50d58ee
Compare
8df8e79
to
2ac83b2
Compare
@jeanp413 Is it good? I tried from sources for VS Code Browser and view is empty. It is the same in VS Code Desktop. Let me know when it is good to try. |
|
||
type PortCommand = typeof PortCommands[number]; | ||
|
||
export class GitpodPortViewProvider implements vscode.WebviewViewProvider { |
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.
I wonder why we cannot move everything to shared, and then pass options for customizations?
There seem to be still quite duplication between remote and web?
2ac83b2
to
16f0b0a
Compare
@akosyakov yeah it works but I forgot to mention how to compile 🤦 , right now is kinda tricky run the |
Added scripts in gitpod-remote folder:
|
9a1caae
to
0d1da69
Compare
0e87114
to
a03de2c
Compare
const req = new PortsStatusRequest(); | ||
req.setObserve(true); | ||
const evts = context.supervisor.status.portsStatus(req, context.supervisor.metadata); | ||
stopUpdates = evts.cancel.bind(evts); |
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.
What we use stopUpdates
for? like cancelContext
in golang?
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.
I just copied this xD, but it will be used in the dispose method to cancel the portsStatus request
I will test it tomorrow |
0d1da69
to
4e75e18
Compare
6ccc915
to
cfa9f0e
Compare
Tested it follow the how to test section, desktop vscode works well
Also build a preview env to test browser vscode, code build process not broken and ports view works too. |
"panel": [ | ||
{ | ||
"id": "portsView", | ||
"title": "Exposed Ports", |
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.
non-block: Change it to Gitpod Ports
can make it more clear?
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.
No, it does not, ports are not belonging to Gitpod, they are the same ports but in different networks. We should point out to difference in networks. And exposed means exposed on Internet in our docs.
What about the status bar? Should we show ports there as in browser? What view we should open on click? Can we show a menu to select |
I'll merge this then and publish a new gitpod-remote version
Personally I don't like the ports in status bar as it can take a lot of space and also seems repetitive as we already have two ports view, but we could add it in another PR if needed |
cfa9f0e
to
a6b21bd
Compare
Related issues
Fix gitpod-io/gitpod#8377
Fix gitpod-io/gitpod#11616
How to test
yarn vscode:prepublish
in gitpod-remote folder) and launch "Launch gitpod-remote" debug config