Skip to content

Commit

Permalink
title_bar: Remove dependency on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdeviant committed Nov 21, 2024
1 parent 4c7b48b commit 18913c7
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/feedback/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ db.workspace = true
editor.workspace = true
futures.workspace = true
gpui.workspace = true
human_bytes = "0.4.1"
http_client.workspace = true
human_bytes = "0.4.1"
language.workspace = true
log.workspace = true
menu.workspace = true
Expand All @@ -39,6 +39,7 @@ ui.workspace = true
urlencoding = "2.1.2"
util.workspace = true
workspace.workspace = true
zed_actions.workspace = true

[dev-dependencies]
editor = { workspace = true, features = ["test-support"] }
2 changes: 0 additions & 2 deletions crates/feedback/src/feedback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ use workspace::Workspace;

pub mod feedback_modal;

actions!(feedback, [GiveFeedback, SubmitFeedback]);

mod system_specs;

actions!(
Expand Down
3 changes: 2 additions & 1 deletion crates/feedback/src/feedback_modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ use serde_derive::Serialize;
use ui::{prelude::*, Button, ButtonStyle, IconPosition, Tooltip};
use util::ResultExt;
use workspace::{DismissDecision, ModalView, Workspace};
use zed_actions::feedback::GiveFeedback;

use crate::{system_specs::SystemSpecs, GiveFeedback, OpenZedRepo};
use crate::{system_specs::SystemSpecs, OpenZedRepo};

// For UI testing purposes
const SEND_SUCCESS_IN_DEV_MODE: bool = true;
Expand Down
1 change: 0 additions & 1 deletion crates/title_bar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ test-support = [
auto_update.workspace = true
call.workspace = true
client.workspace = true
feedback.workspace = true
feature_flags.workspace = true
gpui.workspace = true
notifications.workspace = true
Expand Down
5 changes: 4 additions & 1 deletion crates/title_bar/src/application_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ impl Render for ApplicationMenu {
url: "https://zed.dev/docs".into(),
}),
)
.action("Give Feedback", Box::new(feedback::GiveFeedback))
.action(
"Give Feedback",
Box::new(zed_actions::feedback::GiveFeedback),
)
.action("Check for Updates", Box::new(auto_update::Check))
.action("View Telemetry", Box::new(zed_actions::OpenTelemetryLog))
.action(
Expand Down
2 changes: 1 addition & 1 deletion crates/zed/src/zed/app_menus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pub fn app_menus() -> Vec<Menu> {
MenuItem::action("View Telemetry", zed_actions::OpenTelemetryLog),
MenuItem::action("View Dependency Licenses", zed_actions::OpenLicenses),
MenuItem::action("Show Welcome", workspace::Welcome),
MenuItem::action("Give Feedback...", feedback::GiveFeedback),
MenuItem::action("Give Feedback...", zed_actions::feedback::GiveFeedback),
MenuItem::separator(),
MenuItem::action(
"Documentation",
Expand Down
6 changes: 6 additions & 0 deletions crates/zed_actions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ pub mod command_palette {
actions!(command_palette, [Toggle]);
}

pub mod feedback {
use gpui::actions;

actions!(feedback, [GiveFeedback]);
}

pub mod theme_selector {
use gpui::impl_actions;
use serde::Deserialize;
Expand Down

0 comments on commit 18913c7

Please sign in to comment.