Add merge request violation component for compliance reports
What does this MR do and why?
This MR adds a component to render the merge request violation in the compliance report as described in #342901 (closed).
Note that this MR merely adds the component. Once the new report application !75015 (merged) is merged then there will be a follow-up MR to implement the component.
Changes made:
- [!76214 (e18399cf)] Add utility method to convert an array of snake case objects to camelCase.
- [!76214 (60d0b827)] Add a shared
UserAvatar
component to be used by both theMergeRequestDrawer
andReason
components. - [!76214 (dad07dd3)] Update the
MergeRequestDrawer
drawer to use the new sharedUserAvatar
component. - [!76214 (cc26a63c)] Add a new merge request violation
Reason
component to be used in the report app !75015 (merged).
Screenshots or screen recordings
Compliance report
Before | After |
---|---|
Compliance drawer
Before | After |
---|---|
How to set up and validate locally
- Rebase this branch with
342896-create-a-new-merge-request-violations-compliance-report-application
from !75015 (merged). - Apply this patch to use the new component in the report app report.patch.
- Visit the existing compliance dashboard on a group:
[GDK_HOST]/groups/gitlab-org/-/security/compliance_dashboard
- Check that it renders the current dashboard and the drawer by clicking on a row
- Enable the new feature flag in your terminal:
echo "Feature.enable(:compliance_violations_report)" | rails c
- Check that it renders the new MR violation reason component in the report
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.
Related to #342901 (closed)
Edited by Jiaan Louw