Skip to content

[dashboard] support start-with-options URL #15567

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

Merged
merged 1 commit into from
Jan 9, 2023
Merged

[dashboard] support start-with-options URL #15567

merged 1 commit into from
Jan 9, 2023

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Jan 4, 2023

Description

This change allows for starting new workspaces with an option dialog where users can select the IDE and workspace class.
The URL param is showOptions=true as in:
https://gitpod.io?showOptions=true#<context-url>

Related Issue(s)

Fixes #15566

How to test

Open this PR using the following link:

It's also possible to preselect certain values:

Release Notes

Support start-with-options URL, for prompting users about the preferred IDE and workspace class when opening a fresh workspace.

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-se-show-options.1 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat added the size/M label Jan 4, 2023
@svenefftinge svenefftinge marked this pull request as ready for review January 4, 2023 21:15
@svenefftinge svenefftinge requested a review from a team January 4, 2023 21:15
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jan 4, 2023
@svenefftinge svenefftinge changed the title [dashboard] allow show options on ws start [dashboard] support start-with-options URL Jan 4, 2023
@svenefftinge
Copy link
Member Author

/hold

@easyCZ
Copy link
Member

easyCZ commented Jan 5, 2023

Screenshot 2023-01-05 at 8 44 39

ContextURL may not be super user friendly. We internally know what it means, but I think we don't really expose it as a concept as such in the rest of the product. Perhaps calling it something like Workspace Context or similar may be easier to grasp

@easyCZ
Copy link
Member

easyCZ commented Jan 5, 2023

Currently, the query params contain two params to indicate which IDE to use. There's useLatest and there's editor. When you select non-latest one, it sets the useLatest to false.

Could we merge these into a single param? Could we have editor=latest or editor=code or editor=goland to simplify?

When I use the following URL: https://se-show-options.preview.gitpod-dev.com/?showOptions=true&useLatest=true&editor=goland#https://github.com/gitpod-io/gitpod/pull/15567 It gives priority to editor rather than useLatest which is not intuitive

@easyCZ
Copy link
Member

easyCZ commented Jan 5, 2023

When I specify an editor which is not a valid value, the popup shows nothing for that field. I think there should be an error message to indicate the editor is not available - this could happen when new/old editors are removed and/or the URL params change
https://se-show-options.preview.gitpod-dev.com/?showOptions=true&useLatest=true&editor=foobar#https://github.com/gitpod-io/gitpod/pull/15567

The same happens when I specify a workspaceClass in the query params - https://se-show-options.preview.gitpod-dev.com/?showOptions=true&useLatest=true&editor=foobar&workspaceClass=nothing#https://github.com/gitpod-io/gitpod/pull/15567. In this case, it also renders a dot in place of the workspace class row.
Screenshot 2023-01-05 at 9 04 42

@svenefftinge
Copy link
Member Author

ContextURL may not be super user friendly. We internally know what it means, but I think we don't really expose it as a concept as such in the rest of the product. Perhaps calling it something like Workspace Context or similar may be easier to grasp

I agree it's an unknown concept. I'm not sure Workspace Context is much better than Context URL. Maybe something like Git Context?
FWIW I changed it from Repository because URLs to issues, PRs, and branches are not well captured by this. After all the context URL is a central concept in Gitpod, in absence of a well-known term I wonder if it's not worth introducing and educating users about it. cc @gtsiolis

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 5, 2023

The Context URL term is the most accurate description, especially since we allow arbitrary URLs to be entered, but the terms context and class can be confusing or scary to users.

We could keep them as Repository and Machine, or update the dropdown description to include references to context, classes etc.

BEFORE AFTER
b a

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 5, 2023

My point is that Repository looks wrong when the URL points to a PR or an issue. Don't you think so?

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 5, 2023

... Repository looks wrong when the URL points to a PR or an issue.

@svenefftinge Context URL is definitely more accurate and more flexible that what other solutions offer. Let's try this and see if we get any feedback about understanding what is the context URL. 🤝

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 5, 2023

It's not easy. What do you think of Repository Context? But I guess Context is the term that is a little too abstract. 😬

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 5, 2023

/werft run

👍 started the job as gitpod-build-se-show-options.4
(with .werft/ from main)

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 5, 2023

What do you think of Repository Context?

Sounds much friendlier than Context URL, and we can still mention the term context URL in the modal description or the dropdown second line. Minor issue here would be that it's conflicting with what we call repository context—maybe something to consider renaming to something like default context?

🅰️ 🅱️
Screenshot 2023-01-05 at 5 27 38 PM Screenshot 2023-01-05 at 5 59 12 PM

But I guess Context is the term that is a little too abstract. 😬

Yes! Besides the abstraction, the context term can be easily confusing or misunderstood.

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 5, 2023

Thanks for pointing to the docs, where we name this "Context URL". I think we should be consistent and have the discussion for a better term separately.
Therefore, I'll go with "Context URL" for this PR. Please shout if that doesn't work for anyone 😇

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 5, 2023

DEAL 🤝

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 6, 2023

Could we merge these into a single param? Could we have editor=latest or editor=code or editor=goland to simplify?

editor=latest wouldn't make sense because latest is not a specific editor but just the information that you would like to get the latest version of whatever editor you chose.

When I use the following URL: https://se-show-options.preview.gitpod-dev.com/?showOptions=true&useLatest=true&editor=goland#https://github.com/gitpod-io/gitpod/pull/15567 It gives priority to editor rather than useLatest which is not intuitive

With this you would get the latest version for goland. What did you expect what useLatest=truedoes?

Edit: just realized that in preview envs there is only a latest version for VS Code, so you probably expected this to be an alias for "VS Code Latest". It is meant to be an orthogonal information that can be applied to any of the editors (if a latest version is available)

We could merge it e.g. as intellij-latest and intellij and then immediately split the value and turn it back into two distinct properties as this is how it is configured under the hood. I think I like that a little better.

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 6, 2023

I have made the following changes

  • using a -latest suffix on the editor param rather than having two params
  • handle non supported ide and workspace classes better by showing an error message and a prompt to select a supported item

Screenshot 2023-01-06 at 10 57 22

@svenefftinge
Copy link
Member Author

/unhold

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 9, 2023

/werft run

👍 started the job as gitpod-build-se-show-options.6
(with .werft/ from main)

@easyCZ
Copy link
Member

easyCZ commented Jan 9, 2023

Screenshot 2023-01-06 at 10 57 22

I think it should read Editor 'foobar' is not supported. - without the the but I'm not a native speaker

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

I think this is now good enough to land. We can tweak it in follow-up PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/XL team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open with Options
4 participants