Skip to content

Add button to create workspace in workspaces popover

Enrique Alcántara requested to merge new-workspace-button into master

What does this MR do and why?

This MR adds a link button that navigates to the Workspace Create form. The button is only visible when the current project has a devfile file and one or more cluster agents associated. Otherwise, the popover displays a message indicating that an administrator should set up the remote development feature.

Context

This Merge Request is a continuation of the following Merge Requests:

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

State Screenshot
Project has devfile file and cluster agents Screenshot 2023-06-30 at 4.11.47 PM.png
Project does not satisfy the requirements Screenshot 2023-06-30 at 4.12.09 PM.png

How to set up and validate locally

The dropdown group can’t be tested in the GitLab application yet because it isn’t integrated with the Edit dropdown in the repository view. However, I created a Storybook story using the With API Access decorator where you can interact with the dropdown. Follow these instructions:

Preparing the backend

You have two options to prepare the backend.

Setting remote development in your local environment

  1. Set up a remote development environment in your GDK.
  2. Create a Workspace in your local Remote Development set up https://docs.gitlab.com/ee/user/workspace/#create-a-workspace.

Using GitLab.com

  1. You can create a Workspace in gitlab.com for the gitlab-web-ide project. Read the docs that indicate how to create a workspace: https://docs.gitlab.com/ee/user/workspace/#create-a-workspace

Setting up Storybook

  1. Connect your Storybook instance to either your local GDK or gitlab.com: https://docs.gitlab.com/ee/development/fe_guide/storybook.html#set-up-api-access-token-and-gitlab-instance-url

  2. Open http://localhost:9002/?path=/story/ee-remote-development-workspaces-dropdown-group--with-api-access&args=projectId:35104827

  3. Pass the ID and the full path of the project where you created the Workspace in the "Controls" panel

    Screenshot 2023-06-30 at 4.12.59 PM.png

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Enrique Alcántara

Merge request reports