From e45104a1c046cd2dd441f0363cd25be933763627 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Fri, 10 Mar 2023 12:48:11 -0800 Subject: [PATCH] Move feedback to overflow menu and help menu --- Cargo.lock | 1 + crates/collab_ui/Cargo.toml | 1 + crates/collab_ui/src/collab_titlebar_item.rs | 18 ++++++++++++++---- crates/zed/src/menus.rs | 1 + crates/zed/src/zed.rs | 3 --- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f19d4455f957463f61e8db34ff9fdb135ed4f3b..ade18d799eca665a9c4c03508a3fda7552f13748 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1259,6 +1259,7 @@ dependencies = [ "collections", "context_menu", "editor", + "feedback", "futures 0.3.25", "fuzzy", "gpui", diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.toml index 899f8cc8b4204dc0c2b6d0c060aafb1a42e7e907..2afeb8ad8ae755b1f8b554d8e4a9bc15732767f3 100644 --- a/crates/collab_ui/Cargo.toml +++ b/crates/collab_ui/Cargo.toml @@ -29,6 +29,7 @@ clock = { path = "../clock" } collections = { path = "../collections" } context_menu = { path = "../context_menu" } editor = { path = "../editor" } +feedback = { path = "../feedback" } fuzzy = { path = "../fuzzy" } gpui = { path = "../gpui" } menu = { path = "../menu" } diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rs index c838f6a55fc3ec716571a9261066473910a6f413..4968097ac5e163261e0002c939ed4beaad6103de 100644 --- a/crates/collab_ui/src/collab_titlebar_item.rs +++ b/crates/collab_ui/src/collab_titlebar_item.rs @@ -304,12 +304,22 @@ impl CollabTitlebarItem { label: "Sign out".into(), action: Box::new(SignOut), }, + ContextMenuItem::Item { + label: "Give Feedback".into(), + action: Box::new(feedback::feedback_editor::GiveFeedback), + }, ] } else { - vec![ContextMenuItem::Item { - label: "Sign in".into(), - action: Box::new(Authenticate), - }] + vec![ + ContextMenuItem::Item { + label: "Sign in".into(), + action: Box::new(Authenticate), + }, + ContextMenuItem::Item { + label: "Give Feedback".into(), + action: Box::new(feedback::feedback_editor::GiveFeedback), + }, + ] }; user_menu.show( diff --git a/crates/zed/src/menus.rs b/crates/zed/src/menus.rs index bb519c7a9505bc2de07fa60c70014be3b4fbc169..2c16d4ba8bedb12033e6d1163c9ff59c2fc48a14 100644 --- a/crates/zed/src/menus.rs +++ b/crates/zed/src/menus.rs @@ -140,6 +140,7 @@ pub fn menus() -> Vec> { MenuItem::action("View Telemetry Log", crate::OpenTelemetryLog), MenuItem::action("View Dependency Licenses", crate::OpenLicenses), MenuItem::separator(), + MenuItem::action("Give us feedback", feedback::feedback_editor::GiveFeedback), MenuItem::action( "Copy System Specs Into Clipboard", feedback::CopySystemSpecsIntoClipboard, diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 26989102e4221dcca3fdcef447271d4b232a7feb..d742c733e52e275aa26f10ee9034831bc66528ad 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -340,10 +340,7 @@ pub fn initialize_workspace( activity_indicator::ActivityIndicator::new(workspace, app_state.languages.clone(), cx); let active_buffer_language = cx.add_view(|_| language_selector::ActiveBufferLanguage::new()); let cursor_position = cx.add_view(|_| editor::items::CursorPosition::new()); - let feedback_button = - cx.add_view(|_| feedback::deploy_feedback_button::DeployFeedbackButton {}); workspace.status_bar().update(cx, |status_bar, cx| { - status_bar.add_left_item(feedback_button, cx); status_bar.add_left_item(diagnostic_summary, cx); status_bar.add_left_item(activity_indicator, cx); status_bar.add_right_item(active_buffer_language, cx);