Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Dec 19, 2024
1 parent c521f5d commit 820df7b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 2 additions & 0 deletions components/src/hardware-sim/DeckConfigurator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import { MagneticBlockFixture } from './MagneticBlockFixture'
import { ThermocyclerFixture } from './ThermocyclerFixture'
import { AbsorbanceReaderFixture } from './AbsorbanceReaderFixture'

export * from './constants'

interface DeckConfiguratorProps {
deckConfig: DeckConfiguration
handleClickAdd: (cutoutId: CutoutId) => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"magnet_height_caption": "Must be between {{low}} to {{high}}.",
"magnet_recommended": "The recommended height is {{default}}",
"manually": "Manually",
"mix": "Mix",
"module_and_slot": "{{moduleLongName}} in Slot {{slotName}}",
"n_steps_selected": "{{n}} steps selected",
"networking": {
Expand Down
15 changes: 9 additions & 6 deletions protocol-designer/src/ui/labware/selectors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { createSelector } from 'reselect'
import mapValues from 'lodash/mapValues'
import reduce from 'lodash/reduce'
import {
TRASH_BIN_DISPLAY_NAME,
WASTE_CHUTE_DISPLAY_NAME,
} from '@opentrons/components'
import {

Check failure on line 8 in protocol-designer/src/ui/labware/selectors.ts

View workflow job for this annotation

GitHub Actions / js checks

Import "RobotType" is only used as types

Check failure on line 8 in protocol-designer/src/ui/labware/selectors.ts

View workflow job for this annotation

GitHub Actions / js checks

Import "RobotType" is only used as types
FLEX_ROBOT_TYPE,
OT2_ROBOT_TYPE,
Expand All @@ -23,8 +27,6 @@ import type {
SavedStepFormState,
} from '../../step-forms'

const TRASH_BIN = 'Trash bin'

export const getLabwareNicknamesById: Selector<
Record<string, string>
> = createSelector(
Expand All @@ -42,8 +44,8 @@ export const _sortLabwareDropdownOptions = (
): DropdownOption[] =>
options.sort((a, b) => {
// special case for trash (always at the bottom of the list)
if (a.name === TRASH_BIN) return 1
if (b.name === TRASH_BIN) return -1
if (a.name === TRASH_BIN_DISPLAY_NAME) return 1
if (b.name === TRASH_BIN_DISPLAY_NAME) return -1
// sort by name everything else by name
return a.name.localeCompare(b.name)
})
Expand Down Expand Up @@ -106,6 +108,7 @@ export const getMoveLabwareOptions: Selector<DropdownOption[]> = createSelector(
)?.location
const robotType =
trashBinLocation === 'cutout12' ? OT2_ROBOT_TYPE : FLEX_ROBOT_TYPE

const moveLabwareOptions = reduce(
labwareEntities,
(
Expand Down Expand Up @@ -226,7 +229,7 @@ export const getWasteChuteOption: Selector<DropdownOption | null> = createSelect
const wasteChuteOption: DropdownOption | null =
wasteChuteEntity != null
? {
name: 'Waste chute',
name: WASTE_CHUTE_DISPLAY_NAME,
value: wasteChuteEntity.id,
}
: null
Expand All @@ -250,7 +253,7 @@ export const getDisposalOptions = createSelector(
? [
...acc,
{
name: TRASH_BIN,
name: TRASH_BIN_DISPLAY_NAME,
value: additionalEquipment.id ?? '',
},
]
Expand Down
3 changes: 2 additions & 1 deletion protocol-designer/src/ui/labware/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getHasWasteChute } from '@opentrons/step-generation'
import { WASTE_CHUTE_DISPLAY_NAME } from '@opentrons/components'
import {

Check failure on line 3 in protocol-designer/src/ui/labware/utils.ts

View workflow job for this annotation

GitHub Actions / js checks

Import "RobotType" is only used as types

Check failure on line 3 in protocol-designer/src/ui/labware/utils.ts

View workflow job for this annotation

GitHub Actions / js checks

Import "RobotType" is only used as types
FLEX_ROBOT_TYPE,
RobotType,
Expand Down Expand Up @@ -57,7 +58,7 @@ export function getLabwareLatestSlot(
hasWasteChute &&
(initialSlot === 'D3' || moveLabwareStep?.newLocation === 'D3')
) {
return 'Waste chute'
return WASTE_CHUTE_DISPLAY_NAME
}

if (moveLabwareStep?.newLocation != null) {
Expand Down

0 comments on commit 820df7b

Please sign in to comment.