From 4642413b02bfd8c6f4105424a8876eefe6743bf3 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Wed, 18 Mar 2026 12:14:02 -0300 Subject: [PATCH] recent_projects: Simplify folder addition affordances (#51841) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recent projects had two plus buttons inside of it which weren't immediately clear what they did. Those buttons would add a project to the current workspace, which turned out to be _not_ what people expected it would do. Because of this, I removed one of them and swapped the icon of the other, to hopefully make the distinction more clear. Screenshot 2026-03-18 at 11  59@2x Release Notes: - N/A --- assets/icons/folder_plus.svg | 5 ++++ crates/icons/src/icons.rs | 1 + crates/recent_projects/src/recent_projects.rs | 24 +++---------------- 3 files changed, 9 insertions(+), 21 deletions(-) create mode 100644 assets/icons/folder_plus.svg diff --git a/assets/icons/folder_plus.svg b/assets/icons/folder_plus.svg new file mode 100644 index 0000000000000000000000000000000000000000..a543448ed6197043291369bee640e23b6ad729b9 --- /dev/null +++ b/assets/icons/folder_plus.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/crates/icons/src/icons.rs b/crates/icons/src/icons.rs index 70bc0fc52784c4e50c715ddafab533beeccf3f93..ca12f1a90383f1aa682531f201dc21a8065fe3f5 100644 --- a/crates/icons/src/icons.rs +++ b/crates/icons/src/icons.rs @@ -134,6 +134,7 @@ pub enum IconName { Flame, Folder, FolderOpen, + FolderPlus, FolderSearch, Font, FontSize, diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rs index ac6522eb31e9e8270fd81714ddd535033daf699b..92dc632d1c309a49ae984115bb1f753ca66164bc 100644 --- a/crates/recent_projects/src/recent_projects.rs +++ b/crates/recent_projects/src/recent_projects.rs @@ -712,32 +712,14 @@ impl PickerDelegate for RecentProjectsDelegate { window: &mut Window, cx: &mut Context>, ) -> Div { - let focus_handle = self.focus_handle.clone(); - h_flex() .flex_none() .h_9() - .pl_2p5() - .pr_1p5() + .px_2p5() .justify_between() .border_b_1() .border_color(cx.theme().colors().border_variant) .child(editor.render(window, cx)) - .child( - IconButton::new("add_folder", IconName::Plus) - .icon_size(IconSize::Small) - .tooltip(move |_, cx| { - Tooltip::for_action_in( - "Add Project to Workspace", - &workspace::AddFolderToProject, - &focus_handle, - cx, - ) - }) - .on_click(|_, window, cx| { - window.dispatch_action(workspace::AddFolderToProject.boxed_clone(), cx) - }), - ) } fn match_count(&self) -> usize { @@ -1169,9 +1151,9 @@ impl PickerDelegate for RecentProjectsDelegate { .gap_px() .when(is_local, |this| { this.child( - IconButton::new("add_to_workspace", IconName::Plus) + IconButton::new("add_to_workspace", IconName::FolderPlus) .icon_size(IconSize::Small) - .tooltip(Tooltip::text("Add Project to Workspace")) + .tooltip(Tooltip::text("Add Project to this Workspace")) .on_click({ let paths_to_add = paths_to_add.clone(); cx.listener(move |picker, _event, window, cx| {