mattermost / mattermost-gitpod-config

5 stars 11 forks source link

Display a welcome page about the Gitpod cloud workspace for Mattermost #43

Closed azigler closed 1 year ago

azigler commented 1 year ago

Closes #22

Changes:

Future ideas:

azigler commented 1 year ago

@mickmister Okay, I made that change. Forgoing exit for now. I had to use the gp preview command because markserv wouldn't open the file directly, but this should be set up now.

mickmister commented 1 year ago

I have a question about this commit (amazing commit messages btw):

🔧 chore(.gitpod.yml): update 'onOpen' value for port 9000 to 'ignore' to prevent automatic opening of preview The 'onOpen' value for port 9000 in the .gitpod.yml file has been changed from 'open-preview' to 'ignore'. This change prevents the automatic opening of the preview when the workspace is launched, providing a more streamlined experience.

I'm curious about the difference in the UX here. When the preview opens on workspace creation, is the preview blank? I'm unable to test this because I actually can't create a workspace right now due to this issue I mentioned in their discord today.

azigler commented 1 year ago

Thanks I use OpenCommit to turbo-charge all my Git messages these days! https://github.com/di-sukharev/opencommit

And the preview was opening on workspace creation, but the preview was blank. And when it did load, it was the directory and not welcome.md. So by doing it this way, it only opens once markserv is serving.

mickmister commented 1 year ago

@cwarnermm Requesting your review to review the welcome.md file, but also to see how this is set up. When a new Gitpod workspace is created, we now show the contents of welcome.md (rendered as pretty HTML) in a editor tab within the embedded VSCode instance. So it's "front and center" when you open the workspace.

@azigler Do you mind sharing a screenshot of what this looks like?

mickmister commented 1 year ago

From the PR description:

change load order so it loads ASAP

@azigler Does "change load order" mean to put the Welcome terminal to be the first terminal? I didn't know this changed the load order. I figured it was all parallel, but it makes sense that there is some impact with that.

Note that putting the npm i -g markserv into .gitpod.Dockerfile will make the markserv package preinstalled and be able to spin up the markdown page quicker. 1/5 Good to optimize when possible and simple. I'm not sure exactly what the time savings would be though.


see if we can hide the default preview window and replace it with our loaded one

I imagine they don't want this to be possible, or at least not advertise that it's possible, since this would hide a message the Gitpod org personally wants to show to the user I think. Does their welcome tab take precedence in what is visible to the user when competing with markserv?

mickmister commented 1 year ago

The issue I described here https://github.com/mattermost/mattermost-gitpod-config/pull/43#issuecomment-1698272046 is no longer happening, but now I'm getting a different issue when creating a new MM Gitpod workspace. It seems each terminal is stuck on

info[gp-vncsession]: Increased shmem to 4GB
dbus-daemon[580]: Failed to start message bus: Failed to bind socket "/run/dbus/system_bus_socket": Address already in use
info[gp-vncsession]: * Starting system message bus dbus
info[gp-vncsession]: Starting tigerVNC server on port 5900
info[gp-vncsession]: Waiting for the desktop to be fully loaded ...
image
azigler commented 1 year ago

Example screenshot of the environment:

image

It boots up, opens the Markdown file, and starts everything. The Markdown file does take about a minute to appear, but the way I configured it is the only way I could get it to consistently behave this way. I don't think it's worth altering it for now.

@mickmister I can't reproduce your error. Are you booting on a Large 16GB machine?

mickmister commented 1 year ago

@azigler I made some changes before merging the PR. I improved the markdown serve startup time a bit by installing markserv in .gitpod.Dockerfile, rather than .gitpod.yml. I also made it so the markdown view opens after markserv is ready to show the file. I was experiencing a "nothing listening on port 9000" screen without the sleep 2 added.

azigler commented 1 year ago

Awesome, thanks @mickmister!