From a03fecafbbbf2aecfc77cafb1bc3cc6a21efcab7 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Sat, 9 Mar 2024 06:15:08 -0500 Subject: [PATCH] Remove feedback button from status bar (#9100) This PR removes the feedback button from the status bar, as Nathan and I discussed. We discussed the fact that we likely no longer need to take up valuable screen real estate for this, with where Zed as at now. This PR also moves the `Share Feedback...` collab menu item to the `Help` menu, as that's where VS Code puts their action to send in-app feedback (which might help with future discoverability) and renames it to `Give Feedback...`, to make it consistent with the name of the command palette action. Release Notes: - Removed the feedback button from the status bar. --- Cargo.lock | 1 - crates/collab_ui/Cargo.toml | 1 - crates/collab_ui/src/collab_titlebar_item.rs | 2 - crates/feedback/src/deploy_feedback_button.rs | 49 ------------------- crates/feedback/src/feedback.rs | 1 - crates/feedback/src/feedback_modal.rs | 2 +- crates/zed/src/app_menus.rs | 1 + crates/zed/src/zed.rs | 3 -- 8 files changed, 2 insertions(+), 58 deletions(-) delete mode 100644 crates/feedback/src/deploy_feedback_button.rs diff --git a/Cargo.lock b/Cargo.lock index 9e15e37fe8..343f1b839a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2304,7 +2304,6 @@ dependencies = [ "editor", "emojis", "extensions_ui", - "feedback", "futures 0.3.28", "fuzzy", "gpui", diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.toml index bc3840e6f2..ff78b50853 100644 --- a/crates/collab_ui/Cargo.toml +++ b/crates/collab_ui/Cargo.toml @@ -39,7 +39,6 @@ db.workspace = true editor.workspace = true emojis.workspace = true extensions_ui.workspace = true -feedback.workspace = true futures.workspace = true fuzzy.workspace = true gpui.workspace = true diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index fc4c2b93c7..5e688b4fe3 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -700,7 +700,6 @@ impl CollabTitlebarItem { .action("Extensions", extensions_ui::Extensions.boxed_clone()) .action("Themes...", theme_selector::Toggle.boxed_clone()) .separator() - .action("Share Feedback...", feedback::GiveFeedback.boxed_clone()) .action("Sign Out", client::SignOut.boxed_clone()) }) .into() @@ -725,7 +724,6 @@ impl CollabTitlebarItem { .action("Extensions", extensions_ui::Extensions.boxed_clone()) .action("Themes...", theme_selector::Toggle.boxed_clone()) .separator() - .action("Share Feedback...", feedback::GiveFeedback.boxed_clone()) }) .into() }) diff --git a/crates/feedback/src/deploy_feedback_button.rs b/crates/feedback/src/deploy_feedback_button.rs deleted file mode 100644 index 377d4cea5c..0000000000 --- a/crates/feedback/src/deploy_feedback_button.rs +++ /dev/null @@ -1,49 +0,0 @@ -use gpui::{Render, ViewContext, WeakView}; -use ui::{prelude::*, ButtonCommon, IconButton, IconName, Tooltip}; -use workspace::{item::ItemHandle, StatusItemView, Workspace}; - -use crate::{feedback_modal::FeedbackModal, GiveFeedback}; - -pub struct DeployFeedbackButton { - workspace: WeakView, -} - -impl DeployFeedbackButton { - pub fn new(workspace: &Workspace) -> Self { - DeployFeedbackButton { - workspace: workspace.weak_handle(), - } - } -} - -impl Render for DeployFeedbackButton { - fn render(&mut self, cx: &mut ViewContext) -> impl IntoElement { - let is_open = self - .workspace - .upgrade() - .and_then(|workspace| { - workspace.update(cx, |workspace, cx| { - workspace.active_modal::(cx) - }) - }) - .is_some(); - IconButton::new("give-feedback", IconName::Envelope) - .style(ui::ButtonStyle::Subtle) - .icon_size(IconSize::Small) - .selected(is_open) - .tooltip(|cx| Tooltip::text("Share Feedback", cx)) - .on_click(|_, cx| { - cx.dispatch_action(Box::new(GiveFeedback)); - }) - .into_any_element() - } -} - -impl StatusItemView for DeployFeedbackButton { - fn set_active_pane_item( - &mut self, - _item: Option<&dyn ItemHandle>, - _cx: &mut ViewContext, - ) { - } -} diff --git a/crates/feedback/src/feedback.rs b/crates/feedback/src/feedback.rs index 40a8701931..150b223191 100644 --- a/crates/feedback/src/feedback.rs +++ b/crates/feedback/src/feedback.rs @@ -2,7 +2,6 @@ use gpui::{actions, AppContext, ClipboardItem, PromptLevel}; use system_specs::SystemSpecs; use workspace::Workspace; -pub mod deploy_feedback_button; pub mod feedback_modal; actions!(feedback, [GiveFeedback, SubmitFeedback]); diff --git a/crates/feedback/src/feedback_modal.rs b/crates/feedback/src/feedback_modal.rs index 9b76ea69a6..510d31375b 100644 --- a/crates/feedback/src/feedback_modal.rs +++ b/crates/feedback/src/feedback_modal.rs @@ -431,7 +431,7 @@ impl Render for FeedbackModal { .h(rems(32.)) .p_4() .gap_2() - .child(Headline::new("Share Feedback")) + .child(Headline::new("Give Feedback")) .child( Label::new(if self.character_count < *FEEDBACK_CHAR_LIMIT.start() { format!( diff --git a/crates/zed/src/app_menus.rs b/crates/zed/src/app_menus.rs index 9f5c970d4d..fdac58c126 100644 --- a/crates/zed/src/app_menus.rs +++ b/crates/zed/src/app_menus.rs @@ -169,6 +169,7 @@ pub fn app_menus() -> Vec> { MenuItem::action("View Telemetry", crate::OpenTelemetryLog), MenuItem::action("View Dependency Licenses", crate::OpenLicenses), MenuItem::action("Show Welcome", workspace::Welcome), + MenuItem::action("Give Feedback...", feedback::GiveFeedback), MenuItem::separator(), MenuItem::action( "Documentation", diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 9ae5c2646f..04481dd0be 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -130,14 +130,11 @@ pub fn initialize_workspace(app_state: Arc, cx: &mut AppContext) { let active_buffer_language = cx.new_view(|_| language_selector::ActiveBufferLanguage::new(workspace)); let vim_mode_indicator = cx.new_view(|cx| vim::ModeIndicator::new(cx)); - let feedback_button = - cx.new_view(|_| feedback::deploy_feedback_button::DeployFeedbackButton::new(workspace)); let cursor_position = cx.new_view(|_| go_to_line::cursor_position::CursorPosition::new(workspace)); workspace.status_bar().update(cx, |status_bar, cx| { status_bar.add_left_item(diagnostic_summary, cx); status_bar.add_left_item(activity_indicator, cx); - status_bar.add_right_item(feedback_button, cx); status_bar.add_right_item(copilot, cx); status_bar.add_right_item(active_buffer_language, cx); status_bar.add_right_item(vim_mode_indicator, cx);