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
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user