From c3c1b080ba30cf9e5ba333a8b2e71185f47b0d4c Mon Sep 17 00:00:00 2001
From: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com>
Date: Tue, 18 Jul 2023 11:28:42 -0700
Subject: [PATCH] feat(replays): add count_rage_clicks and count_dead_clicks
search fields (#53096)
Closes #52803 by making `count_rage_clicks `and `count_dead_clicks`
searchable in the replays list.
---
fixtures/js-stubs/replayRecord.ts | 2 ++
static/app/utils/fields/index.ts | 14 ++++++++++++++
static/app/views/replays/types.tsx | 8 ++++++++
3 files changed, 24 insertions(+)
diff --git a/fixtures/js-stubs/replayRecord.ts b/fixtures/js-stubs/replayRecord.ts
index 1e5a0c34d9c08..a375afbd50903 100644
--- a/fixtures/js-stubs/replayRecord.ts
+++ b/fixtures/js-stubs/replayRecord.ts
@@ -9,6 +9,8 @@ export function ReplayRecord(replayRecord: Partial = {}): TReplay
name: 'Other',
version: '',
},
+ count_dead_clicks: 1,
+ count_rage_clicks: 1,
count_errors: 1,
count_segments: 14,
count_urls: 1,
diff --git a/static/app/utils/fields/index.ts b/static/app/utils/fields/index.ts
index 0851fb79185f3..4a38a581165ef 100644
--- a/static/app/utils/fields/index.ts
+++ b/static/app/utils/fields/index.ts
@@ -1179,6 +1179,8 @@ export enum ReplayFieldKey {
ACTIVITY = 'activity',
BROWSER_NAME = 'browser.name',
BROWSER_VERSION = 'browser.version',
+ COUNT_DEAD_CLICKS = 'count_dead_clicks',
+ COUNT_RAGE_CLICKS = 'count_rage_clicks',
COUNT_ERRORS = 'count_errors',
COUNT_SEGMENTS = 'count_segments',
COUNT_URLS = 'count_urls',
@@ -1214,6 +1216,8 @@ export const REPLAY_FIELDS = [
ReplayFieldKey.ACTIVITY,
ReplayFieldKey.BROWSER_NAME,
ReplayFieldKey.BROWSER_VERSION,
+ ReplayFieldKey.COUNT_DEAD_CLICKS,
+ ReplayFieldKey.COUNT_RAGE_CLICKS,
ReplayFieldKey.COUNT_ERRORS,
ReplayFieldKey.COUNT_SEGMENTS,
ReplayFieldKey.COUNT_URLS,
@@ -1256,6 +1260,16 @@ const REPLAY_FIELD_DEFINITIONS: Record = {
kind: FieldKind.FIELD,
valueType: FieldValueType.STRING,
},
+ [ReplayFieldKey.COUNT_DEAD_CLICKS]: {
+ desc: t('Number of dead clicks in the replay'),
+ kind: FieldKind.FIELD,
+ valueType: FieldValueType.INTEGER,
+ },
+ [ReplayFieldKey.COUNT_RAGE_CLICKS]: {
+ desc: t('Number of rage clicks in the replay'),
+ kind: FieldKind.FIELD,
+ valueType: FieldValueType.INTEGER,
+ },
[ReplayFieldKey.COUNT_ERRORS]: {
desc: t('Number of errors in the replay'),
kind: FieldKind.FIELD,
diff --git a/static/app/views/replays/types.tsx b/static/app/views/replays/types.tsx
index 2ce50b07ae79e..c8a02ec1a50ed 100644
--- a/static/app/views/replays/types.tsx
+++ b/static/app/views/replays/types.tsx
@@ -14,10 +14,18 @@ export type ReplayRecord = {
name: null | string;
version: null | string;
};
+ /**
+ * The number of dead clicks associated with the replay.
+ */
+ count_dead_clicks: number;
/**
* The number of errors associated with the replay.
*/
count_errors: number;
+ /**
+ * The number of rage clicks associated with the replay.
+ */
+ count_rage_clicks: number;
/**
* The number of segments that make up the replay.
*/