Skip to content

Commit 7b3391c

Browse files
committed
removed console log and random fixes
1 parent 68172a2 commit 7b3391c

File tree

9 files changed

+19
-35
lines changed

9 files changed

+19
-35
lines changed

app/src/resources/deck_configuration/hooks/useDeckConfigurationEditingTools.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useState } from 'react'
22

33
import { useUpdateDeckConfigurationMutation } from '@opentrons/react-api-client'
44
import {
5-
CutoutFixtureIdsWithFakes,
65
FLEX_ROBOT_TYPE,
76
getDeckDefFromRobotType,
87
getReplacementFixtureForFixtureRemoval,
@@ -17,8 +16,8 @@ import { useNotifyDeckConfigurationQuery } from '../useNotifyDeckConfigurationQu
1716
import type { ReactNode } from 'react'
1817
import type {
1918
AddressableAreaNamesWithFakes,
19+
CutoutFixtureIdsWithFakes,
2020
CutoutId,
21-
CutoutFixtureId
2221
} from '@opentrons/shared-data'
2322

2423
const DECK_CONFIG_REFETCH_INTERVAL = 5000
@@ -95,7 +94,6 @@ export function useDeckConfigurationEditingTools(
9594
)
9695
} else {
9796
newDeckConfig = deckConfig.map(cutoutConfig => {
98-
console.log('cutoutConfig: ', cutoutConfig)
9997
return cutoutConfig.cutoutId === cutoutId
10098
? {
10199
...cutoutConfig,

components/src/hardware-sim/DeckConfigurator/AbsorbanceReaderItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { TYPOGRAPHY } from '../../ui-style-constants'
88
import { RobotCoordsForeignObject } from '../Deck/RobotCoordsForeignObject'
99
import {
1010
COLUMN_DEFAULT_X_ADJUSTMENT,
11-
LARGE_SINGLE_ITEM_SLOT_WIDTH,
1211
CONFIG_STYLE_EDITABLE,
1312
CONFIG_STYLE_READ_ONLY,
1413
CONFIG_STYLE_SELECTED,
1514
FIXTURE_HEIGHT,
15+
LARGE_SINGLE_ITEM_SLOT_WIDTH,
1616
Y_ADJUSTMENT,
1717
} from './constants'
1818

components/src/hardware-sim/DeckConfigurator/HeaterShakerItem.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { useTranslation } from 'react-i18next'
22

3-
import {
4-
SINGLE_LEFT_CUTOUTS,
5-
} from '@opentrons/shared-data'
3+
import { SINGLE_LEFT_CUTOUTS } from '@opentrons/shared-data'
64

75
import { StyledText } from '../../atoms/StyledText/StyledText'
86
import { COLORS } from '../../helix-design-system'
@@ -23,10 +21,10 @@ import {
2321
} from './constants'
2422

2523
import type {
24+
AddressableAreaNamesWithFakes,
2625
CutoutFixtureIdsWithFakes,
2726
CutoutId,
2827
DeckDefinition,
29-
AddressableAreaNamesWithFakes,
3028
} from '@opentrons/shared-data'
3129

3230
// TODO(BC, 2024-03-21): This component is almost identical to TemperatureModuleFixture, consider consolidating?

components/src/hardware-sim/DeckConfigurator/MagneticBlockItem.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { useTranslation } from 'react-i18next'
22

3-
import {
4-
SINGLE_LEFT_CUTOUTS,
5-
} from '@opentrons/shared-data'
3+
import { SINGLE_LEFT_CUTOUTS } from '@opentrons/shared-data'
64

75
import { StyledText } from '../../atoms/StyledText/StyledText'
86
import { COLORS } from '../../helix-design-system'
@@ -23,10 +21,10 @@ import {
2321
} from './constants'
2422

2523
import type {
24+
AddressableAreaNamesWithFakes,
2625
CutoutFixtureIdsWithFakes,
2726
CutoutId,
2827
DeckDefinition,
29-
AddressableAreaNamesWithFakes
3028
} from '@opentrons/shared-data'
3129

3230
interface MagneticBlockItemProps {

components/src/hardware-sim/DeckConfigurator/TemperatureModuleItem.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { useTranslation } from 'react-i18next'
22

3-
import {
4-
SINGLE_LEFT_CUTOUTS,
5-
} from '@opentrons/shared-data'
3+
import { SINGLE_LEFT_CUTOUTS } from '@opentrons/shared-data'
64

75
import { StyledText } from '../../atoms/StyledText/StyledText'
86
import { COLORS } from '../../helix-design-system'
@@ -23,10 +21,10 @@ import {
2321
} from './constants'
2422

2523
import type {
24+
AddressableAreaNamesWithFakes,
2625
CutoutFixtureIdsWithFakes,
2726
CutoutId,
2827
DeckDefinition,
29-
AddressableAreaNamesWithFakes
3028
} from '@opentrons/shared-data'
3129

3230
// TODO(BC, 2024-03-21): This component is almost identical to HeaterShakerFixture, consider consolidating?

components/src/hardware-sim/DeckConfigurator/TrashBinConfigItem.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { useTranslation } from 'react-i18next'
22

3-
import {
4-
SINGLE_LEFT_CUTOUTS,
5-
} from '@opentrons/shared-data'
3+
import { SINGLE_LEFT_CUTOUTS } from '@opentrons/shared-data'
64

75
import { StyledText } from '../../atoms/StyledText/StyledText'
86
import { COLORS } from '../../helix-design-system'
@@ -23,10 +21,10 @@ import {
2321
} from './constants'
2422

2523
import type {
24+
AddressableAreaNamesWithFakes,
2625
CutoutFixtureIdsWithFakes,
2726
CutoutId,
2827
DeckDefinition,
29-
AddressableAreaNamesWithFakes
3028
} from '@opentrons/shared-data'
3129

3230
interface TrashBinConfigItemProps {

components/src/hardware-sim/DeckConfigurator/WasteChuteConfigItem.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import { useTranslation } from 'react-i18next'
22

3-
import {
4-
type AddressableAreaNamesWithFakes,
5-
type CutoutFixtureIdsWithFakes,
6-
type CutoutId,
7-
type DeckDefinition,
8-
DEFAULT_AA_FOR_WASTE_CHUTE,
9-
} from '@opentrons/shared-data'
3+
import { DEFAULT_AA_FOR_WASTE_CHUTE } from '@opentrons/shared-data'
104

115
import { StyledText } from '../../atoms/StyledText/StyledText'
126
import { COLORS } from '../../helix-design-system'
@@ -24,6 +18,13 @@ import {
2418
Y_ADJUSTMENT,
2519
} from './constants'
2620

21+
import type {
22+
AddressableAreaNamesWithFakes,
23+
CutoutFixtureIdsWithFakes,
24+
CutoutId,
25+
DeckDefinition,
26+
} from '@opentrons/shared-data'
27+
2728
interface WasteChuteConfigItemProps {
2829
deckDefinition: DeckDefinition
2930
fixtureLocation: CutoutId

shared-data/js/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ export const WASTE_CHUTE_WITH_FAKE_FIXTURES: CutoutFixtureIdsWithFakes[] = [
678678
STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE,
679679
STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
680680
FLEX_STACKER_WTIH_WASTE_CHUTE_ADAPTER_NO_COVER_FIXTURE,
681-
FAKE_WASTE_CHUTE_WITH_EMPTY_SLOT
681+
FAKE_WASTE_CHUTE_WITH_EMPTY_SLOT,
682682
]
683683

684684
export const WASTE_CHUTE_ONLY_FIXTURES: CutoutFixtureId[] = [

shared-data/js/fixtures.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,11 @@ export const getReplacementFixtureForFixtureRemoval = (
415415
if (cutoutFixtureId === STAGING_AREA_RIGHT_SLOT_FIXTURE) {
416416
return SINGLE_RIGHT_SLOT_FIXTURE
417417
} else if (addressableAreaId && SINGLE_RIGHT_CUTOUTS.includes(cutoutId)) {
418-
console.log('addressableAreaId: ', addressableAreaId)
419418
const cutoutFixtureReplacment = replaceCutoutFixtureRemove(
420419
cutoutFixtureId,
421420
cutoutId,
422421
addressableAreaId
423422
)
424-
console.log('cutoutFixtureReplacment: ', cutoutFixtureReplacment)
425423
return getReplacementFixtureForFakeFixture(cutoutFixtureReplacment)
426424
} else if (SINGLE_RIGHT_CUTOUTS.includes(cutoutId)) {
427425
return SINGLE_RIGHT_SLOT_FIXTURE
@@ -897,7 +895,6 @@ export const getAASlotNameForAA = (
897895
const addressableAreasByFIxtureId = getFlexDeckDefAAByFixtureIdForCutoutId(
898896
cutoutId
899897
)
900-
console.log('addressableAreasByFIxtureId: ', addressableAreasByFIxtureId)
901898
const aaListForFixtureId = addressableAreasByFIxtureId[fixtureId] ?? []
902899
const aaMatchInDef = aaListForFixtureId.find(aa => aa === addressableAreaId)
903900
return aaMatchInDef
@@ -989,8 +986,6 @@ export const replaceCutoutFixtureRemove = (
989986
cutoutFixtureRemoved,
990987
deckDef
991988
)
992-
console.log('aaForCutoutAndFixture: ', aaForCutoutAndFixture)
993-
console.log('addressableAreaId: ', addressableAreaId)
994989
if (WASTE_CHUTE_WITH_FAKE_FIXTURES.includes(cutoutFixtureRemoved)) {
995990
if (addressableAreaId === DEFAULT_AA_FOR_WASTE_CHUTE) {
996991
if (
@@ -1010,7 +1005,6 @@ export const replaceCutoutFixtureRemove = (
10101005
? getAASlotNameForAA(cutoutId, cutoutFixtureRemoved, aa)
10111006
: aa
10121007
)
1013-
console.log('updated: ', updated)
10141008
const match = Object.entries(addressableAreasById).find(([, value]) =>
10151009
isEqual(
10161010
value.sort(),
@@ -1019,7 +1013,6 @@ export const replaceCutoutFixtureRemove = (
10191013
: updated?.sort()
10201014
)
10211015
)
1022-
console.log('match: ', match)
10231016

10241017
if (match) {
10251018
return match[0] as CutoutFixtureIdsWithFakes

0 commit comments

Comments
 (0)