Skip to content

Add Gitpod button to MR page

What does this MR do?

Closes #338741 (closed)

EDIT:

This MR does two things:

  1. (minor) It changes the "Open in Web IDE" button to also include "Open in Gitpod", if enabled. This is done simply by replacing the custom button with our standard web_ide_link component.
  2. (major) It changes when we show an enabled "Open in Web IDE" button. Previously, this was only visible and enabled if the user could edit the MR branch. Now, we always show this button. Since the "Open in Web IDE" button was originally added, the Web IDE has been enhanced to gracefully handle a number of different permission states (see relevant issue), such that we shouldn't worry about preventing the user from visiting this page.

Why shouldn't we worry about hiding this button?

  • The Web IDE will direct the user to a fork, if possible, otherwise it'll display a persistent warning to the user that they are not allowed to make edits. This warning was not available before the button disability was put in place.
  • Editing / committing is not the only action a user may wish to take with "Open in Web IDE" or "Open in Gitpod". For instance, they may just want to run some tests in Gitpod. The user may just want to create a patch through the Web IDE (coming soon).

ORIGINAL:

This MR adds the Gitpod button introduced in !37985 (merged) to the MR pages (we decided to move this to a separate MR). It uses the same vue component as in the tree header view. That has the following effects:

  • It harmonizes the code base of the Web IDE button on the tree header view and the MR page. The behavior is now more similar.
  • However, this also slightly changes the behavior of the Web IDE button on the MR page.

See also the discussions on !37985 (merged), especially !37985 (comment 402770390)

/cc @phikai @pslaughter @mnichols1

Screenshots

EDIT (2021-08-10):

To enable the Gitpod button to show in the dropdown, go to Admin > Settings > Gitpod.

What should I be looking for?

  • It's expected that users need to "Enable Gitpod" for their user preferences.
  • If the "Open in Gitpod" button navigates to <gitpod_url>#<merge_request_url> it's working.
Description Before (on master) After (this MR) After (this MR + Gitpod disabled) Demo
Anonymous user (not logged in) anon_before anon_after gitpod_disabled_anon_after 20210810_gitpod_anon_demo
Guest user guest_before guest_after gitpod_disabled_guest_after 20210810_gitpod_guest_demo
Project member user_before user_after gitpod_disabled_user_after 20210810_gitpod_user_demo

What about archived projects?

Showing the button makes sense for archived projects because there are user flows besides editing the target project that can still be accomplished:

  • Forking the project
  • Running tests in Gitpod
Button still shows up Owner of archived project is invited to fork
Screen_Shot_2021-08-10_at_6.33.03_PM Screen_Shot_2021-08-10_at_6.33.08_PM

ORIGINAL:

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Eric Schurter

Merge request reports