Skip to content

Commit

Permalink
feat: add interaction components to schema (#19040)
Browse files Browse the repository at this point in the history
* feat: add interaction components to schema

* expand radio

* liek this

* Update query snapshots

* Update query snapshots

* like this

* Update ee/frontend/mobile-replay/mobile.types.ts

Co-authored-by: Manoel Aranda Neto <[email protected]>

* Update ee/frontend/mobile-replay/mobile.types.ts

Co-authored-by: Manoel Aranda Neto <[email protected]>

* Update ee/frontend/mobile-replay/mobile.types.ts

Co-authored-by: Manoel Aranda Neto <[email protected]>

* Update ee/frontend/mobile-replay/mobile.types.ts

Co-authored-by: Manoel Aranda Neto <[email protected]>

* Update ee/frontend/mobile-replay/mobile.types.ts

Co-authored-by: Manoel Aranda Neto <[email protected]>

* Update ee/frontend/mobile-replay/mobile.types.ts

Co-authored-by: Manoel Aranda Neto <[email protected]>

* collapse unnecessary name

* gen the schema

---------

Co-authored-by: test-python <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Manoel Aranda Neto <[email protected]>
  • Loading branch information
4 people authored Dec 5, 2023
1 parent ce09b80 commit dcde879
Show file tree
Hide file tree
Showing 2 changed files with 399 additions and 1 deletion.
58 changes: 57 additions & 1 deletion ee/frontend/mobile-replay/mobile.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,51 @@ type wireframeBase = {
style?: MobileStyles
}

export type wireframeInputBase = wireframeBase & {
type: 'input'
disabled: boolean
}

export type wireframeCheckBox = wireframeInputBase & {
inputType: 'checkbox'
checked: boolean
label?: string
}

export type wireframeRadioGroup = wireframeBase & {
groupName: string
}

export type wireframeRadio = wireframeInputBase & {
inputType: 'radio'
checked: boolean
label?: string
}

export type wireframeInput = wireframeInputBase & {
inputType: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url'
value?: string
}

export type wireframeSelect = wireframeInputBase & {
inputType: 'select'
value?: string
options?: string[]
}

export type wireframeTextArea = wireframeInputBase & {
inputType: 'textarea'
value?: string
}

export type wireframeButton = wireframeInputBase & {
inputType: 'button'
/**
* @description this is the text that is displayed on the button, if not sent then you must send childNodes with the button content
*/
value?: string
}

export type wireframeText = wireframeBase & {
type: 'text'
text: string
Expand All @@ -146,7 +191,18 @@ export type wireframeDiv = wireframeBase & {
type: 'div'
}

export type wireframe = wireframeText | wireframeImage | wireframeRectangle | wireframeDiv
export type wireframe =
| wireframeText
| wireframeImage
| wireframeRectangle
| wireframeDiv
| wireframeCheckBox
| wireframeRadioGroup
| wireframeRadio
| wireframeInput
| wireframeSelect
| wireframeTextArea
| wireframeButton

// the rrweb full snapshot event type, but it contains wireframes not html
export type fullSnapshotEvent = {
Expand Down
Loading

0 comments on commit dcde879

Please sign in to comment.