Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Remove feedback button from status bar (#9100)

Joseph T. Lyonsa03fecafbbbf
diff --git a/Cargo.lock b/Cargo.lock
index 9e15e37fe8e..343f1b839ae 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 bc3840e6f22..ff78b508531 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 fc4c2b93c74..5e688b4fe33 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 377d4cea5c1..00000000000
--- 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<Workspace>,
-}
-
-impl DeployFeedbackButton {
- pub fn new(workspace: &Workspace) -> Self {
- DeployFeedbackButton {
- workspace: workspace.weak_handle(),
- }
- }
-}
-
-impl Render for DeployFeedbackButton {
- fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
- let is_open = self
- .workspace
- .upgrade()
- .and_then(|workspace| {
- workspace.update(cx, |workspace, cx| {
- workspace.active_modal::<FeedbackModal>(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<Self>,
- ) {
- }
-}
diff --git a/crates/feedback/src/feedback.rs b/crates/feedback/src/feedback.rs
index 40a87019313..150b2231912 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 9b76ea69a61..510d31375b1 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 9f5c970d4db..fdac58c126d 100644
--- a/crates/zed/src/app_menus.rs
+++ b/crates/zed/src/app_menus.rs
@@ -169,6 +169,7 @@ pub fn app_menus() -> Vec<Menu<'static>> {
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 9ae5c2646f4..04481dd0be7 100644
--- a/crates/zed/src/zed.rs
+++ b/crates/zed/src/zed.rs
@@ -130,14 +130,11 @@ pub fn initialize_workspace(app_state: Arc<AppState>, 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);