-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make code contributions easier with Gitpod #2783
Conversation
|
This is neat! How do I get the browser window to come up on port 8080 once I close that popup? Some quick feedback so far: this is set up to work on the backend but not the frontend. It builds the frontend, and then serves it through the backend server. I think that is totally fine and probably where Gitpod would come in more valuable since it makes it easy for a Ruby developer to build an endpoint really quickly. However, if that's the case there's no need to mention port 3000 in the config; we're not using it. The best way to develop services is by running service tests. Could we set up a way to trigger a service test run? |
Many thanks!
Normally the popup should come back whenever you start something on port 8080, allowing you to either open the Preview pane or in a new Browser tab. Alternatively, the preview URL is simply your Gitpod workspace URL but with a
Thank you for explaining this. Out of curiosity, what would be a good setup for working on the frontend? And is there a setup that is great for both backend and frontend development?
Sure, good idea! I can add a command to the - command: npm test && node server 8080 0.0.0.0 (Note: This will run And is |
Ah, okay. How do I restart the server?
👍 It would be good to add someplace in the UI where that can be triggered!
I don't think that's really what we want. Starting the server makes sense by default. It would then be good if the developer could make some changes and then trigger the tests. The most common task would be changing the services and running a subset of the service tests, which looks like this: It looks like this: https://github.com/badges/shields/blob/master/doc/service-tests.md#3-running-the-tests Also running the unit tests could be helpful. Also the linter and the code formatter; |
In the Terminal, you can use
You're right! I don't think there is currently a view of "currently active ports and how to preview them". I'll open an issue for that in Theia IDE. Thank you for all these great ideas. I agree that we should find a good way to make it easy for developers to discover and run these commands in particular:
Regular Git commit & push hooks are supported (I've noticed |
👍
Yes! You can't run
Yea, agreed! It would be good to have a list of registered programs that can be triggered. If it came down to it, I think we could work around the unusual case of |
In general, I think Theia and Gitpod need a way to expose useful project-specific workflows, e.g. via something like "Tasks" (in the What I'd find really cool would be to have a EDIT: It's a bit late for me today, but I've made a note to file these issues and get the ball rolling tomorrow. 😄 |
Update: I've filed the following Gitpod issues:
This Theia issue was already open:
|
Nice! I added a comment on one of those. gitpod-io/gitpod#246 is about the CLI; is it a separate matter to surface it in the UI through a menu or a button? |
Thanks! And indeed, it's true that gitpod-io/gitpod#246 doesn't help listing all currently active ports. Except if we implement the Regarding showing running ports in the UI, isn't that already the case? E.g. if you start a web server on any port, Theia will open a pop-up to let you know, and offer to Expose the port, or to open it in a Preview pane or Browser tab. Are you suggesting an additional view somewhere in the UI that recaps all currently available previews? |
What happened to me is that the popup appeared first and I did not initially click on it. Then I closed the window and reopened it, and the popup did not re-appear (as I understand it, this was because the service had already been running). At that point I had no idea how to get it back. One idea would be to re-surface the open ports when the window is reopened; another is to add an option to the menus to open the preview or browser tab. |
It seems like this may be an ongoing process 😁 What do you think about reviewing and merging this, and continuing the discussion / work of refining this in an issue? Related: I've been thinking about hosting a distributed hack day / Open Source Friday-type event focused on bringing in new contributors to implement our backlog of badge requests: https://github.com/badges/shields/issues?q=is%3Aissue+is%3Aopen+label%3Aservice-badge As contributors come from many different programming communities, not necessarily Node / JS, easing the barrier to contribution could be a big help for helping them land changes like that. I think there is a bit of work to do to make a functional enough workflow for the kind of TDD we do, though if you're down to keep plugging away at this I think we could get there. I'd be down to partner with Gitpod on that event if that's something you might be interested in! |
Thanks a lot for your feedback. I also sometimes see "Open Port" notifications getting dismissed too soon.
Both are excellent ideas that we should probably implement. 👍 I've filed gitpod-io/gitpod#248 for that.
Haha, true, I guess the experience can always be incrementally improved!
Works for me! I'll rebase this pull request and I'm happy to address any review comments or suggestions.
Indeed, that's quite good material for a hackathon already. Is the process always similar to fix this type of issue? (If so, you could probably explain it at the beginning of the event, and then let everyone loose on the code.)
This sounds amazing! I agree that participants already have plenty enough on their plate learning how the project works, and finding their way around issues and code files, especially if they're not familiar with the language or framework in use. So any "boring" setup / installation / registration / OS-specific issues should definitely be alleviated as much as possible. I'm definitely down to keep plugging away at this because Shields is one of the coolest community projects I know (so I'm personally happy to help out!) and we also want to make Gitpod as friendly / intuitive / supportive as we can for people who are new to a project or to programming in general. Perhaps we could chat by email or video to work out the specifics of this partnership 😄 Many thanks for bringing up this really cool idea! |
Yea, we have a good tutorial about this process: https://github.com/badges/shields/blob/master/doc/TUTORIAL.md
Thanks for the kind words! and that sounds great! Shoot an email to the address on my profile and we can get something set up.
Merging in master is fine / preferred; we use a squash workflow. |
I left a few comments. It would also be good to open a new issue for Gitpod improvement, troubleshooting, and support during the "experimental" period, and linking to that from the contributing guidelines. |
Ah right, I hadn't recognized the EDIT: The "Lines of code (LOC) badge" one looks particularly exciting!
Email sent!
Thanks! And good idea, I'll do that. Would you prefer a new issue or should we continue in #2772? |
Ah, #2772 is good 👍 |
Oops, sorry, I seem to have missed this line... I've rebased the pull request to remove the Gitpod SVG logo; the port @paulmelnikow could you please have another look when you have time? |
Could you add the support link and reset the lockfile? |
Ah, right, I'll add a link to #2772. (Thanks for having already improved my Gitpod intro paragraph!) |
Thanks a lot for the fix-ups and the review! How do you reset the lockfile by keeping these |
The churn on When dependencies have changed we live with the churn; otherwise you can run |
Looking forward to chatting more about this soon! |
Many thanks @paulmelnikow! I'm also really looking forward to chat more about this, and to continuously make development easier for Shields. 😊 |
Hi @paulmelnikow, I've finally managed to make it work. 🎉 Thanks a lot for your help! 😄
As a reminder, Gitpod is a service that provides free readily configured workspaces in the cloud, complete with a lightweight IDE, a terminal, and a web preview.
What this pull request does is to pre-configure all Shields workspaces with ports
8080
and3000
exposed, and on start-up they will automatically runnpm install
,npm run build
and finally start the server withnode server 8080 0.0.0.0
.A few caveats:
ImageMagick
, but I can still add it just in caseIf you'd like to try out this Gitpod configuration, here is a snapshot:
And here is what it looks like:
Please have a look when you have time. 🙂