Skip to content

Create UI for LockDirectoryButton component

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 (closed) goal is to move everything as is.

This is just the non functional UI for the Lock button

I started work in !173576 (closed), but the changes were extensive. I want to have a little piece merged first to make sure the other MR is easier to review and there's less potential for errors (which I have already made re-implementing logic that was in Ruby 🙈 ).

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 common_repository_blob_header_app=true URL param
  • 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. We will 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 (closed) MRs:

step status
introduce ff & move first batch of controls, move web ide button for tree header, recreate projects/tree/lock_link in Vue
move code buttons (desktop & mobile) for tree header
move contents of app/views/projects/blob/_breadcrumb.html.haml
recreate projects/tree/lock_link in Vue ⬅️
turn on feature tests for when the ff is 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

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

Before After
Screen_Recording_2024-12-05_at_20.39.49 Screen_Recording_2024-12-05_at_20.39.14

Note: I've added a title to the modal to mimic the lock modal for file and fill in the space that was there with the Vue GlModal.

Screenshot_2024-12-05_at_20.41.13

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 and go into one of the folders of your project.
  2. Add common_repository_blob_header_app=true param to the URL
  3. Make sure Lock button triggers a confirmation modal.
  4. After confirming the action, the button should show an opposite label (Lock ➡️ Unlock)

Related to #497051 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports

Loading