Add button to create workspace in workspaces popover
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:
- Workspaces dropdown group (!124228 - merged) • Enrique Alcántara • 16.2
- Add workspace actions to the workspaces dropdow... (!124655 - merged)
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 | |
Project does not satisfy the requirements |
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
- Set up a remote development environment in your GDK.
- Create a Workspace in your local Remote Development set up https://docs.gitlab.com/ee/user/workspace/#create-a-workspace.
Using GitLab.com
- 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
-
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
-
Pass the ID and the full path of the project where you created the Workspace in the "Controls" panel
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.