Skip to content

Empty state for branch specific MR approvals

What does this MR do and why?

When viewing MR approval rules per branch from a branch rule details page, there's a chance there is no rule and a default project rules do not apply. In that case the table appeared empty, with only a table header visible. This commit adds an empty state text for such cases.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After
Screenshot_2024-09-24_at_10.50.47 Screenshot_2024-09-24_at_10.32.56
Screenshot_2024-09-24_at_10.51.01 Screenshot_2024-09-24_at_10.33.08

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Go to Project / Settings / Repository / Branch rules
  2. Click View details for a branch you protected OR create a new branch rule
  3. Scroll down to MR approvals. If there are no rules, you should be able to see the empty text.
  4. Add MR approval rule for that branch. Make sure the empty state disappear.
  5. Go to Project / Settings / Merge requests and scroll to MR approvals.
  6. Make sure you can't see that empty state, even when you delete all named rules.

Related to #481761 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports

Loading