blob: a7b0920772d2e061f20d69fd872b76f85e9b1941 [file] [log] [blame]
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +01001// Copyright 2022 The Chromium Authors
Adrià Vilanova Martínezac4a6442022-05-15 19:05:13 +02002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// this const is used on issue wizard lading page for render user role options
6export enum IssueWizardPersona {
7 EndUser = "EndUser",
8 Developer = "Developer",
9 Contributor = "Contributor",
10};
11
12
13export const ISSUE_WIZARD_PERSONAS_DETAIL = Object.freeze({
14 [IssueWizardPersona.EndUser]: {
15 name: 'End User',
16 description: 'I am trying to use a website.',
17 },
18 [IssueWizardPersona.Developer]: {
19 name: 'Web Developer',
20 description: 'I am trying to build something on a website.',
21 },
22 [IssueWizardPersona.Contributor]: {
23 name: 'Chromium Contributor',
24 description: 'I know about a problem in specific tests or code.',
25 }
26});
27
28export enum CustomQuestionType {
29 EMPTY, // this is used to define there is no subquestions
30 Text,
31 Input,
32 Select,
33}
34export type CustomQuestion = {
35 type: CustomQuestionType,
36 question: string,
37 answerPrefix?: string,
38 tip?: string,
39 options?: string[],
40 subQuestions?: CustomQuestion[] | null,
41};
42
43export type IssueCategory = {
44 name: string,
45 description: string,
46 persona: IssueWizardPersona,
47 enabled: boolean,
48 tip?: string,
49 component?: string,
50 customQuestions?: CustomQuestion[],
51 labels?: Array<string>,
52};
53
54export type SelectMenuOption = {
55 name: string,
56 description?: string,
57};