Iteration 2.3 multiple Findings on one line Drawer functionality
Related Design Screen: #430097Changes_-SAST_drawer-_detected.png
This Issue will track the implementation of the previous/next buttons on the MR Diff drawer to cycle through findings. The GitLab UI Drawer Component does currently not support this functionality so this needs to be added in GitLabUI.
Demo Screen |
---|
![]() |
Expected Behaviour
- When opening a drawer from a SAST or CodeQuality inline-finding which has more than 1 finding in a row the switches should be display allowing the user to switch between all findings of the line the drawer was opened from.
Implementation Plan
Option 1:
- Introduce a new prop to the GitLab UI Drawer Component to control the visibility of previous and next buttons in the header.
- Implement functionality for the previous and next buttons to emit events to parent component when clicked.
- In the parent component, handle the emitted events by updating slots and props accordingly.
Option 2:
- Add a new prop to the GitLab UI Drawer Component that accepts an array containing all the data to be displayed.
- Implement logic within the drawer component to overwrite the existing drawer slot content when array data is set
- Ensure that toggling the content display is managed within the drawer component itself.
Acceptance Criteria
- Opening a findings-detail drawer on an inline-findings line with more than 1 finding does show back and forward switches on the drawer
- clicking those switches loops back and forward between all SAST and CodeQuality findings of that line
Edited by Jannik Lehmann