Skip to content

Commit 394188c

Browse files
authored
App wire up lpc redesign (#17850)
Closes EXEC-1297, EXEC-1307, and EXEC-1306 This PR wires up the redesigned LPC flows to the app, both the desktop and ODD, removing the FF.
1 parent 217cdb9 commit 394188c

File tree

124 files changed

+2864
-1785
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+2864
-1785
lines changed

api-client/src/runs/addLabwareOffsetToRun.ts

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,39 @@ import { POST, request } from '../request'
22

33
import type { ResponsePromise } from '../request'
44
import type { HostConfig } from '../types'
5-
import type { LabwareOffset, LegacyLabwareOffsetCreateData } from './types'
5+
import type {
6+
LabwareOffset,
7+
LegacyLabwareOffsetCreateData,
8+
LabwareOffsetCreateData,
9+
} from './types'
610

711
export function addLabwareOffsetToRun(
812
config: HostConfig,
913
runId: string,
10-
data: LegacyLabwareOffsetCreateData
14+
data: LegacyLabwareOffsetCreateData | LabwareOffsetCreateData
1115
): ResponsePromise<LabwareOffset>
1216
export function addLabwareOffsetToRun(
1317
config: HostConfig,
1418
runId: string,
15-
data: LegacyLabwareOffsetCreateData[]
19+
data: LegacyLabwareOffsetCreateData[] | LabwareOffsetCreateData[]
1620
): ResponsePromise<LabwareOffset[]>
1721
export function addLabwareOffsetToRun(
1822
config: HostConfig,
1923
runId: string,
20-
data: LegacyLabwareOffsetCreateData | LegacyLabwareOffsetCreateData[]
24+
data:
25+
| LegacyLabwareOffsetCreateData
26+
| LegacyLabwareOffsetCreateData[]
27+
| LabwareOffsetCreateData
28+
| LabwareOffsetCreateData[]
2129
): ResponsePromise<LabwareOffset | LabwareOffset[]> {
2230
return request<
2331
LabwareOffset | LabwareOffset[],
24-
{ data: LegacyLabwareOffsetCreateData | LegacyLabwareOffsetCreateData[] }
32+
{
33+
data:
34+
| LegacyLabwareOffsetCreateData
35+
| LegacyLabwareOffsetCreateData[]
36+
| LabwareOffsetCreateData
37+
| LabwareOffsetCreateData[]
38+
}
2539
>(POST, `/runs/${runId}/labware_offsets`, { data }, config)
2640
}

api-client/src/runs/createRun.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import type {
77
LegacyLabwareOffsetCreateData,
88
RunTimeParameterValuesCreateData,
99
RunTimeParameterFilesCreateData,
10+
LabwareOffsetCreateData,
1011
} from './types'
1112

1213
export interface CreateRunData {
1314
protocolId?: string
14-
labwareOffsets?: LegacyLabwareOffsetCreateData[]
15+
labwareOffsets?: LegacyLabwareOffsetCreateData[] | LabwareOffsetCreateData[]
1516
runTimeParameterValues?: RunTimeParameterValuesCreateData
1617
runTimeParameterFiles?: RunTimeParameterFilesCreateData
1718
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"gripper_successfully_detached": "Gripper successfully detached",
3131
"help_us_improve_send_error_report": "Help us improve your experience by sending an error report to support",
3232
"ip_description_second": "Work with your network administrator to assign a static IP address to the robot.",
33+
"labware_offsets_conflict_description": "Your robot's stored labware offsets were updated after the last protocol run on <strong>{{timestamp}}</strong>. Which offsets do you want to use to run this protocol again?",
3334
"language_preference_description": "The app matches your system language unless you select another language below. You can change the language later in the app settings.",
3435
"learn_uninstalling": "Learn more about uninstalling the app",
3536
"loosen_screws_and_detach": "Loosen screws and detach gripper",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"gripper_successfully_detached": "Flex Gripper successfully detached",
3131
"help_us_improve_send_error_report": "Help us improve your experience by sending an error report to {{support_email}}",
3232
"ip_description_second": "Opentrons recommends working with your network administrator to assign a static IP address to the robot.",
33+
"labware_offsets_conflict_description": "Your Flex's stored labware offsets were updated after the last protocol run on <strong>{{timestamp}}</strong>. Which offsets do you want to use to run this protocol again?",
3334
"language_preference_description": "The Opentrons App matches your system language unless you select another language below. You can change the language later in the app settings.",
3435
"learn_uninstalling": "Learn more about uninstalling the Opentrons App",
3536
"loosen_screws_and_detach": "Loosen screws and detach Flex Gripper",

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"confirm_position_and_return_tip": "Confirm position, return tip to Slot {{next_slot}} and home",
4040
"confirm_removal": "Confirm removal",
4141
"continue": "Continue",
42+
"custom": "Custom",
4243
"default": "Default",
4344
"default_labware_offset": "Default Labware Offset",
4445
"detach_probe": "Remove calibration probe",
@@ -119,10 +120,12 @@
119120
"no_offset_data": "No offset data",
120121
"no_offset_data_available": "No labware offset data available",
121122
"no_offset_data_on_robot": "This robot has no useable labware offset data for this run.",
123+
"not_applicable": "N/A",
122124
"num_missing_offsets": "{{num}} missing offsets",
123125
"num_offsets": "{{num}} offsets",
124126
"offset_values": "X {{x}}, Y {{y}}, Z {{z}}",
125127
"offsets": "Offsets",
128+
"offsets_already_applied": "Labware offsets already applied",
126129
"one_missing_offset": "1 missing offset",
127130
"one_offset": "1 offset",
128131
"pick_up_tip_from_rack_in_location": "Pick up tip from tip rack in {{location}}",
@@ -149,7 +152,6 @@
149152
"robot_has_offsets_from_previous_runs": "This robot has offsets for labware used in this protocol. If you apply these offsets, you can still adjust them with Labware Position Check.",
150153
"robot_in_motion": "Stand back, robot is in motion.",
151154
"run": "Run",
152-
"run_labware_position_check": "run labware position check",
153155
"save": "Save",
154156
"secondary_pipette_tipracks_section": "Check tip racks with {{secondary_mount}} Pipette",
155157
"see_how_offsets_work": "See how labware offsets work",

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

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
"adapter_slot_location": "Slot {{slotName}}, {{adapterName}}",
55
"adapter_slot_location_module": "Slot {{slotName}}, {{adapterName}} on {{moduleName}}",
66
"add_fixture": "Add {{fixtureName}} to {{locationName}}",
7+
"add_missing_labware_offsets": "Add missing labware offsets",
78
"add_this_deck_hardware": "Add this hardware to your deck configuration. It will be referenced during protocol analysis.",
89
"add_to_slot": "Add to slot {{slotName}}",
910
"additional_labware": "{{count}} additional labware",
1011
"additional_off_deck_labware": "Additional Off-Deck Labware",
1112
"all_files_associated": "All files associated with the protocol run are available on the robot detail screen.",
1213
"applied_labware_offset_data": "Applied labware offset data",
1314
"applied_labware_offsets": "applied labware offsets",
15+
"apply_offsets": "Apply offsets",
1416
"are_you_sure_you_want_to_proceed": "Are you sure you want to proceed to run?",
1517
"attach": "attach",
1618
"attach_gripper": "attach gripper",
@@ -53,7 +55,6 @@
5355
"confirm_heater_shaker_module_modal_title": "Confirm Heater-Shaker Module is attached",
5456
"confirm_liquids": "Confirm liquids",
5557
"confirm_locations_and_volumes": "Confirm locations and volumes",
56-
"confirm_offsets": "Confirm offsets",
5758
"confirm_placements": "Confirm placements",
5859
"confirm_selection": "Confirm selection",
5960
"confirm_values": "Confirm values",
@@ -62,6 +63,7 @@
6263
"connect_modules_for_controls": "Connect modules to see controls",
6364
"connection_info_not_available": "Connection info not available once run has started",
6465
"connection_status": "Connection Status",
66+
"count_offsets_applied": "{{count}} offsets applied",
6567
"csv_file": "CSV File",
6668
"csv_files_on_robot": "CSV files on robot",
6769
"csv_files_on_usb": "CSV files on USB",
@@ -85,6 +87,7 @@
8587
"extension_mount": "extension mount",
8688
"extra_attention_warning_title": "Secure labware and modules before proceeding to run",
8789
"extra_module_attached": "Extra module attached",
90+
"failed_to_apply_offsets": "Failed to apply offsets",
8891
"feedback_form_link": "Let us know!",
8992
"fixture": "Fixture",
9093
"fixture_name": "fixture",
@@ -112,20 +115,23 @@
112115
"labware_latch_instructions": "Use latch control for easy placement of labware.",
113116
"labware_location": "Labware Location",
114117
"labware_name": "Labware name",
118+
"labware_offsets": "Labware Offsets",
119+
"labware_offsets_conflict": "Labware offsets conflict",
115120
"labware_placement": "labware placement",
116121
"labware_position_check": "Labware Position Check",
117122
"labware_position_check_not_available": "Labware Position Check is not available after run has started",
118123
"labware_position_check_not_available_analyzing_on_robot": "Labware Position Check is not available while protocol is analyzing on robot",
119124
"labware_position_check_not_available_empty_protocol": "Labware Position Check requires that the protocol loads labware and pipettes",
120-
"labware_position_check_step_description": "Recommended workflow that helps you verify the position of each labware on the deck.",
121-
"labware_position_check_step_title": "Labware Position Check",
122-
"labware_position_check_text": "Labware Position Check is a recommended workflow that helps you verify the position of each labware on the deck. During this check, you can create Labware Offsets that adjust how the robot moves to each labware in the X, Y and Z directions.",
125+
"labware_position_check_step_description": "Verify the position of each labware on the deck and apply offsets for greater precision in your protocol.",
126+
"labware_position_check_step_title": "Labware Offsets",
123127
"labware_quantity": "Quantity: {{quantity}}",
124128
"labware_setup_step_description": "Gather the following labware and full tip racks. To run your protocol without Labware Position Check, place and secure labware in their initial locations.",
125129
"labware_setup_step_title": "Labware",
130+
"labware_type": "Labware Type",
126131
"last_calibrated": "Last calibrated: {{date}}",
127132
"learn_how_it_works": "Learn how it works",
128133
"learn_more": "Learn more",
134+
"learn_more_about_labware_offsets": "Learn more about labware offsets",
129135
"learn_more_about_offset_data": "Learn more about Labware Offset Data",
130136
"learn_more_about_robot_cal_link": "Learn more about robot calibration",
131137
"liquid_information": "Liquid information",
@@ -189,10 +195,12 @@
189195
"no_data": "no data",
190196
"no_deck_hardware_specified": "No deck hardware are specified for this protocol.",
191197
"no_files_found": "No files found",
192-
"no_labware_offset_data": "no labware offset data yet",
198+
"no_labware_offset_data": "No labware offsets used in run",
193199
"no_modules_or_fixtures": "No modules or fixtures are specified for this protocol.",
194200
"no_modules_specified": "no modules are specified for this protocol.",
195201
"no_modules_used_in_this_protocol": "No hardware used in this protocol",
202+
"no_offsets_found": "Run Labware Position Check to set missing offsets",
203+
"no_offsets_in_run": "No labware offsets are required for this protocol.",
196204
"no_parameters_specified": "No parameters specified",
197205
"no_parameters_specified_in_protocol": "No parameters specified in this protocol",
198206
"no_tiprack_loaded": "Protocol must load a tip rack",
@@ -202,11 +210,18 @@
202210
"no_usb_required": "No USB required",
203211
"not_calibrated": "Not calibrated yet",
204212
"not_configured": "not configured",
213+
"num_missing_offsets": "{{num}} missing offsets",
214+
"num_offsets_applied": "{{num}} offsets applied",
205215
"off": "Off",
206216
"off_deck": "Off deck",
217+
"offset": "Offset",
207218
"offset_data": "Offset Data",
208-
"offsets_applied": "{{count}} offsets applied",
209-
"offsets_confirmed": "Offsets confirmed",
219+
"offset_type": "Offset Type",
220+
"offsets_already_applied": "Offsets already applied",
221+
"offsets_applied": "Offsets applied",
222+
"offsets_missing": "Offsets missing",
223+
"offsets_not_applied": "Offsets not applied",
224+
"offsets_not_required": "Offsets not required",
210225
"offsets_ready": "Offsets ready",
211226
"on": "On",
212227
"on-deck_labware": "{{count}} on-deck labware",
@@ -271,7 +286,7 @@
271286
"run_disabled_calibration_not_complete": "Make sure robot calibration is complete before proceeding to run",
272287
"run_disabled_modules_and_calibration_not_complete": "Make sure robot calibration is complete and all modules are connected before proceeding to run",
273288
"run_disabled_modules_not_connected": "Make sure all modules are connected before proceeding to run",
274-
"run_labware_position_check": "run labware position check",
289+
"run_labware_position_check": "Run Labware Position Check",
275290
"run_labware_position_check_to_get_offsets": "Run Labware Position Check to get your labware offset data.",
276291
"run_never_started": "Run was never started",
277292
"secure": "Secure",
@@ -293,14 +308,16 @@
293308
"tip_length_cal_title": "Tip Length Calibration",
294309
"tip_length_calibration": "tip length calibration",
295310
"total_liquid_volume": "Total volume",
311+
"total_offsets": "Total Offsets",
296312
"update_deck": "Update deck",
297313
"update_deck_config": "Update deck configuration",
298-
"update_offsets": "Update offsets",
299314
"updated": "Updated",
300315
"usb_connected_no_port_info": "USB Port Connected",
301316
"usb_drive_notification": "Leave USB drive attached until run starts",
302317
"usb_port_connected": "USB Port {{port}}",
303318
"usb_port_number": "USB-{{port}}",
319+
"use_previous_run_offsets": "Use previous run's offsets",
320+
"use_updated_offsets": "Use updated offsets",
304321
"value": "Value",
305322
"value_out_of_range": "Value must be between {{min}}-{{max}}",
306323
"value_out_of_range_generic": "Value must be in range",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const LPC_HREF =
2+
'https://support.opentrons.com/s/article/How-positional-calibration-works-on-the-OT-2'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './constants'

app/src/molecules/DeckInfoLabelTextTag/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
DISPLAY_GRID,
77
Flex,
88
FLEX_MAX_CONTENT,
9-
JUSTIFY_END,
109
JUSTIFY_FLEX_START,
10+
JUSTIFY_START,
1111
RESPONSIVENESS,
1212
SPACING,
1313
StyledText,
@@ -74,7 +74,7 @@ const LABEL_CONTAINER_STYLE = css`
7474
`
7575

7676
const TAG_CONTAINER_STYLE = css`
77-
justify-self: ${JUSTIFY_END};
77+
justify-self: ${JUSTIFY_START};
7878
7979
@media (max-width: 450px) {
8080
justify-self: ${JUSTIFY_FLEX_START};

app/src/organisms/Desktop/ChooseProtocolSlideout/__tests__/ChooseProtocolSlideout.test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { MemoryRouter } from 'react-router-dom'
33
import { fireEvent, screen, waitFor } from '@testing-library/react'
44

55
import {
6+
FLEX_ROBOT_TYPE,
67
OT2_ROBOT_TYPE,
78
simpleAnalysisFileFixture,
89
} from '@opentrons/shared-data'
@@ -18,6 +19,7 @@ import { useTrackCreateProtocolRunEvent } from '/app/organisms/Desktop/Devices/h
1819
import { useCreateRunFromProtocol } from '/app/organisms/Desktop/ChooseRobotToRunProtocolSlideout/useCreateRunFromProtocol'
1920
import { ChooseProtocolSlideout } from '../'
2021
import { useNotifyDataReady } from '/app/resources/useNotifyDataReady'
22+
import { useRobotType } from '/app/redux-resources/robots'
2123

2224
import type { ComponentProps } from 'react'
2325
import type { ProtocolAnalysisOutput } from '@opentrons/shared-data'
@@ -29,6 +31,7 @@ vi.mock('/app/redux/protocol-storage')
2931
vi.mock('/app/organisms/Desktop/Devices/hooks')
3032
vi.mock('/app/redux/config')
3133
vi.mock('/app/resources/useNotifyDataReady')
34+
vi.mock('/app/redux-resources/robots')
3235

3336
const render = (props: ComponentProps<typeof ChooseProtocolSlideout>) => {
3437
return renderWithProviders(
@@ -72,6 +75,7 @@ describe('ChooseProtocolSlideout', () => {
7275
trackCreateProtocolRunEvent: mockTrackCreateProtocolRunEvent,
7376
})
7477
vi.mocked(useNotifyDataReady).mockReturnValue({} as any)
78+
vi.mocked(useRobotType).mockReturnValue(FLEX_ROBOT_TYPE)
7579
})
7680

7781
it('renders slideout if showSlideout true', () => {

0 commit comments

Comments
 (0)