From a61bf33fb06e8eae8638d9296984c4ef7941fc33 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Wed, 10 Dec 2025 15:00:11 -0300 Subject: [PATCH] Fix label copy for file history menu items (#44569) Buttons and menu items should preferably always start with an infinitive verb that describes what will happen when you trigger them. Instead of just "File History", we should say "_View_ File History". Release Notes: - N/A --- crates/editor/src/mouse_context_menu.rs | 6 +++++- crates/git_ui/src/git_panel.rs | 2 +- crates/project_panel/src/project_panel.rs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/editor/src/mouse_context_menu.rs b/crates/editor/src/mouse_context_menu.rs index bda6f1d1d5c893c4fd3fbd4e4d2e72f6ae789361..36521d46a6c20223e973346b9d1e9391db3306ca 100644 --- a/crates/editor/src/mouse_context_menu.rs +++ b/crates/editor/src/mouse_context_menu.rs @@ -280,7 +280,11 @@ pub fn deploy_context_menu( "Copy Permalink", Box::new(CopyPermalinkToLine), ) - .action_disabled_when(!has_git_repo, "File History", Box::new(git::FileHistory)); + .action_disabled_when( + !has_git_repo, + "View File History", + Box::new(git::FileHistory), + ); match focus { Some(focus) => builder.context(focus), None => builder, diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index c6895f4c15d5afd3ef50ce796059956dd8653f8b..21486ba98383b06388d2dbc214dfcedc1bb350e4 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -4017,7 +4017,7 @@ impl GitPanel { .action("Open Diff", Confirm.boxed_clone()) .action("Open File", SecondaryConfirm.boxed_clone()) .separator() - .action_disabled_when(is_created, "File History", Box::new(git::FileHistory)) + .action_disabled_when(is_created, "View File History", Box::new(git::FileHistory)) }); self.selected_entry = Some(ix); self.set_context_menu(context_menu, position, window, cx); diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index 0c633bcfcda2415bae84201f7e67a91fbd5a866d..ea667ecbb479ca347914ee11ec789a14f29cf474 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -1142,7 +1142,7 @@ impl ProjectPanel { ) .when(has_git_repo, |menu| { menu.separator() - .action("File History", Box::new(git::FileHistory)) + .action("View File History", Box::new(git::FileHistory)) }) .when(!should_hide_rename, |menu| { menu.separator().action("Rename", Box::new(Rename))