Skip to content

Add scrolling to sub elements and sticky header

Chen Charnolevsky requested to merge 469653-vulnerability-code-flow-P6 into master

What does this MR do and why?

Adding sub scrolling to two elements and adding sticky header

Before After
Screen_Recording_2024-07-07_at_14.45.03 Screen_Recording_2024-07-10_at_14.55.29

How to set up and validate locally

  1. Upload a GitLab Ultimate license
  2. Enable the feature flag (echo "Feature.enable(:vulnerability_code_flow)" | rails c)
  3. Clone the code flow project and run his pipeline to display vulnerabilities
  4. Navigate to the project => Secure => Vulnerability report => Select the first vulnerability to navigate to the vulnerability details page
  5. Apply the following patch to show the new features
Patch
diff --git a/ee/app/assets/javascripts/vulnerabilities/components/vulnerability.vue b/ee/app/assets/javascripts/vulnerabilities/components/vulnerability.vue
index ca4110274476..319e8f7180ae 100644
--- a/ee/app/assets/javascripts/vulnerabilities/components/vulnerability.vue
+++ b/ee/app/assets/javascripts/vulnerabilities/components/vulnerability.vue
@@ -56,6 +56,7 @@ export default {
       },
     },
     showCodeFlowTabs() {
+      return true
       return (
         this.glFeatures.vulnerabilityCodeFlow && !isEmpty(this.vulnerability.details.codeFlows)
       );
diff --git a/ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue b/ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue
index bfbc47e4c041..72fd47398163 100644
--- a/ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue
+++ b/ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue
@@ -221,6 +221,7 @@ export default {
       return this.vulnerability.location?.file && this.vulnerability.location?.startLine;
     },
     showCodeFlowButton() {
+      return true
       return (
         this.glFeatures.vulnerabilityCodeFlow && !isEmpty(this.vulnerability.details.codeFlows)
       );
  1. Navigate to code flow tab
  2. Go through the steps and verify that code flow viewer scrolling to the target step
  3. Verify that 'description and steps section' and 'code flow viewer' have different scrolling
  4. Scroll down and verify that you have a sticky header with active clicks as needed

Related to #469653 and #458062

Edited by Chen Charnolevsky

Merge request reports