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:
@@ -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>,
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -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]);
|
||||
|
||||
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user