feedback: Update issue template URL (#28790)
Closes #28782 The linked template path was updated in #28250. This PR also adds the change to the zed action. Since the issue template link was also referenced in workspace, I updated that occurrence to use the `FileBugReport` action instead. For that, I had to move the action to `zed_actions`. However, with this change only one link has to be updated and any database related errors will have the zed version specs attached to them automatically. Release Notes: - Fixed an issue where the `file bug report` action would redirect to an outdated URL.
This commit is contained in:
@@ -106,6 +106,7 @@ use uuid::Uuid;
|
||||
pub use workspace_settings::{
|
||||
AutosaveSetting, BottomDockLayout, RestoreOnStartupBehavior, TabBarSettings, WorkspaceSettings,
|
||||
};
|
||||
use zed_actions::feedback::FileBugReport;
|
||||
|
||||
use crate::notifications::NotificationId;
|
||||
use crate::persistence::{
|
||||
@@ -5395,8 +5396,6 @@ enum ActivateInDirectionTarget {
|
||||
}
|
||||
|
||||
fn notify_if_database_failed(workspace: WindowHandle<Workspace>, cx: &mut AsyncApp) {
|
||||
const REPORT_ISSUE_URL: &str = "https://github.com/zed-industries/zed/issues/new?assignees=&labels=admin+read%2Ctriage%2Cbug&projects=&template=1_bug_report.yml";
|
||||
|
||||
workspace
|
||||
.update(cx, |workspace, _, cx| {
|
||||
if (*db::ALL_FILE_DB_FAILED).load(std::sync::atomic::Ordering::Acquire) {
|
||||
@@ -5410,7 +5409,9 @@ fn notify_if_database_failed(workspace: WindowHandle<Workspace>, cx: &mut AsyncA
|
||||
MessageNotification::new("Failed to load the database file.", cx)
|
||||
.primary_message("File an Issue")
|
||||
.primary_icon(IconName::Plus)
|
||||
.primary_on_click(|_window, cx| cx.open_url(REPORT_ISSUE_URL))
|
||||
.primary_on_click(|window, cx| {
|
||||
window.dispatch_action(Box::new(FileBugReport), cx)
|
||||
})
|
||||
})
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user