Move the blob page Edit button from the blob header to the title area
What does this MR do and why?
- moves Edit button (WebIdeLink) into BlobControls under
blob_overflow_menu
feature flag - DefaultActions are still in the blob overflow menu, but only on the mobile viewport. Otherwise, they stay in the blob content viewer header (mistake from first implementation attempt)
- Edit button and overflow menu are alight to the right on all viewports
- some reorganising in jest specs
Important: I will add ForkSuggestionModal in a follow-up MR. The diff is too big already and we're still under WIP feature flag.
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.
- Move the blob page Edit button from the blob header to the title area
- discussion on the DefaultActions
- fork suggestion modal that will be included in the follow-up
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 |
---|---|---|
feature flag on | ![]() |
![]() |
feature flag on | ![]() |
![]() |
feature flag on | ![]() |
![]() |
feature flag on | ![]() |
![]() |
feature flag off | ![]() |
![]() |
feature flag off | ![]() |
![]() |
trying to edit without permissions | Screen_Recording_2025-03-07_at_18.20.23 | temporary, before ForkSuggestionModal is implemented Screen_Recording_2025-03-07_at_18.21.52 |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
In rails console enable the experiment fully
Feature.enable(:blob_overflow_menu)
-
Go to Project / Repository and open any file
-
Open the actions overflow menu and make sure Copy contents, Open raw and Download are there on mobile, but not on desktop.
-
Make sure Copy contents, Open raw and Download icons buttons are visible on the content viewer on viewport bigger than mobile.
-
Make sure Edit buttons opens single file and IDE editors (if you have permissions to edit) or does not do it when you impersonate a guest of a project.
Related to #498253 (closed)