Skip to content

Commit

Permalink
Improved Breakage Form
Browse files Browse the repository at this point in the history
  • Loading branch information
mgurgel committed Nov 19, 2024
1 parent df7d26b commit 978c26c
Show file tree
Hide file tree
Showing 163 changed files with 2,199 additions and 1,503 deletions.
12 changes: 12 additions & 0 deletions build/app/img/refresh-assets/Success-128.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/app/img/refresh-assets/chrevron--down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 1 addition & 9 deletions debugger/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ const keys = Object.keys(states);
/**
* @type {Screen[]}
*/
const validInitialScreens = [
'breakageForm',
'promptBreakageForm',
'toggleReport',
'choiceBreakageForm',
'categoryTypeSelection',
'categorySelection',
'primaryScreen',
];
const validInitialScreens = ['breakageForm', 'breakageFormFinalStep', 'toggleReport', 'primaryScreen'];
const screens = Object.fromEntries(validInitialScreens.map((x) => [x, x]));

const items = [
Expand Down
33 changes: 18 additions & 15 deletions global.types.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import { AndroidBreakageDialog } from './v2/android-breakage-dialog';

declare global {
namespace preact.JSX {
interface IntrinsicElements {
'ddg-android-breakage-dialog': {
items: [string, string][];
title: string;
cancelText: string;
okText: string;
ref: import('preact').RefObject<AndroidBreakageDialog | null>;
};
}
}
}
/* Example declaration of a custom element
*
* import { AndroidBreakageDialog } from './v2/android-breakage-dialog';
*
* declare global {
* namespace preact.JSX {
* interface IntrinsicElements {
* 'ddg-android-breakage-dialog': {
* items: [string, string][];
* title: string;
* cancelText: string;
* okText: string;
* ref: import('preact').RefObject<AndroidBreakageDialog | null>;
* };
* }
* }
* }
*/

export {};
28 changes: 8 additions & 20 deletions guides/breakage-flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,27 @@ title: Breakage flows

# Breakage flows

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

Open the dashboard with the following query params

- `breakageScreen=categoryTypeSelection`
- `screen=breakageForm`

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

Open the dashboard with the following query params

- `breakageScreen=categorySelection`
- `screen=breakageFormCategorySelection`

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

Open the dashboard with the following query params

- `screen=categoryTypeSelection`

### Flow 4: Open Category selection directly (like from a menu)

Open the dashboard with the following query params

- `screen=categorySelection`

### Flow 5: Open the new Breakage Form directly:

Open the dashboard with the following query params

- `screen=choiceBreakageForm`
- `screen=breakageFormFinalStep`
- `category=videos` (this can be any valid category value)

### Flow 6: Open the new Breakage Form directly
### Flow 4: Open the final screen of the Breakage Form directly:

Open the dashboard with the following query params

- `screen=choiceBreakageForm`
- `screen=breakageFormFinalStep`
97 changes: 0 additions & 97 deletions integration-tests/AltBreakageFlows.js

This file was deleted.

Loading

0 comments on commit 978c26c

Please sign in to comment.