Skip to content

Draft: Refactor compliance framework pills to display as badges

What does this MR do and why?

This MR updates the compliance framework pills to render as badges instead of labels.

Why? Because GlLabel expects an action (href) and there is none for compliance framework pills.

This also brings the Vue component inline with the HAML partial compliance_framework_badge.

Screenshots or screen recordings

Group item

Before After
image image

Compliance report sidebar (also shows hover state)

Before After
Kapture_2022-05-25_at_17.40.14 Kapture_2022-05-25_at_17.29.41

How to set up and validate locally

  1. You need a GitLab Ultimate license.
  2. View the group settings at http://gdk.test:3000/groups/gitlab-org/-/edit#js-compliance-frameworks-settings.
  3. Add a label with a scope, for example GDPR::UK.
  4. Apply the label to a project in the group at http://gdk.test:3000/gitlab-org/gitlab-shell/edit.
  5. Verify the group item pill at http://gdk.test:3000/gitlab-org.
  6. Verify the compliance report sidebar pill at http://gdk.test:3000/groups/gitlab-org/-/security/compliance_dashboard.
    • If no violations are visible update the start date to a few months back.
    • Filter for the project you applied the compliance framework to: gitlab-shell.
    • Click on a violation row to open the sidebar.

MR acceptance checklist

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

Related to #325260 (closed)

Edited by Jiaan Louw

Merge request reports