Skip to content

Commit 71892cc

Browse files
authored
feat(app): remove 2 track events (#18879)
* feat(app): remove 2 track events
1 parent 60df23c commit 71892cc

File tree

4 files changed

+2
-42
lines changed

4 files changed

+2
-42
lines changed

app/src/organisms/ODD/QuickTransferFlow/QuickTransferAdvancedSettings/index.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect, useState } from 'react'
1+
import { useState } from 'react'
22
import { useTranslation } from 'react-i18next'
33

44
import {
@@ -19,8 +19,6 @@ import {
1919
} from '@opentrons/shared-data'
2020

2121
import { useToaster } from '/app/organisms/ToasterOven'
22-
import { useTrackEventWithRobotSerial } from '/app/redux-resources/analytics'
23-
import { ANALYTICS_QUICK_TRANSFER_ADVANCED_SETTINGS_TAB } from '/app/redux/analytics'
2422

2523
import { ACTIONS } from '../constants'
2624
import { AirGap } from './AirGap'
@@ -49,16 +47,8 @@ export function QuickTransferAdvancedSettings(
4947
const { state, dispatch } = props
5048
const { t, i18n } = useTranslation(['quick_transfer', 'shared'])
5149
const [selectedSetting, setSelectedSetting] = useState<string | null>(null)
52-
const { trackEventWithRobotSerial } = useTrackEventWithRobotSerial()
5350
const { makeSnackbar } = useToaster()
5451

55-
useEffect(() => {
56-
trackEventWithRobotSerial({
57-
name: ANALYTICS_QUICK_TRANSFER_ADVANCED_SETTINGS_TAB,
58-
properties: {},
59-
})
60-
}, [])
61-
6252
const getBlowoutValueCopy = (): string | undefined => {
6353
if (state.blowOutDispense?.location === 'dest_well') {
6454
return t('blow_out_into_destination_well')

app/src/organisms/ODD/QuickTransferFlow/TipManagement/index.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect, useState } from 'react'
1+
import { useState } from 'react'
22
import { useTranslation } from 'react-i18next'
33

44
import {
@@ -17,9 +17,6 @@ import {
1717
} from '@opentrons/components'
1818
import { TRASH_BIN_ADAPTER_FIXTURE } from '@opentrons/shared-data'
1919

20-
import { useTrackEventWithRobotSerial } from '/app/redux-resources/analytics'
21-
import { ANALYTICS_QUICK_TRANSFER_TIP_MANAGEMENT_TAB } from '/app/redux/analytics'
22-
2320
import { ChangeTip } from './ChangeTip'
2421
import { TipDropLocation } from './TipDropLocation'
2522

@@ -37,16 +34,8 @@ interface TipManagementProps {
3734
export function TipManagement(props: TipManagementProps): JSX.Element | null {
3835
const { state, dispatch } = props
3936
const { t } = useTranslation(['quick_transfer', 'shared'])
40-
const { trackEventWithRobotSerial } = useTrackEventWithRobotSerial()
4137
const [selectedSetting, setSelectedSetting] = useState<string | null>(null)
4238

43-
useEffect(() => {
44-
trackEventWithRobotSerial({
45-
name: ANALYTICS_QUICK_TRANSFER_TIP_MANAGEMENT_TAB,
46-
properties: {},
47-
})
48-
}, [])
49-
5039
const displayItems = [
5140
{
5241
option: t('change_tip'),

app/src/organisms/ODD/QuickTransferFlow/__tests__/TipManagement/TipManagement.test.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
33

44
import { renderWithProviders } from '/app/__testing-utils__'
55
import { i18n } from '/app/i18n'
6-
import { useTrackEventWithRobotSerial } from '/app/redux-resources/analytics'
7-
import { ANALYTICS_QUICK_TRANSFER_TIP_MANAGEMENT_TAB } from '/app/redux/analytics'
86

97
import { TipManagement } from '../../TipManagement/'
108
import { ChangeTip } from '../../TipManagement/ChangeTip'
@@ -14,14 +12,12 @@ import type { ComponentProps } from 'react'
1412

1513
vi.mock('../../TipManagement/ChangeTip')
1614
vi.mock('../../TipManagement/TipDropLocation')
17-
vi.mock('/app/redux-resources/analytics')
1815

1916
const render = (props: ComponentProps<typeof TipManagement>): any => {
2017
return renderWithProviders(<TipManagement {...props} />, {
2118
i18nInstance: i18n,
2219
})
2320
}
24-
let mockTrackEventWithRobotSerial: any
2521

2622
describe('TipManagement', () => {
2723
let props: ComponentProps<typeof TipManagement>
@@ -36,12 +32,6 @@ describe('TipManagement', () => {
3632
} as any,
3733
dispatch: vi.fn(),
3834
}
39-
mockTrackEventWithRobotSerial = vi.fn(
40-
() => new Promise(resolve => resolve({}))
41-
)
42-
vi.mocked(useTrackEventWithRobotSerial).mockReturnValue({
43-
trackEventWithRobotSerial: mockTrackEventWithRobotSerial,
44-
})
4535
})
4636
afterEach(() => {
4737
vi.resetAllMocks()
@@ -53,10 +43,6 @@ describe('TipManagement', () => {
5343
screen.getByText('Once at the start of the transfer')
5444
screen.getByText('Tip drop location')
5545
screen.getByText('Trash bin')
56-
expect(mockTrackEventWithRobotSerial).toHaveBeenCalledWith({
57-
name: ANALYTICS_QUICK_TRANSFER_TIP_MANAGEMENT_TAB,
58-
properties: {},
59-
})
6046
})
6147
it('renders Change tip component when seleted', () => {
6248
render(props)

app/src/redux/analytics/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ export const ANALYTICS_QUICK_TRANSFER_FLOW_STARTED = 'quickTransferFlowStarted'
8282
export const ANALYTICS_QUICK_TRANSFER_WELL_SELECTION_DURATION =
8383
'quickTransferWellSelectionDuration'
8484
export const ANALYTICS_QUICK_TRANSFER_EXIT_EARLY = 'quickTransferExitEarly'
85-
// ToDo(kk:04/11/2025) the following two tab events will be removed when ff is removed
86-
export const ANALYTICS_QUICK_TRANSFER_ADVANCED_SETTINGS_TAB =
87-
'quickTransferAdvancedSettingsTab'
88-
export const ANALYTICS_QUICK_TRANSFER_TIP_MANAGEMENT_TAB =
89-
'quickTransferTipManagementTab'
9085
export const ANALYTICS_QUICK_TRANSFER_SETTING_SAVED =
9186
'quickTransferSettingSaved'
9287
export const ANALYTICS_QUICK_TRANSFER_TIME_TO_CREATE =

0 commit comments

Comments
 (0)