Skip to content

Commit 6887607

Browse files
author
Laurie T. Malau
committed
[dashboard] Send error body with feedback
1 parent b60c458 commit 6887607

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

components/dashboard/src/Analytics.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { log } from "@gitpod/gitpod-protocol/lib/util/logging";
99
import Cookies from "js-cookie";
1010
import { v4 } from "uuid";
1111
import { Experiment } from "./experiments";
12+
import { StartWorkspaceError } from "./start/StartPage";
1213

1314
export type Event =
1415
| "invite_url_requested"
@@ -40,6 +41,8 @@ export interface TrackFeedback {
4041
feedback: string;
4142
href: string;
4243
path: string;
44+
error_object?: StartWorkspaceError;
45+
error_message?: string;
4346
}
4447
interface TrackDashboardClick {
4548
dnt?: boolean;

components/dashboard/src/components/ErrorMessage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function ErrorMessage(props: { imgSrc: string; imgAlt?: string; message: string
2222
initialSize={24}
2323
isError={true}
2424
isModal={false}
25+
error_message={props.message}
2526
/>
2627
)}
2728
</>

components/dashboard/src/feedback-form/FeedbackComponent.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ import happy from "../images/feedback/happy-emoji.svg";
1010
import meh from "../images/feedback/meh-emoji.svg";
1111
import crying from "../images/feedback/crying-emoji.svg";
1212
import { trackEvent } from "../Analytics";
13+
import { StartWorkspaceError } from "../start/StartPage";
1314

1415
function FeedbackComponent(props: {
1516
onClose?: () => void;
1617
isModal: boolean;
1718
isError: boolean;
1819
message?: string;
1920
initialSize?: number;
21+
error_object?: StartWorkspaceError;
22+
error_message?: string;
2023
}) {
2124
const [text, setText] = useState<string>("");
2225
const [selectedEmoji, setSelectedEmoji] = useState<number | undefined>();
@@ -35,6 +38,8 @@ function FeedbackComponent(props: {
3538
feedback: text,
3639
href: window.location.href,
3740
path: window.location.pathname,
41+
error_object: props.error_object || undefined,
42+
error_message: props.error_message,
3843
};
3944
trackEvent("feedback_submitted", feedbackObj);
4045
}

components/dashboard/src/start/CreateWorkspace.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ function RepositoryNotFoundView(p: { error: StartWorkspaceError }) {
515515
message={"Was this error message helpful?"}
516516
isError={true}
517517
initialSize={24}
518+
error_object={p.error}
519+
error_message={p.error.message}
518520
/>
519521
)}
520522
</StartPage>

0 commit comments

Comments
 (0)