TheEvergreenStateCollege / upper-division-cs-23-24

A Course in Data Structures & Algorithms, Purposeful Web Engineering, Software Construction
https://theevergreenstatecollege.github.io/upper-division-cs/
MIT License
9 stars 4 forks source link

Improve GitPod / VSCode workspace opening #229

Open learner-long-life opened 1 year ago

learner-long-life commented 1 year ago

Summary

Open a GitPod workspace chroot'd to a specific project directory for a focused developer experience.

Background

Currently, when we open a new workspace in Gitpod, it opens in the root of our upper-division-cs monorepo. While it is convenient and prevents creating many different repos for each project, it exposes the developer to many different folders during a development session, often preventing effective focusing on the task at hand.

image

Possible Solution

If we choose "File -> Open Folder" and navigate to a specific Maven project, we can open a fresh workspace rooted at that directory, with no distracting views of files in other projects or directories.

image

The URL generated appears to start with the same hostname as the monorepo GitPod workspace, but with a URL argument ?folder= which we can set to be the absolute path to the VSCode workspace directory.

https://theevergree-upperdivisi-xflcmcxsma0.ws-us105.gitpod.io/?folder=/workspace/upper-division-cs/dsa-23au/java-dsa/sorting

learner-long-life commented 1 year ago

Some remaining tweaks:

@WinstonShine I could use some advice or thoughts about the above ^

crowllx commented 1 year ago

Some remaining tweaks:

  • Simplify the bash shell prompt to not include the full absolute path each time.
  • Add some terminal colors or themes, perhaps with a plugin manager
  • How to automate installing of VSCode plugins each time. Are these stored in a dotfile directory?

@WinstonShine I could use some advice or thoughts about the above ^

automating the installation of vscode plugins is done with the gitpod.yml file https://github.com/TheEvergreenStateCollege/upper-division-cs/blob/main/.gitpod.yml

vscode:
  extensions:
    - gitpod.gitpod-web

I know there are vscode plugins for color themes for example one that I have used before is https://open-vsx.org/extension/GitHub/github-vscode-theme is this the kind of thing that you are looking for as a color theme?

As for modifying the prompt I'm unsure what the best way to do that would be but my first thought would be to modify the bashrc to only include the current directory in the prompt rather then the full path. this could be put in as part of the image but I also came across this article https://www.gitpod.io/blog/personalize-your-gitpod-workspace-environment that explains how to configure gitpod to set up dotfiles for all workspaces you open which seems more appropriate since each user can set this up how they like.