[go: up one dir, main page]

Skip to content

Change Permalink button into dropdown item

What does this MR do and why?

Add a new permalink_dropdown_item.vue component that copies permalink to clipboard with a successful toast. Show new component to blob overflow menu when blob_overflow_menu flag is on. In the spirt of iteration , this MR only adds the copy permalink in blob overflow menu. Directory overflow menu will come in a separate MR.

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.

Flag off Flag on
Screen Recording 2025-02-19 at 9.56.48 AM.mov Screen Recording 2025-02-19 at 9.46.57 AM.mov

How to set up and validate locally

  1. Enable blob_overflow_menu and enable blob_repository_vue_header_app feature flag
   Feature.enable(:blob_overflow_menu)
   Feature.enable(:blob_repository_vue_header_app)
  1. Go to a directory
  2. Go to a file
    1. The copied link (when flag is on) and the url in the search bar (when flag is off) should match
    2. This should work when viewing a file with:
      1. A branch
      2. A commit (Select Code > Commits > Select a commit > View file)
      3. A tag
    3. In all situations, the last selected line number should be append to the end of the link
    4. Press y should work the same as clicking the dropdown item
    5. Blame button remains in the header and should not be impacted by this change

Related to #452305 (closed)

Thank Yous

Huge shout out to @markrian for saving me from the dropdown item <> copy to clipboard <> shortcut mess

Edited by Chaoyue Zhao

Merge request reports

Loading