Customize edit button in code flow file header

What does this MR do and why?

Customize edit button in code flow file header

Move variant-deciding logic from `web_ide_link.vue` to `blob_header.vue`
so that we can override it for the code flow file viewer `<blob-header>`

Changelog: changed
EE: true

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

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

Before After
Screenshot_2024-11-22_at_15.14.31
blue confirm-variant Edit button in file header
Screenshot_2024-11-22_at_15.11.46
white default-variant Edit button in file header

How to set up and validate locally

git checkout 475022-code-flow-use-default-variant-for-edit-button
  1. set up Advanced SAST scanning for a project - clone this test project to get started
  2. run a pipeline for the default branch - the gitlab-advanced-sast job should run and find some vulnerabilities (here's a troubleshooting guide in case it doesn't)
  3. navigate to the project, and in the sidebar choose Secure => Vulnerability report
  4. click on the "Improper neutralization..." vulnerability
  5. click on the Code flow tab
  6. check that the Edit button uses the default styling (see screenshots)

to run tests

yarn install && yarn jest code_flow web_ide_link

Related to #475022 (closed)

Edited by Miranda Fluharty

Merge request reports

Loading