Skip to content

Commit 6c322ac

Browse files
committed
refactor(app): Migrate quick transfer dashboard to protocols view (#20493)
Closes AUTH-2561 This commit refactors the UX flow for creating and viewing existing QT protocol runs. The QT Dashboard is removed. Instead, existing QT protocols are accessible from the protocols view. A new button serves as the CTA for creating a new quick transfer. Existing flow behavior is preserved.
1 parent 8db863b commit 6c322ac

32 files changed

+62
-1689
lines changed

app/src/App/OnDeviceDisplayApp.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import { NetworkSetupMenu } from '/app/pages/ODD/NetworkSetupMenu'
3737
import { ProtocolDashboard } from '/app/pages/ODD/ProtocolDashboard'
3838
import { ProtocolDetails } from '/app/pages/ODD/ProtocolDetails'
3939
import { ProtocolSetup } from '/app/pages/ODD/ProtocolSetup'
40-
import { QuickTransferDashboard } from '/app/pages/ODD/QuickTransferDashboard'
4140
import { QuickTransferDetails } from '/app/pages/ODD/QuickTransferDetails'
4241
import { RobotDashboard } from '/app/pages/ODD/RobotDashboard'
4342
import { RobotSettingsDashboard } from '/app/pages/ODD/RobotSettingsDashboard'
@@ -85,7 +84,6 @@ export const ON_DEVICE_DISPLAY_PATHS = [
8584
'/network-setup/wifi',
8685
'/protocols',
8786
'/protocols/:protocolId',
88-
'/quick-transfer',
8987
'/quick-transfer/new',
9088
'/quick-transfer/:quickTransferId',
9189
'/robot-settings',
@@ -126,8 +124,6 @@ function getPathComponent(
126124
return <ProtocolDashboard />
127125
case '/protocols/:protocolId':
128126
return <ProtocolDetails />
129-
case '/quick-transfer':
130-
return <QuickTransferDashboard />
131127
case '/quick-transfer/new':
132128
return <QuickTransferFlow />
133129
case '/quick-transfer/:quickTransferId':

app/src/assets/localization/en/protocol_info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"protocol_title": "Protocol - {{protocol_name}}",
6868
"protocol_upload_failed": "Protocol upload failed. Fix the error and try again",
6969
"protocols": "Protocols",
70+
"quick_transfer": "Quick transfer",
7071
"required_cal_data_title": "Calibration Data",
7172
"required_quantity_title": "Quantity",
7273
"required_type_title": "Type",

app/src/assets/localization/en/quick_transfer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@
138138
"push_out_description": "Helps ensure all liquid leaves the tip",
139139
"push_out_value": "{{volume}} µL",
140140
"push_out_volume": "Push out volume (µL)",
141-
"quick_transfer": "Quick transfer",
142141
"quick_transfer_volume": "Quick Transfer {{volume}}µL",
143142
"reservoir": "Reservoirs",
144143
"reset_kind_settings": "Reset {{transferName}} settings?",

app/src/organisms/ODD/Navigation/__tests__/Navigation.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ describe('Navigation', () => {
5353
const allProtocols = screen.getByRole('link', { name: 'Protocols' })
5454
expect(allProtocols).toHaveAttribute('href', '/protocols')
5555

56-
const quickTransfer = screen.getByRole('link', { name: 'Quick Transfer' })
57-
expect(quickTransfer).toHaveAttribute('href', '/quick-transfer')
58-
5956
const instruments = screen.getByRole('link', { name: 'Instruments' })
6057
expect(instruments).toHaveAttribute('href', '/instruments')
6158

app/src/organisms/ODD/Navigation/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import type { ON_DEVICE_DISPLAY_PATHS } from '/app/App/OnDeviceDisplayApp'
3939

4040
const NAV_LINKS: Array<(typeof ON_DEVICE_DISPLAY_PATHS)[number]> = [
4141
'/protocols',
42-
'/quick-transfer',
4342
'/instruments',
4443
'/robot-settings',
4544
]
@@ -114,8 +113,6 @@ export function Navigation(props: NavigationProps): JSX.Element {
114113
return t('protocols')
115114
case '/robot-settings':
116115
return t('settings')
117-
case '/quick-transfer':
118-
return t('quick_transfer')
119116
default:
120117
return ''
121118
}

app/src/organisms/ODD/QuickTransferFlow/SummaryAndSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function SummaryAndSettings(
140140
files: [protocolFile],
141141
protocolKind: 'quick-transfer',
142142
}).then(() => {
143-
navigate('/quick-transfer')
143+
navigate('/protocols')
144144
})
145145
trackEventWithRobotSerial({
146146
name: ANALYTICS_QUICK_TRANSFER_SAVE_FOR_LATER,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const QuickTransferFlow = (): JSX.Element => {
5353
step: currentStep,
5454
},
5555
})
56-
navigate('/quick-transfer')
56+
navigate('/protocols')
5757
}, true)
5858

5959
const exitButtonProps: ComponentProps<typeof SmallButton> = {

app/src/organisms/ODD/RunningProtocol/ConfirmCancelRunModal/__tests__/ConfirmCancelRunModal.test.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ describe('ConfirmCancelRunModal', () => {
7171
isActiveRun: true,
7272
runId: RUN_ID,
7373
setShowConfirmCancelRunModal: mockFn,
74-
isQuickTransfer: false,
7574
}
7675

7776
vi.mocked(useStopRunMutation).mockReturnValue({
@@ -169,7 +168,6 @@ describe('ConfirmCancelRunModal', () => {
169168
props = {
170169
...props,
171170
isActiveRun: false,
172-
isQuickTransfer: true,
173171
}
174172

175173
vi.mocked(useNotifyRunQuery).mockReturnValue({
@@ -184,14 +182,13 @@ describe('ConfirmCancelRunModal', () => {
184182

185183
expect(mockDismissCurrentRun).toHaveBeenCalled()
186184
expect(mockTrackProtocolRunEvent).toHaveBeenCalled()
187-
expect(mockNavigate).toHaveBeenCalledWith('/quick-transfer')
185+
expect(mockNavigate).toHaveBeenCalledWith('/protocols')
188186
})
189187

190188
it('when quick transfer run with protocolId is stopped, it navigates to protocol-specific quick transfer', () => {
191189
props = {
192190
...props,
193191
isActiveRun: false,
194-
isQuickTransfer: true,
195192
protocolId: 'test-protocol-id',
196193
}
197194

@@ -207,9 +204,7 @@ describe('ConfirmCancelRunModal', () => {
207204

208205
expect(mockDismissCurrentRun).toHaveBeenCalled()
209206
expect(mockTrackProtocolRunEvent).toHaveBeenCalled()
210-
expect(mockNavigate).toHaveBeenCalledWith(
211-
'/quick-transfer/test-protocol-id'
212-
)
207+
expect(mockNavigate).toHaveBeenCalledWith('/protocols/test-protocol-id')
213208
})
214209

215210
it('when run with protocolId is stopped, it navigates to protocol page', () => {

app/src/organisms/ODD/RunningProtocol/ConfirmCancelRunModal/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@ interface ConfirmCancelRunModalProps {
2727
runId: string
2828
setShowConfirmCancelRunModal: (showConfirmCancelRunModal: boolean) => void
2929
isActiveRun: boolean
30-
isQuickTransfer: boolean
3130
protocolId?: string | null
3231
}
3332

3433
export function ConfirmCancelRunModal({
3534
runId,
3635
setShowConfirmCancelRunModal,
3736
isActiveRun,
38-
isQuickTransfer,
3937
protocolId,
4038
}: ConfirmCancelRunModalProps): JSX.Element {
4139
const { t } = useTranslation(['run_details', 'shared'])
@@ -83,11 +81,7 @@ export function ConfirmCancelRunModal({
8381
trackProtocolRunEvent({ name: ANALYTICS_PROTOCOL_RUN_ACTION.CANCEL })
8482
if (!isActiveRun) {
8583
dismissCurrentRun(runId)
86-
if (isQuickTransfer && protocolId != null) {
87-
navigate(`/quick-transfer/${protocolId}`)
88-
} else if (isQuickTransfer) {
89-
navigate('/quick-transfer')
90-
} else if (protocolId != null) {
84+
if (protocolId != null) {
9185
navigate(`/protocols/${protocolId}`)
9286
} else {
9387
navigate('/protocols')

app/src/pages/ODD/QuickTransferDashboard/PipetteNotAttachedErrorModal.tsx renamed to app/src/pages/ODD/ProtocolDashboard/PipetteNotAttachedErrorModal.tsx

File renamed without changes.

0 commit comments

Comments
 (0)