Skip to content

Commit af6f12d

Browse files
Laurie T. Malaujldec
authored andcommitted
add error field
1 parent 0945a99 commit af6f12d

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

components/dashboard/src/Analytics.tsx

Lines changed: 2 additions & 0 deletions
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,7 @@ export interface TrackFeedback {
4041
feedback: string;
4142
href: string;
4243
path: string;
44+
error_rendered?: string | StartWorkspaceError | undefined;
4345
}
4446
interface TrackDashboardClick {
4547
dnt?: boolean;

components/dashboard/src/components/ErrorMessage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function ErrorMessage(props: { imgSrc: string; imgAlt?: string; message: string
2424
initialSize={24}
2525
isError={true}
2626
isModal={false}
27+
error_rendered={props.message}
2728
/>
2829
)}
2930
</>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ 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_rendered?: string | StartWorkspaceError;
2022
}) {
2123
const [text, setText] = useState<string>("");
2224
const [selectedEmoji, setSelectedEmoji] = useState<number | undefined>();
@@ -35,6 +37,7 @@ function FeedbackComponent(props: {
3537
feedback: text,
3638
href: window.location.href,
3739
path: window.location.pathname,
40+
error_rendered: props.isError ? props.error_rendered : undefined,
3841
};
3942
trackEvent("feedback_submitted", feedbackObj);
4043
}

components/dashboard/src/start/CreateWorkspace.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ function RepositoryNotFoundView(p: { error: StartWorkspaceError }) {
440440
message={"Was this error message helpful?"}
441441
isError={true}
442442
initialSize={24}
443+
error_rendered={p.error}
443444
/>
444445
)}
445446
</StartPage>

0 commit comments

Comments
 (0)