Skip to content

Commit 40e0033

Browse files
authored
Improved Breakage Form (#196)
1 parent 9f4f108 commit 40e0033

File tree

300 files changed

+2253
-1618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+2253
-1618
lines changed
Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

debugger/settings.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ const keys = Object.keys(states);
1212
/**
1313
* @type {Screen[]}
1414
*/
15-
const validInitialScreens = [
16-
'breakageForm',
17-
'promptBreakageForm',
18-
'toggleReport',
19-
'choiceBreakageForm',
20-
'categoryTypeSelection',
21-
'categorySelection',
22-
'primaryScreen',
23-
];
15+
const validInitialScreens = ['breakageForm', 'breakageFormFinalStep', 'toggleReport', 'primaryScreen'];
2416
const screens = Object.fromEntries(validInitialScreens.map((x) => [x, x]));
2517

2618
const items = [

global.types.d.ts

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
import { AndroidBreakageDialog } from './v2/android-breakage-dialog';
2-
3-
declare global {
4-
namespace preact.JSX {
5-
interface IntrinsicElements {
6-
'ddg-android-breakage-dialog': {
7-
items: [string, string][];
8-
title: string;
9-
cancelText: string;
10-
okText: string;
11-
ref: import('preact').RefObject<AndroidBreakageDialog | null>;
12-
};
13-
}
14-
}
15-
}
1+
/* Example declaration of a custom element
2+
*
3+
* import { AndroidBreakageDialog } from './v2/android-breakage-dialog';
4+
*
5+
* declare global {
6+
* namespace preact.JSX {
7+
* interface IntrinsicElements {
8+
* 'ddg-android-breakage-dialog': {
9+
* items: [string, string][];
10+
* title: string;
11+
* cancelText: string;
12+
* okText: string;
13+
* ref: import('preact').RefObject<AndroidBreakageDialog | null>;
14+
* };
15+
* }
16+
* }
17+
* }
18+
*/
1619

1720
export {};

guides/breakage-flows.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,27 @@ title: Breakage flows
44

55
# Breakage flows
66

7-
### Flow 1: Show Category-type selection when 'Website not working?' is clicked
7+
### Flow 1: Open primary breakage reporting screen (category type selection)
88

99
Open the dashboard with the following query params
1010

11-
- `breakageScreen=categoryTypeSelection`
11+
- `screen=breakageForm`
1212

13-
### Flow 2: Show Category selection when 'Website not working?' is clicked
13+
### Flow 2: Open secondary ategory selection directly (like from a menu)
1414

1515
Open the dashboard with the following query params
1616

17-
- `breakageScreen=categorySelection`
17+
- `screen=breakageFormCategorySelection`
1818

19-
### Flow 3: Open Category-type selection directly (like from a menu)
19+
### Flow 3: Open the final screen of the Breakage Form directly:
2020

2121
Open the dashboard with the following query params
2222

23-
- `screen=categoryTypeSelection`
24-
25-
### Flow 4: Open Category selection directly (like from a menu)
26-
27-
Open the dashboard with the following query params
28-
29-
- `screen=categorySelection`
30-
31-
### Flow 5: Open the new Breakage Form directly:
32-
33-
Open the dashboard with the following query params
34-
35-
- `screen=choiceBreakageForm`
23+
- `screen=breakageFormFinalStep`
3624
- `category=videos` (this can be any valid category value)
3725

38-
### Flow 6: Open the new Breakage Form directly
26+
### Flow 4: Open the final screen of the Breakage Form directly:
3927

4028
Open the dashboard with the following query params
4129

42-
- `screen=choiceBreakageForm`
30+
- `screen=breakageFormFinalStep`

integration-tests/AltBreakageFlows.js

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)