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.
This commit is contained in:
Joseph T. Lyons 2024-03-09 06:15:08 -05:00 committed by GitHub
parent ca696fd5f6
commit a03fecafbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 2 additions and 58 deletions

1
Cargo.lock generated
View file

@ -2304,7 +2304,6 @@ dependencies = [
"editor",
"emojis",
"extensions_ui",
"feedback",
"futures 0.3.28",
"fuzzy",
"gpui",

View file

@ -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

View file

@ -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()
})

View file

@ -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>,
) {
}
}

View file

@ -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]);

View file

@ -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!(

View file

@ -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",

View file

@ -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);