Change BlobButtonGroup into a dropdown

What does this MR do and why?

This MR is a part of a bigger effort that aims to rearrange controls for w blob viewer.

The breakdown of #450774 (closed) MRs:

step status
Change Preview and Code buttons to text based and move Table of content dropdown
Change BlobHeaderDefaultActions into dropdown items
Change BlobButtonGroup into a dropdown ⬅️
Move Permalink button and add copy functionality 🚧

MR 1 of 2 for Change BlobButtonGroup into a dropdown (#508309 (closed))

I'm breaking this down because of the big diff. In this MR:

  • changing LockFileButton into LockFileDropdownItem
  • moving what was previously a BlobHeaderDefaultActions into a separate component BlobDefaultActionsGroup

In the MR no. 2 I will move Replace and Delete buttons. And change the dropdown to use GlDisclosureDropdownGroup

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
Screenshot_2025-01-20_at_17.19.43 Screenshot_2025-01-20_at_17.19.28

How to set up and validate locally

  1. Enable the feature flag
   Feature.enable(:blob_overflow_menu)
  1. Go to a project
  2. Navigate to a chosen file in your repository.
  3. Add ?common_repository_blob_header_app=true to the url and reload the page.
  4. Make sure you can lock the file and unlock it. There should be a modal for confirming the action. Navigate to the parent directory and verify the lock icon is next to the file name.
  5. Navigate to a file in a project where you are a guest.
  6. Make sure the Lock item in the dropdown is disabled.

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

Related to #450774 (closed)

Closes #508309 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports

Loading