Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Improve GitHub Issue template for Environment (#22147)

Peter Tripp5b2653a1d1ab
diff --git a/.github/ISSUE_TEMPLATE/0_feature_request.yml b/.github/ISSUE_TEMPLATE/0_feature_request.yml
index 7aa135df35b..900df46e7a5 100644
--- a/.github/ISSUE_TEMPLATE/0_feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/0_feature_request.yml
@@ -18,8 +18,11 @@ body:
- type: textarea
id: environment
attributes:
- label: Environment
- description: Run the `copy system specs into clipboard` command palette action and paste the output in the field below. If you are unable to run the command, please include your Zed version and release channel, operating system and version, RAM amount, and architecture.
+ label: Zed Version and System Specs
+ description: Zed version, release channel, architecture (x86_64 or aarch64), OS (macOS version / Linux distro and version) and RAM amount.
+ placeholder: |
+ <!-- In Zed run `copy system specs into clipboard` from the Zed command palette and paste here. -->
+ <!-- Alternatively spawn `request feature` and this field will be autopopulated -->
validations:
required: true
- type: textarea
diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yml b/.github/ISSUE_TEMPLATE/1_bug_report.yml
index c86aebf2e44..3a26baa7397 100644
--- a/.github/ISSUE_TEMPLATE/1_bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/1_bug_report.yml
@@ -20,8 +20,13 @@ body:
- type: textarea
id: environment
attributes:
- label: Environment
- description: Run the `copy system specs into clipboard` command palette action and paste the output in the field below. If you are unable to run the command, please include your Zed version and release channel, operating system and version, RAM amount, and architecture.
+ label: Zed Version and System Specs
+ description: Zed version, release channel, architecture (x86_64 or aarch64), OS (macOS version / Linux distro and version) and RAM amount.
+ placeholder: |
+ <!-- In Zed run `copy system specs into clipboard` from the Zed command palette and paste here. -->
+ <!-- Alternatively spawn `file bug report` and this field will be autopopulated -->
+ <!-- If Zed won't launch, include the equivalent with other relevant details (e.g. video card driver version for display bugs, etc) -->
+ <!-- Zed Version: 0.xxx.x; Channel: Stable, OS: macOS xx.xx, RAM: XXGB, Architecture: x86_64"
validations:
required: true
- type: textarea
diff --git a/crates/feedback/src/feedback.rs b/crates/feedback/src/feedback.rs
index f802a0950d6..eaa87b8501d 100644
--- a/crates/feedback/src/feedback.rs
+++ b/crates/feedback/src/feedback.rs
@@ -21,13 +21,26 @@ const fn zed_repo_url() -> &'static str {
"https://github.com/zed-industries/zed"
}
-const fn request_feature_url() -> &'static str {
- "https://github.com/zed-industries/zed/issues/new?assignees=&labels=admin+read%2Ctriage%2Cenhancement&projects=&template=0_feature_request.yml"
+fn request_feature_url(specs: &SystemSpecs) -> String {
+ format!(
+ concat!(
+ "https://github.com/zed-industries/zed/issues/new",
+ "?labels=admin+read%2Ctriage%2Cenhancement",
+ "&template=0_feature_request.yml",
+ "&environment={}"
+ ),
+ urlencoding::encode(&specs.to_string())
+ )
}
fn file_bug_report_url(specs: &SystemSpecs) -> String {
format!(
- "https://github.com/zed-industries/zed/issues/new?assignees=&labels=admin+read%2Ctriage%2Cbug&projects=&template=1_bug_report.yml&environment={}",
+ concat!(
+ "https://github.com/zed-industries/zed/issues/new",
+ "?labels=admin+read%2Ctriage%2Cbug",
+ "&template=1_bug_report.yml",
+ "&environment={}"
+ ),
urlencoding::encode(&specs.to_string())
)
}
@@ -57,7 +70,15 @@ pub fn init(cx: &mut AppContext) {
.detach();
})
.register_action(|_, _: &RequestFeature, cx| {
- cx.open_url(request_feature_url());
+ let specs = SystemSpecs::new(cx);
+ cx.spawn(|_, mut cx| async move {
+ let specs = specs.await;
+ cx.update(|cx| {
+ cx.open_url(&request_feature_url(&specs));
+ })
+ .log_err();
+ })
+ .detach();
})
.register_action(move |_, _: &FileBugReport, cx| {
let specs = SystemSpecs::new(cx);