Rework feedback modal (#27186)

After our last community sync, we came to the conclusion that feedback
being sent outside of email is difficult to reply to. Our decision was
to use the old, tried and true email system, so that we can better
respond to people asking questions.

<img width="392" alt="SCR-20250320-igub"
src="https://github.com/user-attachments/assets/f1d01771-30eb-4b6f-b031-c68ddaac5700"
/>

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
Joseph T. Lyons 2025-03-20 10:28:43 -04:00 committed by GitHub
parent 2e8c0ff244
commit d0641a38a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 79 additions and 535 deletions

View file

@ -11,19 +11,18 @@ actions!(
zed,
[
CopySystemSpecsIntoClipboard,
EmailZed,
FileBugReport,
OpenZedRepo,
RequestFeature,
OpenZedRepo
]
);
const fn zed_repo_url() -> &'static str {
"https://github.com/zed-industries/zed"
}
const ZED_REPO_URL: &str = "https://github.com/zed-industries/zed";
fn request_feature_url() -> String {
"https://github.com/zed-industries/zed/discussions/new/choose".to_string()
}
const REQUEST_FEATURE_URL: &str = "https://github.com/zed-industries/zed/discussions/new/choose";
const EMAIL_ZED_URL: &str = "mailto:hi@zed.dev";
fn file_bug_report_url(specs: &SystemSpecs) -> String {
format!(
@ -66,14 +65,8 @@ pub fn init(cx: &mut App) {
})
.detach();
})
.register_action(|_, _: &RequestFeature, window, cx| {
cx.spawn_in(window, async move |_, cx| {
cx.update(|_, cx| {
cx.open_url(&request_feature_url());
})
.log_err();
})
.detach();
.register_action(|_, _: &RequestFeature, _, cx| {
cx.open_url(REQUEST_FEATURE_URL);
})
.register_action(move |_, _: &FileBugReport, window, cx| {
let specs = SystemSpecs::new(window, cx);
@ -86,8 +79,11 @@ pub fn init(cx: &mut App) {
})
.detach();
})
.register_action(move |_, _: &EmailZed, _, cx| {
cx.open_url(EMAIL_ZED_URL);
})
.register_action(move |_, _: &OpenZedRepo, _, cx| {
cx.open_url(zed_repo_url());
cx.open_url(ZED_REPO_URL);
});
})
.detach();