Add UI support for displaying merge requests deployed in a deployment - Deployment View
Problem
The management of the the merge requests using GitLab environments can be only be done via API calls from the backend. In issue #35741 and this issue, we want for users to be able to interact with their merge requests via the user interface. This is issue focuses on displaying merge requests in the Deployment Details page.
Background
In !18755 (merged) we are adding backend support for tracking merge requests deployed using GitLab environments and deployments. In #35739 (closed) we discuss adding API support for this data. Similar to this issue we should add UI support for this data.
Flow
Project > Environments > Has deployment?
yes > see deployment details > deployments > merge requests
no > empty state
Feature description
The goal is to display merge requests in two separate views:
- Merge Request view - (#35741 (comment 244181961))
- Deployment View
In the deployment view:
- For deployment details, we need a way of displaying merge request on the deployment detail view.
- The deployment view should mirror merge requests index page to avoid a user going between the deployment page and merge index page.
- For logging of deployment events to work properly, we need to be able to link to a deployment so this can act as the target for the audit event. This is not possible at the moment, as there is no deployment details page yet. This page should also satisfy the linking of deployments.
User story
As a user, I need to be able to see a list of the merge requests on the deployments page for my GitLab environment.
Acceptance criteria
- In the deployment detail view (example) user can view a single deployment detail by clicking the deployment ID. A new page loads with all the Merge requests this deployment included.
- The merge requests list displays the same data as the MR index page (example).
- The merge requests should be ordered by creation time (as we usually do when displaying lists, e.g. issues).
- A breadcrumb navigation should be displayed on top of the merge requests lists. Example:
- GitLab.org > GitLab > Environments >
Environment_Name
>DeploymentID
- GitLab.org > GitLab > Environments >
Example of current deployment page:
Out of scope
@jmeshell Need to open new issues for the user stories below:
- As a user, I need to be able to filter on the deployment page by label, status, created, and author.
- As a user, I need to be able to search on the deployment page by label, status, created, and author.
Potential Starting Points
- Existing code we could reuse the haml templates: https://gitlab.com/gitlab-org/gitlab/blob/master/app/views/projects/merge_requests/_merge_requests.html.haml from @filipa in
Note that we should not start adding the UI before the API, as ideally we use this API for the UI; or at least reuse the underlying code.