Skip to content

Commit

Permalink
fix(app, labware library): prevent white screen when opening adapter …
Browse files Browse the repository at this point in the history
…definitions (#13063)
  • Loading branch information
shlokamin authored Jul 24, 2023
1 parent 8380fb7 commit 6584665
Show file tree
Hide file tree
Showing 69 changed files with 42 additions and 354 deletions.
3 changes: 1 addition & 2 deletions app/src/organisms/LabwareDetails/Dimensions.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import round from 'lodash/round'
import { Box, SPACING } from '@opentrons/components'
import { Box, SPACING, getFootprintDiagram } from '@opentrons/components'
import { LabeledValue } from './StyledComponents/LabeledValue'
import { ExpandingTitle } from './StyledComponents/ExpandingTitle'
import { getFootprintDiagram } from './measurementGuide'
import type { LabwareDefinition } from '../../pages/Labware/types'

const toFixed = (n: number): string => round(n, 2).toFixed(2)
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/LabwareDetails/InsertDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import { Box, SPACING, BORDERS, TYPOGRAPHY } from '@opentrons/components'
import { getUniqueWellProperties } from '@opentrons/shared-data'
import { StyledText } from '../../atoms/text'
import { getUniqueWellProperties } from './helpers/labwareInference'
import { getWellLabel } from './helpers/labels'
import { WellProperties } from './WellProperties'
import { WellDimensions } from './WellDimensions'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from 'react'
import { fireEvent } from '@testing-library/react'
import { renderWithProviders } from '@opentrons/components'
import { getFootprintDiagram } from '../../measurementGuide'
import { renderWithProviders, getFootprintDiagram } from '@opentrons/components'
import { ExpandingTitle } from '../ExpandingTitle'

const render = (props: React.ComponentProps<typeof ExpandingTitle>) => {
Expand Down
3 changes: 1 addition & 2 deletions app/src/organisms/LabwareDetails/WellDimensions.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import round from 'lodash/round'
import { Box, SPACING } from '@opentrons/components'
import { Box, SPACING, getMeasurementDiagram } from '@opentrons/components'
import { LabeledValue } from './StyledComponents/LabeledValue'
import { ExpandingTitle } from './StyledComponents/ExpandingTitle'
import { getMeasurementDiagram } from './measurementGuide'

import type {
LabwareWellGroupProperties,
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/LabwareDetails/WellSpacing.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import round from 'lodash/round'
import { getSpacingDiagram } from '@opentrons/components'
import { LabeledValue } from './StyledComponents/LabeledValue'
import { ExpandingTitle } from './StyledComponents/ExpandingTitle'
import { getSpacingDiagram } from './measurementGuide'

import type { LabwareWellGroupProperties } from '../../pages/Labware/types'

Expand Down
79 changes: 0 additions & 79 deletions app/src/organisms/LabwareDetails/helpers/labwareInference.ts

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/organisms/LabwareDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import {
useHoverTooltip,
TOOLTIP_TOP_START,
} from '@opentrons/components'
import { getUniqueWellProperties } from '@opentrons/shared-data'
import { StyledText } from '../../atoms/text'
import { Slideout } from '../../atoms/Slideout'
import { Tooltip } from '../../atoms/Tooltip'
import { getWellLabel } from './helpers/labels'
import { getUniqueWellProperties } from './helpers/labwareInference'
import { WellCount } from './WellCount'
import { WellProperties } from './WellProperties'
import { Dimensions } from './Dimensions'
Expand Down
174 changes: 0 additions & 174 deletions app/src/organisms/LabwareDetails/measurementGuide/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions components/src/images/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './labware'
1 change: 1 addition & 0 deletions components/src/images/labware/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './measurement-guide'
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ const FOOTPRINT_DIAGRAMS: Diagrams = {
require('./images/dimensions/[email protected]'),
require('./images/dimensions/[email protected]'),
],
adapter: [
require('./images/dimensions/[email protected]'),
require('./images/dimensions/[email protected]'),
],
}

const ALUM_BLOCK_FOOTPRINTS: Diagrams = {
Expand Down
1 change: 1 addition & 0 deletions components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export * from './hardware-sim'
export * from './legacy-hardware-sim'
export * from './forms'
export * from './icons'
export * from './images'
export * from './instrument'
export * from './interaction-enhancers'
export * from './lists'
Expand Down
Loading

0 comments on commit 6584665

Please sign in to comment.