Skip to content

Collapse approval rules and move it under reviewer

Samantha Ming requested to merge 231244-move-approval-rule-in-mr into master
MR Changes
Part 1: !47976 (merged) Create suggested approvers as a partial so it can be reused
Part 2: 👉 current FE implementation of collapsing Approval Rules under Reviewers

What does this MR do?

This MR move the Approval Rules inside a collapsed format

Collapse Expanded FF off
image image image

Testing Case

This feature is behind 2 feature flag, to turn on:

rails c

Feature.enable(:merge_request_reviewers)
Feature.enable(:mr_collapsed_approval_rules)

Edit MR

  1. Select a Merge Request and click "Edit"
  • The approvals are now hidden within the collapse:
Collapse Expanded
image image

Create MR

  1. The same effect is the same when you create a "New" Merge Request 👆

Not collapsed

This is the scenario when approval rules is in a collapsed format:

FF Is Collapsed?
merge_request_reviewers True
mr_collapsed_approval_rules = True
Yes
merge_request_reviewers False
mr_collapsed_approval_rules = False
No
merge_request_reviewers True
mr_collapsed_approval_rules = False
No
merge_request_reviewers False
mr_collapsed_approval_rules = True
No

This is how it will appear when approval rules are no longer hidden. You can disable by:

rails c

Feature.disable(:merge_request_reviewers)
Feature.disable(:mr_collapsed_approval_rules)

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #231244 (closed)

Edited by Samantha Ming

Merge request reports