Skip to content

Prepare common Vue app for Repository header area

What does this MR do and why?

This MR is a part of a bigger effort that aims to consolidate various tiny Vue apps in the header area of tree and blob view into one common Vue application.

Note: There's a potential for refactor, but that part will be handled in the following issues within &13018. The MRs for #497051 goal is to move everything as is.

Even though the end result should not change any UI and behaviour, it is quite a ride 😄 To ensure nothing breaks in the meantime:

  • all changes are behind a derisk feature flag
  • elements are being moved in batches, what you're reviewing may not yet look like the old version
  • breaking the work into smaller parts means that feature tests won't pass, due to missing UI elements. That is why I decided to stub the ff and take care of the feature tests in the last step, after all other MRs are merged
  • please make sure you give it a go and thoroughly test all the buttons

The breakdown of #497051 MRs:

step status
introduce ff & move first batch of controls
move web ide button for tree header 🚧
move code buttons (desktop & mobile) for tree header 🚧
move contents of app/views/projects/blob/_breadcrumb.html.haml 🚧
turn on feature tests for when the ff is true 🚧

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Context Before After
tree: old version with multiple Vue apps Screenshot_2024-10-11_at_09.24.42 Screenshot_2024-10-11_at_09.21.17
blob: old version with multiple Vue apps Screenshot_2024-10-11_at_09.24.24 Screenshot_2024-10-11_at_09.22.03
tree: different ref than root ref (ff off vs. ff on) Screenshot_2024-10-11_at_09.27.06 Screenshot_2024-10-11_at_09.26.28
blob Screenshot_2024-10-11_at_09.24.24 Screenshot_2024-10-11_at_09.29.40

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Go to Project overview or Code / Repository
  2. Make sure you can switch Git revision to a different name or branch
  3. After point 2 you should see Compare button. Make sure it redirects to Compare revisions page with correct data
  4. Go back to project overview
  5. Click + button next to the project's breadcrumbs and try adding a file or a branch.
  6. Click History button and make sure it opens Commits page for a revision you've selected in point 2
  7. Go back to project overview
  8. Click Find file button and make sure it opens the search modal with ~ prefix for searching for files
  9. Select a file from the tree list
  10. Make sure you can see blob controls on the right: Find file, Blame, History and Permalink. Check their behaviour.
  11. Optional: with Vue browser extension make sure you can see HeaderArea app. Then refresh the page to get the legacy blob view. The Vue extension should then list the old structure (that's the part to be moved in 4th MR from the breakdown table 🔝). Here's how it should look like:
new blob legacy blob
Screenshot_2024-10-11_at_16.55.30 Screenshot_2024-10-11_at_16.53.27

Related to #497051

Edited by Paulina Sedlak-Jakubowska

Merge request reports

Loading