@opentrons/components 0.1.7-alpha.1 → 0.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cssModuleSideEffect.ts +22 -0
- package/lib/assets/localization/en/index.d.ts +12 -0
- package/lib/assets/localization/index.d.ts +12 -0
- package/lib/atoms/AnimationVideo/index.d.ts +13 -0
- package/lib/atoms/InlineNotification/index.d.ts +1 -1
- package/lib/atoms/ListButton/ListButtonChildren/index.d.ts +0 -1
- package/lib/atoms/StyledText/PlaceholderStyledText.d.ts +14 -0
- package/lib/atoms/StyledText/index.d.ts +1 -0
- package/lib/atoms/buttons/BasicButton.d.ts +12 -0
- package/lib/atoms/buttons/index.d.ts +1 -0
- package/lib/atoms/index.d.ts +1 -0
- package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +10 -8
- package/lib/hardware-sim/Deck/FlexTrash.d.ts +4 -1
- package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +3 -2
- package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +6 -5
- package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +8 -5
- package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +11 -1
- package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +30 -14
- package/lib/hardware-sim/Deck/__tests__/resolveLabwareLocation.test.d.ts +1 -0
- package/lib/hardware-sim/Deck/resolveLabwareLocation.d.ts +20 -0
- package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/EmptyConfigItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/FlexStackerItem.d.ts +12 -0
- package/lib/hardware-sim/DeckConfigurator/HeaterShakerItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/MagneticBlockItem.d.ts +12 -0
- package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/{StaticFixture.d.ts → StaticItem.d.ts} +1 -1
- package/lib/hardware-sim/DeckConfigurator/TemperatureModuleItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/ThermocyclerItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/TrashBinConfigItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/constants.d.ts +5 -8
- package/lib/hardware-sim/DeckConfigurator/index.d.ts +4 -3
- package/lib/hardware-sim/Labware/CalibrationBlockRender.d.ts +15 -0
- package/lib/hardware-sim/Labware/Labware.d.ts +7 -8
- package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +2 -2
- package/lib/hardware-sim/Labware/LabwareRender.d.ts +46 -5
- package/lib/hardware-sim/Labware/index.d.ts +1 -0
- package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +3 -4
- package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +20 -9
- package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +1 -2
- package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +2 -2
- package/lib/hardware-sim/Module/index.d.ts +24 -2
- package/lib/hardware-sim/Pipette/PipetteRender.d.ts +2 -2
- package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +5 -3
- package/lib/hocs/withStyleProps.d.ts +26 -0
- package/lib/hooks/useConditionalConfirm.d.ts +4 -0
- package/lib/icons/Icon.d.ts +7 -7
- package/lib/icons/ModuleIcon.d.ts +4 -3
- package/lib/instrument/index.d.ts +0 -2
- package/lib/legacy-hardware-sim/index.d.ts +0 -1
- package/lib/lists/index.d.ts +0 -1
- package/lib/molecules/CustomizeExpandButton/__tests__/CustomizeExpandButton.test.d.ts +1 -0
- package/lib/molecules/CustomizeExpandButton/index.d.ts +29 -0
- package/lib/molecules/DeckInfoLabel/index.d.ts +8 -16
- package/lib/molecules/index.d.ts +2 -1
- package/lib/organisms/CommandText/index.d.ts +2 -2
- package/lib/organisms/CommandText/useCommandTextString/index.d.ts +2 -2
- package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareDefinitionsFromCommands.d.ts +2 -2
- package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareLocation.d.ts +3 -3
- package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareName.d.ts +2 -2
- package/lib/organisms/FixtureOption/index.d.ts +2 -2
- package/lib/organisms/ProtocolDeck/index.d.ts +10 -0
- package/lib/organisms/ProtocolTimelineScrubber/CommandItem.d.ts +2 -2
- package/lib/organisms/ProtocolTimelineScrubber/utils.d.ts +2 -2
- package/lib/organisms/index.d.ts +1 -0
- package/lib/primitives/ForeignObject.d.ts +8 -18
- package/lib/primitives/style-props.d.ts +1 -1
- package/lib/structure/index.d.ts +2 -3
- package/package.json +6 -3
- package/src/alerts/alerts.module.css +2 -2
- package/src/assets/localization/en/deck_configuration.json +12 -0
- package/src/assets/localization/en/index.ts +2 -0
- package/src/assets/localization/en/protocol_command_text.json +1 -1
- package/src/atoms/AnimationVideo/__tests__/AnimationVideo.test.tsx +40 -0
- package/src/atoms/AnimationVideo/index.tsx +44 -0
- package/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx +0 -3
- package/src/atoms/CheckboxField/index.tsx +1 -1
- package/src/atoms/InlineNotification/index.tsx +86 -70
- package/src/atoms/ListButton/ListButton.stories.tsx +21 -7
- package/src/atoms/ListButton/ListButtonChildren/index.ts +0 -1
- package/src/atoms/ListItem/ListItemChildren/ListItemDescriptor.tsx +2 -2
- package/src/atoms/MenuList/OverflowBtn.tsx +39 -41
- package/src/atoms/Snackbar/Snackbar.stories.tsx +59 -23
- package/src/atoms/Snackbar/index.tsx +48 -38
- package/src/atoms/StyledText/PlaceholderStyledText.tsx +46 -0
- package/src/atoms/StyledText/index.ts +1 -0
- package/src/atoms/StyledText/placeholderstyledtext.module.css +25 -0
- package/src/atoms/buttons/BasicButton.tsx +100 -0
- package/src/atoms/buttons/SecondaryButton.tsx +5 -2
- package/src/atoms/buttons/__tests__/BasicButton.test.tsx +87 -0
- package/src/atoms/buttons/buttons.stories.tsx +91 -55
- package/src/atoms/buttons/index.ts +1 -0
- package/src/atoms/index.ts +1 -0
- package/src/buttons/buttons.module.css +92 -92
- package/src/controls/styles.module.css +15 -15
- package/src/forms/Select.module.css +23 -23
- package/src/forms/forms.module.css +38 -37
- package/src/hardware-sim/BaseDeck/BaseDeck.stories.tsx +7 -7
- package/src/hardware-sim/BaseDeck/BaseDeck.tsx +98 -61
- package/src/hardware-sim/BaseDeck/WasteChuteFixture.tsx +22 -28
- package/src/hardware-sim/BaseDeck/basedeck.module.css +20 -0
- package/src/hardware-sim/Deck/FlexTrash.tsx +50 -30
- package/src/hardware-sim/Deck/MoveLabwareOnDeck.stories.tsx +2 -2
- package/src/hardware-sim/Deck/MoveLabwareOnDeck.tsx +122 -156
- package/src/hardware-sim/Deck/RobotCoordsForeignDiv.tsx +35 -27
- package/src/hardware-sim/Deck/RobotCoordsForeignObject.tsx +32 -29
- package/src/hardware-sim/Deck/RobotCoordsText.tsx +12 -11
- package/src/hardware-sim/Deck/RobotWorkSpace.tsx +74 -54
- package/src/hardware-sim/Deck/SlotLabels.tsx +51 -51
- package/src/hardware-sim/Deck/__tests__/resolveLabwareLocation.test.ts +138 -0
- package/src/hardware-sim/Deck/deck.module.css +54 -0
- package/src/hardware-sim/Deck/resolveLabwareLocation.ts +154 -0
- package/src/hardware-sim/DeckConfigurator/{FlexStackerFixture.tsx → AbsorbanceReaderItem.tsx} +34 -31
- package/src/hardware-sim/DeckConfigurator/{EmptyConfigFixture.tsx → EmptyConfigItem.tsx} +72 -44
- package/src/hardware-sim/DeckConfigurator/{AbsorbanceReaderFixture.tsx → FlexStackerItem.tsx} +46 -27
- package/src/hardware-sim/DeckConfigurator/{HeaterShakerFixture.tsx → HeaterShakerItem.tsx} +40 -28
- package/src/hardware-sim/DeckConfigurator/{MagneticBlockFixture.tsx → MagneticBlockItem.tsx} +41 -58
- package/src/hardware-sim/DeckConfigurator/{StagingAreaConfigFixture.tsx → StagingAreaConfigItem.tsx} +41 -23
- package/src/hardware-sim/DeckConfigurator/{StaticFixture.tsx → StaticItem.tsx} +16 -9
- package/src/hardware-sim/DeckConfigurator/{TemperatureModuleFixture.tsx → TemperatureModuleItem.tsx} +42 -26
- package/src/hardware-sim/DeckConfigurator/{ThermocyclerFixture.tsx → ThermocyclerItem.tsx} +31 -21
- package/src/hardware-sim/DeckConfigurator/{TrashBinConfigFixture.tsx → TrashBinConfigItem.tsx} +42 -27
- package/src/hardware-sim/DeckConfigurator/{WasteChuteConfigFixture.tsx → WasteChuteConfigItem.tsx} +38 -27
- package/src/hardware-sim/DeckConfigurator/constants.ts +5 -9
- package/src/hardware-sim/DeckConfigurator/index.tsx +236 -206
- package/src/hardware-sim/Labware/CalibrationBlockRender.stories.tsx +49 -0
- package/src/hardware-sim/Labware/CalibrationBlockRender.tsx +172 -0
- package/src/hardware-sim/Labware/Labware.tsx +30 -15
- package/src/hardware-sim/Labware/LabwareAdapter/index.tsx +2 -2
- package/src/hardware-sim/Labware/LabwareRender.stories.tsx +36 -21
- package/src/hardware-sim/Labware/LabwareRender.tsx +70 -15
- package/src/hardware-sim/Labware/__tests__/Labware.test.tsx +9 -4
- package/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx +14 -5
- package/src/hardware-sim/Labware/index.ts +1 -0
- package/src/hardware-sim/Labware/labware.module.css +8 -0
- package/src/hardware-sim/Labware/labwareInternals/FilledWells.tsx +3 -4
- package/src/hardware-sim/Labware/labwareInternals/LabwareOutline.tsx +48 -23
- package/src/hardware-sim/Labware/labwareInternals/LabwareWellLabels.tsx +3 -3
- package/src/hardware-sim/Labware/labwareInternals/StaticLabware.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/StrokedWells.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/StyledWells.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/Well.tsx +1 -2
- package/src/hardware-sim/Labware/labwareInternals/WellLabels.tsx +10 -11
- package/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx +2 -2
- package/src/hardware-sim/Module/Module.stories.tsx +45 -15
- package/src/hardware-sim/Module/Thermocycler/index.tsx +2 -2
- package/src/hardware-sim/Module/index.tsx +41 -18
- package/src/hardware-sim/Pipette/PipetteRender.stories.tsx +2 -2
- package/src/hardware-sim/Pipette/PipetteRender.tsx +5 -7
- package/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx +2 -2
- package/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.tsx +15 -14
- package/src/hardware-sim/RobotCoordinateSpace/robotcoordinatespace.module.css +3 -0
- package/src/hocs/withStyleProps.ts +53 -0
- package/src/hooks/useConditionalConfirm.ts +15 -5
- package/src/icons/Icon.tsx +38 -29
- package/src/icons/ModuleIcon.tsx +5 -3
- package/src/icons/icon-data.ts +26 -2
- package/src/icons/icon.module.css +10 -0
- package/src/index.module.css +1 -0
- package/src/instrument/InstrumentDiagram.tsx +0 -2
- package/src/instrument/PipetteSelect.module.css +3 -3
- package/src/instrument/index.ts +0 -2
- package/src/legacy-hardware-sim/LabwareNameOverlay.module.css +5 -5
- package/src/legacy-hardware-sim/ModuleItem.module.css +19 -19
- package/src/legacy-hardware-sim/index.ts +0 -1
- package/src/lists/index.ts +0 -1
- package/src/lists/lists.module.css +23 -23
- package/src/modals/modals.module.css +55 -55
- package/src/molecules/CustomizeExpandButton/__tests__/CustomizeExpandButton.test.tsx +88 -0
- package/src/molecules/CustomizeExpandButton/index.tsx +189 -0
- package/src/molecules/DeckInfoLabel/DeckInfoLabel.stories.tsx +10 -6
- package/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx +15 -11
- package/src/molecules/DeckInfoLabel/deckinfolabel.module.css +42 -0
- package/src/molecules/DeckInfoLabel/index.tsx +36 -62
- package/src/molecules/DropdownMenu/index.tsx +17 -13
- package/src/molecules/InfoScreen/index.tsx +6 -2
- package/src/molecules/ReleaseNotes/styles.module.css +15 -15
- package/src/molecules/index.ts +2 -1
- package/src/nav/SidePanel.module.css +6 -6
- package/src/organisms/CommandText/__tests__/CommandText.test.tsx +12 -12
- package/src/organisms/CommandText/index.tsx +2 -2
- package/src/organisms/CommandText/useCommandTextString/index.ts +2 -2
- package/src/organisms/CommandText/useCommandTextString/utils/__tests__/getFinalLabwareLocation.test.ts +4 -4
- package/src/organisms/CommandText/useCommandTextString/utils/commandText/__tests__/getPipettingCommandText.test.tsx +3 -3
- package/src/organisms/CommandText/useCommandTextString/utils/commandText/getFlexStackerCommandText.ts +2 -4
- package/src/organisms/CommandText/useCommandTextString/utils/commandText/getMoveToWellCommandText.ts +19 -3
- package/src/organisms/CommandText/useCommandTextString/utils/commandText/getPipettingCommandText.ts +19 -10
- package/src/organisms/CommandText/useCommandTextString/utils/getLabwareDefinitionsFromCommands.ts +9 -9
- package/src/organisms/CommandText/useCommandTextString/utils/getLabwareLocation.tsx +3 -3
- package/src/organisms/CommandText/useCommandTextString/utils/getLabwareName.ts +2 -2
- package/src/organisms/DeckLabelSet/index.tsx +1 -3
- package/src/organisms/FixtureOption/__tests__/FixtureOption.test.tsx +0 -2
- package/src/organisms/FixtureOption/index.tsx +42 -71
- package/src/organisms/ProtocolDeck/index.tsx +118 -0
- package/src/organisms/ProtocolTimelineScrubber/CommandItem.tsx +2 -2
- package/src/organisms/ProtocolTimelineScrubber/PipetteVisuals.tsx +1 -1
- package/src/organisms/ProtocolTimelineScrubber/utils.ts +3 -3
- package/src/organisms/index.ts +1 -0
- package/src/primitives/ForeignObject.tsx +20 -61
- package/src/primitives/style-props.ts +1 -0
- package/src/slotmap/styles.module.css +1 -1
- package/src/structure/Pill.module.css +1 -1
- package/src/structure/Splash.module.css +1 -1
- package/src/structure/index.ts +2 -4
- package/src/structure/structure.module.css +11 -11
- package/src/styles/colors.module.css +1 -0
- package/src/styles/global.css +179 -0
- package/src/styles/index.module.css +1 -1
- package/src/styles/typography.module.css +1 -0
- package/src/testing/utils/renderWithProviders.tsx +3 -6
- package/src/tooltips/tooltips.module.css +14 -14
- package/vite.config.mts +6 -3
- package/lib/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.d.ts +0 -14
- package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +0 -8
- package/lib/hardware-sim/DeckConfigurator/FlexStackerFixture.d.ts +0 -11
- package/lib/hardware-sim/DeckConfigurator/HeaterShakerFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/MagneticBlockFixture.d.ts +0 -11
- package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/TemperatureModuleFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/ThermocyclerFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +0 -11
- package/lib/hardware-sim/utils.d.ts +0 -3
- package/lib/instrument/InstrumentGroup.d.ts +0 -11
- package/lib/instrument/InstrumentInfo.d.ts +0 -18
- package/lib/legacy-hardware-sim/ModuleItem.d.ts +0 -17
- package/lib/lists/TitledList.d.ts +0 -44
- package/lib/structure/Card.d.ts +0 -18
- package/src/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.tsx +0 -109
- package/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx +0 -28
- package/src/hardware-sim/utils.ts +0 -18
- package/src/instrument/InstrumentDiagram.stories.tsx +0 -43
- package/src/instrument/InstrumentGroup.stories.tsx +0 -89
- package/src/instrument/InstrumentGroup.tsx +0 -35
- package/src/instrument/InstrumentInfo.tsx +0 -106
- package/src/instrument/__tests__/InstrumentInfo.test.tsx +0 -58
- package/src/instrument/instrument.module.css +0 -45
- package/src/legacy-hardware-sim/ModuleItem.tsx +0 -145
- package/src/lists/TitledList.tsx +0 -154
- package/src/structure/Card.stories.tsx +0 -29
- package/src/structure/Card.tsx +0 -65
- /package/lib/atoms/{ListButton/__tests__/ListButtonRadioButton.test.d.ts → AnimationVideo/__tests__/AnimationVideo.test.d.ts} +0 -0
- /package/lib/{instrument/__tests__/InstrumentInfo.test.d.ts → atoms/buttons/__tests__/BasicButton.test.d.ts} +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { screen } from '@testing-library/react'
|
|
2
2
|
import { beforeEach, describe, expect, it } from 'vitest'
|
|
3
3
|
|
|
4
|
-
import { DeckInfoLabel } from '..'
|
|
5
|
-
import { BORDERS, COLORS } from '../../../helix-design-system'
|
|
6
4
|
import { renderWithProviders } from '../../../testing/utils'
|
|
7
|
-
import {
|
|
5
|
+
import { DeckInfoLabel } from '../index'
|
|
8
6
|
|
|
9
7
|
import type { ComponentProps } from 'react'
|
|
10
8
|
|
|
@@ -24,13 +22,9 @@ describe('DeckInfoLabel', () => {
|
|
|
24
22
|
it('should render the proper styles - web style', () => {
|
|
25
23
|
render(props)
|
|
26
24
|
const deckInfoLabel = screen.getByTestId('DeckInfoLabel_A1')
|
|
27
|
-
expect(deckInfoLabel).
|
|
28
|
-
|
|
29
|
-
)
|
|
30
|
-
expect(deckInfoLabel).toHaveStyle(`height: ${SPACING.spacing20}`)
|
|
31
|
-
expect(deckInfoLabel).toHaveStyle('width: max-content')
|
|
32
|
-
expect(deckInfoLabel).toHaveStyle(`border: 1px solid ${COLORS.black90}`)
|
|
33
|
-
expect(deckInfoLabel).toHaveStyle(`border-radius: ${BORDERS.borderRadius8}`)
|
|
25
|
+
expect(deckInfoLabel.className).toContain('label')
|
|
26
|
+
expect(deckInfoLabel.className).toContain('deck_info_label_no_highlight')
|
|
27
|
+
expect(deckInfoLabel.className).toContain('default')
|
|
34
28
|
})
|
|
35
29
|
|
|
36
30
|
it.todo('should render the proper styles - odd style')
|
|
@@ -45,6 +39,16 @@ describe('DeckInfoLabel', () => {
|
|
|
45
39
|
iconName: 'ot-temperature-v2',
|
|
46
40
|
}
|
|
47
41
|
render(props)
|
|
48
|
-
screen.getByLabelText(
|
|
42
|
+
screen.getByLabelText('ot-temperature-v2')
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it('should render an icon large', () => {
|
|
46
|
+
props = {
|
|
47
|
+
iconName: 'ot-temperature-v2',
|
|
48
|
+
size: 'large',
|
|
49
|
+
}
|
|
50
|
+
render(props)
|
|
51
|
+
const deckInfoLabelIcon = screen.getByLabelText('ot-temperature-v2')
|
|
52
|
+
expect(deckInfoLabelIcon).toHaveStyle('height: 1.5rem')
|
|
49
53
|
})
|
|
50
54
|
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.label {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
width: max-content;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
7
|
+
border-width: 1px;
|
|
8
|
+
border-style: solid;
|
|
9
|
+
border-radius: var(--border-radius-8);
|
|
10
|
+
background-color: inherit;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.deck_info_label_highlight {
|
|
14
|
+
border-color: transparent;
|
|
15
|
+
background-color: var(--color-blue50);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.deck_info_label_no_highlight {
|
|
19
|
+
border-color: var(--color-black90);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.large {
|
|
23
|
+
height: 1.75rem;
|
|
24
|
+
border-width: 2px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.default {
|
|
28
|
+
height: 1.25rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (height: 600px) and (width: 1024px) {
|
|
32
|
+
.label {
|
|
33
|
+
height: var(--spacing-32);
|
|
34
|
+
padding: var(--spacing-4) var(--spacing-6);
|
|
35
|
+
border-width: 2px;
|
|
36
|
+
border-radius: var(--border-radius-12);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.has_deck_label {
|
|
40
|
+
padding-right: var(--spacing-8);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,95 +1,69 @@
|
|
|
1
|
-
import
|
|
1
|
+
import clsx from 'clsx'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { PlaceholderStyledText } from '../../atoms'
|
|
4
|
+
import { COLORS } from '../../helix-design-system'
|
|
5
5
|
import { Icon } from '../../icons'
|
|
6
|
-
import
|
|
7
|
-
import { ALIGN_CENTER, JUSTIFY_CENTER } from '../../styles'
|
|
8
|
-
import { RESPONSIVENESS, SPACING } from '../../ui-style-constants'
|
|
6
|
+
import styles from './deckinfolabel.module.css'
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
import type { StyleProps } from '../../primitives'
|
|
12
|
-
|
|
13
|
-
interface DeckLabelProps extends StyleProps {
|
|
14
|
-
/** deck label to display */
|
|
15
|
-
deckLabel: string
|
|
16
|
-
iconName?: IconName
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface HardwareIconProps extends StyleProps {
|
|
20
|
-
/** hardware icon name */
|
|
21
|
-
iconName: ModuleIconName | 'stacked'
|
|
8
|
+
export interface DeckInfoLabelProps {
|
|
22
9
|
deckLabel?: string
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// type union requires one of deckLabel or iconName, but not both
|
|
26
|
-
export type DeckInfoLabelProps = (DeckLabelProps | HardwareIconProps) & {
|
|
10
|
+
iconName?: string
|
|
27
11
|
highlight?: boolean
|
|
12
|
+
size?: 'large' | 'default'
|
|
13
|
+
height?: string | number
|
|
14
|
+
width?: string | number
|
|
28
15
|
svgSize?: string | number
|
|
16
|
+
transform?: string
|
|
29
17
|
}
|
|
30
18
|
|
|
31
|
-
export
|
|
32
|
-
align-items: ${ALIGN_CENTER};
|
|
33
|
-
background-color: ${props =>
|
|
34
|
-
props.highlight ?? false ? COLORS.blue50 : 'inherit'};
|
|
35
|
-
border: 1px solid
|
|
36
|
-
${props => (props.highlight ?? false ? 'transparent' : COLORS.black90)};
|
|
37
|
-
width: ${props => props.width ?? 'max-content'};
|
|
38
|
-
padding: ${SPACING.spacing2} ${SPACING.spacing4};
|
|
39
|
-
border-radius: ${BORDERS.borderRadius8};
|
|
40
|
-
justify-content: ${JUSTIFY_CENTER};
|
|
41
|
-
height: ${props =>
|
|
42
|
-
props.height ?? SPACING.spacing20}; // prevents the icon from being squished
|
|
43
|
-
|
|
44
|
-
> svg {
|
|
45
|
-
height: ${props => props.svgSize ?? '0.875rem'};
|
|
46
|
-
width: ${props => props.svgSize ?? '0.875rem'};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
50
|
-
border-width: 2px;
|
|
51
|
-
border-radius: ${BORDERS.borderRadius12};
|
|
52
|
-
height: ${props => props.height ?? SPACING.spacing32};
|
|
53
|
-
padding: ${SPACING.spacing4}
|
|
54
|
-
${props =>
|
|
55
|
-
props.deckLabel != null ? SPACING.spacing8 : SPACING.spacing6};
|
|
56
|
-
> svg {
|
|
57
|
-
height: ${props => props.svgSize ?? '1.25rem'};
|
|
58
|
-
width: ${props => props.svgSize ?? '1.25rem'};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
`
|
|
62
|
-
|
|
63
|
-
function DeckInfoLabelComponent({
|
|
19
|
+
export function DeckInfoLabel({
|
|
64
20
|
deckLabel,
|
|
65
21
|
iconName,
|
|
66
22
|
highlight = false,
|
|
67
|
-
|
|
23
|
+
size = 'default',
|
|
24
|
+
height,
|
|
25
|
+
width,
|
|
26
|
+
transform,
|
|
27
|
+
svgSize,
|
|
68
28
|
}: DeckInfoLabelProps): JSX.Element {
|
|
29
|
+
const labelClass = clsx(
|
|
30
|
+
styles.label,
|
|
31
|
+
highlight
|
|
32
|
+
? styles.deck_info_label_highlight
|
|
33
|
+
: styles.deck_info_label_no_highlight,
|
|
34
|
+
styles[size],
|
|
35
|
+
{
|
|
36
|
+
[styles.has_deck_label]: deckLabel != null,
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
69
40
|
return (
|
|
70
|
-
<
|
|
41
|
+
<div
|
|
42
|
+
className={labelClass}
|
|
43
|
+
style={{ height, width, transform }}
|
|
71
44
|
data-testid={
|
|
72
45
|
deckLabel != null
|
|
73
46
|
? `DeckInfoLabel_${deckLabel}`
|
|
74
47
|
: `DeckInfoLabel_${iconName}`
|
|
75
48
|
}
|
|
76
|
-
{...styleProps}
|
|
77
49
|
>
|
|
78
50
|
{iconName != null ? (
|
|
79
51
|
<Icon
|
|
80
52
|
name={iconName}
|
|
53
|
+
height={svgSize ?? (size === 'large' ? '1.5rem' : '0.875rem')}
|
|
54
|
+
width={svgSize ?? (size === 'large' ? '1.5rem' : '0.875rem')}
|
|
81
55
|
color={highlight ? COLORS.white : COLORS.black90}
|
|
82
56
|
aria-label={iconName}
|
|
83
57
|
/>
|
|
84
58
|
) : (
|
|
85
|
-
<
|
|
86
|
-
desktopStyle=
|
|
59
|
+
<PlaceholderStyledText
|
|
60
|
+
desktopStyle={size === 'large' ? 'headingSmallBold' : 'captionBold'}
|
|
87
61
|
oddStyle="smallBodyTextBold"
|
|
88
62
|
color={highlight ? COLORS.white : COLORS.black90}
|
|
89
63
|
>
|
|
90
64
|
{deckLabel}
|
|
91
|
-
</
|
|
65
|
+
</PlaceholderStyledText>
|
|
92
66
|
)}
|
|
93
|
-
</
|
|
67
|
+
</div>
|
|
94
68
|
)
|
|
95
69
|
}
|
|
@@ -292,7 +292,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
|
|
|
292
292
|
onFocus={onFocus}
|
|
293
293
|
onBlur={onBlur}
|
|
294
294
|
css={DROPDOWN_STYLE}
|
|
295
|
-
data-
|
|
295
|
+
data-testid="dropdownMenu"
|
|
296
296
|
tabIndex={tabIndex}
|
|
297
297
|
>
|
|
298
298
|
<Flex gridGap={SPACING.spacing8} alignItems={ALIGN_CENTER}>
|
|
@@ -310,12 +310,14 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
|
|
|
310
310
|
: TYPOGRAPHY.pRegular};
|
|
311
311
|
`}
|
|
312
312
|
>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
313
|
+
{currentOption.deckLabel !== currentOption.name ? (
|
|
314
|
+
<StyledText
|
|
315
|
+
desktopStyle="captionRegular"
|
|
316
|
+
css={LINE_CLAMP_TEXT_STYLE(1)}
|
|
317
|
+
>
|
|
318
|
+
{currentOption.name}
|
|
319
|
+
</StyledText>
|
|
320
|
+
) : null}
|
|
319
321
|
</Flex>
|
|
320
322
|
</Flex>
|
|
321
323
|
<Icon
|
|
@@ -363,12 +365,14 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
|
|
|
363
365
|
flexDirection={DIRECTION_COLUMN}
|
|
364
366
|
gridGap={option.subtext != null ? SPACING.spacing4 : '0'}
|
|
365
367
|
>
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
368
|
+
{option.deckLabel !== option.name ? (
|
|
369
|
+
<StyledText
|
|
370
|
+
desktopStyle="captionRegular"
|
|
371
|
+
css={LINE_CLAMP_TEXT_STYLE(3, true)}
|
|
372
|
+
>
|
|
373
|
+
{option.name}
|
|
374
|
+
</StyledText>
|
|
375
|
+
) : null}
|
|
372
376
|
<StyledText
|
|
373
377
|
desktopStyle="captionRegular"
|
|
374
378
|
color={COLORS.grey60}
|
|
@@ -3,7 +3,7 @@ import { BORDERS, COLORS } from '../../helix-design-system'
|
|
|
3
3
|
import { Icon } from '../../icons'
|
|
4
4
|
import { Flex } from '../../primitives'
|
|
5
5
|
import { ALIGN_CENTER, DIRECTION_COLUMN, JUSTIFY_CENTER } from '../../styles'
|
|
6
|
-
import { SPACING } from '../../ui-style-constants/index'
|
|
6
|
+
import { SPACING, TYPOGRAPHY } from '../../ui-style-constants/index'
|
|
7
7
|
|
|
8
8
|
interface InfoScreenProps {
|
|
9
9
|
content: string
|
|
@@ -44,7 +44,11 @@ export function InfoScreen({
|
|
|
44
44
|
>
|
|
45
45
|
<StyledText desktopStyle="bodyDefaultSemiBold">{content}</StyledText>
|
|
46
46
|
{subContent != null ? (
|
|
47
|
-
<StyledText
|
|
47
|
+
<StyledText
|
|
48
|
+
desktopStyle="bodyDefaultRegular"
|
|
49
|
+
color={COLORS.grey60}
|
|
50
|
+
textAlign={TYPOGRAPHY.textAlignCenter}
|
|
51
|
+
>
|
|
48
52
|
{subContent}
|
|
49
53
|
</StyledText>
|
|
50
54
|
) : null}
|
|
@@ -6,50 +6,50 @@
|
|
|
6
6
|
padding: 0 0.5rem;
|
|
7
7
|
|
|
8
8
|
& > h1 {
|
|
9
|
+
margin-bottom: 1rem;
|
|
10
|
+
color: var(--c-font-dark); /* from legacy --font-header-dark */
|
|
9
11
|
font-size: var(--fs-header); /* from legacy --font-header-dark */
|
|
10
12
|
font-weight: var(--fw-semibold); /* from legacy --font-header-dark */
|
|
11
|
-
color: var(--c-font-dark); /* from legacy --font-header-dark */
|
|
12
|
-
margin-bottom: 1rem;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
& > h2 {
|
|
16
|
-
font-size: var(--fs-header); /* from legacy --font-header-dark */
|
|
17
|
-
color: var(--c-font-dark); /* from legacy --font-header-dark */
|
|
18
|
-
font-weight: var(--fw-regular);
|
|
19
16
|
margin-top: 1rem;
|
|
20
17
|
margin-bottom: 0.75rem;
|
|
18
|
+
color: var(--c-font-dark); /* from legacy --font-header-dark */
|
|
19
|
+
font-size: var(--fs-header); /* from legacy --font-header-dark */
|
|
20
|
+
font-weight: var(--fw-regular);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
& > h3 {
|
|
24
|
-
font-size: var(--fs-body-2); /* from legacy --font-body-2-dark */
|
|
25
|
-
color: var(--c-font-dark); /* from legacy --font-body-2-dark */
|
|
26
|
-
font-weight: var(--fw-semibold);
|
|
27
24
|
margin-top: 0.75rem;
|
|
28
25
|
margin-bottom: 0.5rem;
|
|
26
|
+
color: var(--c-font-dark); /* from legacy --font-body-2-dark */
|
|
27
|
+
font-size: var(--fs-body-2); /* from legacy --font-body-2-dark */
|
|
28
|
+
font-weight: var(--fw-semibold);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
& ul,
|
|
32
32
|
& ol {
|
|
33
|
-
margin-left: 1.25rem;
|
|
34
33
|
margin-bottom: 0.25rem;
|
|
35
|
-
|
|
34
|
+
margin-left: 1.25rem;
|
|
36
35
|
color: var(--c-font-dark); /* from legacy --font-body-2-dark */
|
|
36
|
+
font-size: var(--fs-body-2);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
& li {
|
|
40
40
|
margin: 0.25rem 0;
|
|
41
|
-
font-size: var(--fs-body-2);
|
|
42
41
|
color: var(--c-font-dark); /* from legacy --font-body-2-dark */
|
|
42
|
+
font-size: var(--fs-body-2);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
& code {
|
|
46
|
-
font-family: monospace;
|
|
47
46
|
color: var(--c-font-dark);
|
|
47
|
+
font-family: monospace;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
& pre {
|
|
51
|
-
margin: 0.5rem 0;
|
|
52
51
|
padding: 0.5rem 0.75rem;
|
|
52
|
+
margin: 0.5rem 0;
|
|
53
53
|
background-color: var(--c-font-dark);
|
|
54
54
|
|
|
55
55
|
& code {
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
& p {
|
|
61
|
+
margin-bottom: 1rem;
|
|
62
|
+
color: var(--c-font-dark); /* from legacy --font-body-2-dark */
|
|
61
63
|
font-size: var(--fs-body-2); /* from legacy --font-body-2-dark */
|
|
62
64
|
font-weight: var(--fw-regular); /* from legacy --font-body-2-dark */
|
|
63
|
-
color: var(--c-font-dark); /* from legacy --font-body-2-dark */
|
|
64
|
-
margin-bottom: 1rem;
|
|
65
65
|
}
|
|
66
66
|
}
|
package/src/molecules/index.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export * from './Banner'
|
|
2
|
+
export * from './CustomizeExpandButton'
|
|
2
3
|
export * from './DeckInfoLabel'
|
|
3
4
|
export * from './DeckLabel'
|
|
4
5
|
export * from './DropdownMenu'
|
|
5
6
|
export * from './InfoScreen'
|
|
6
7
|
export * from './LiquidIcon'
|
|
8
|
+
export * from './ListAccordion'
|
|
7
9
|
export * from './ParametersTable'
|
|
8
10
|
export * from './ReleaseNotes'
|
|
9
11
|
export * from './Tabs'
|
|
10
12
|
export * from './TextListTableContent'
|
|
11
|
-
export * from './ListAccordion'
|
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.panel {
|
|
8
|
-
|
|
8
|
+
position: relative;
|
|
9
9
|
overflow: visible;
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
padding: 0 4px;
|
|
10
12
|
border-right: var(--bd-light);
|
|
11
13
|
background-color: var(--c-bg-light);
|
|
12
|
-
position: relative;
|
|
13
|
-
padding: 0 4px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.title_bar {
|
|
17
17
|
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
18
|
width: var(--sidebar-width);
|
|
19
|
+
align-items: center;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.title {
|
|
23
|
+
margin: 1rem auto;
|
|
24
|
+
color: var(--c-font-dark); /* from legacy --font-header-dark */
|
|
23
25
|
font-size: var(--fs-header); /* from legacy --font-header-dark */
|
|
24
26
|
font-weight: var(--fw-semibold); /* from legacy --font-header-dark */
|
|
25
|
-
color: var(--c-font-dark); /* from legacy --font-header-dark */
|
|
26
|
-
margin: 1rem auto;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.panel_contents {
|
|
@@ -23,7 +23,7 @@ import type {
|
|
|
23
23
|
DispenseRunTimeCommand,
|
|
24
24
|
DropTipInPlaceRunTimeCommand,
|
|
25
25
|
DropTipRunTimeCommand,
|
|
26
|
-
|
|
26
|
+
LabwareDefinition,
|
|
27
27
|
LoadLabwareRunTimeCommand,
|
|
28
28
|
LoadLiquidClassRunTimeCommand,
|
|
29
29
|
LoadLiquidRunTimeCommand,
|
|
@@ -60,7 +60,7 @@ describe('CommandText', () => {
|
|
|
60
60
|
{ i18nInstance: i18n }
|
|
61
61
|
)
|
|
62
62
|
screen.getByText(
|
|
63
|
-
'Aspirating 100 µL from well A1 of NEST 1 Well Reservoir 195 mL in Slot 5 at 150 µL/sec'
|
|
63
|
+
'Aspirating 100.00 µL from well A1 of NEST 1 Well Reservoir 195 mL in Slot 5 at 150.00 µL/sec'
|
|
64
64
|
)
|
|
65
65
|
}
|
|
66
66
|
})
|
|
@@ -80,7 +80,7 @@ describe('CommandText', () => {
|
|
|
80
80
|
{ i18nInstance: i18n }
|
|
81
81
|
)
|
|
82
82
|
screen.getByText(
|
|
83
|
-
'Dispensing 100 µL into well A1 of NEST 96 Well Plate 100 µL PCR Full Skirt (1) in Magnetic Module GEN2 in Slot 1 at 300 µL/sec'
|
|
83
|
+
'Dispensing 100.00 µL into well A1 of NEST 96 Well Plate 100 µL PCR Full Skirt (1) in Magnetic Module GEN2 in Slot 1 at 300.00 µL/sec'
|
|
84
84
|
)
|
|
85
85
|
}
|
|
86
86
|
})
|
|
@@ -107,7 +107,7 @@ describe('CommandText', () => {
|
|
|
107
107
|
{ i18nInstance: i18n }
|
|
108
108
|
)
|
|
109
109
|
screen.getByText(
|
|
110
|
-
'Dispensing 100 µL into well A1 of NEST 96 Well Plate 100 µL PCR Full Skirt (1) in Magnetic Module GEN2 in Slot 1 at 300 µL/sec and pushing out 10 µL'
|
|
110
|
+
'Dispensing 100.00 µL into well A1 of NEST 96 Well Plate 100 µL PCR Full Skirt (1) in Magnetic Module GEN2 in Slot 1 at 300.00 µL/sec and pushing out 10.00 µL'
|
|
111
111
|
)
|
|
112
112
|
}
|
|
113
113
|
})
|
|
@@ -130,7 +130,7 @@ describe('CommandText', () => {
|
|
|
130
130
|
/>,
|
|
131
131
|
{ i18nInstance: i18n }
|
|
132
132
|
)
|
|
133
|
-
screen.getByText('Dispensing 50 µL in place at 300 µL/sec')
|
|
133
|
+
screen.getByText('Dispensing 50.00 µL in place at 300.00 µL/sec')
|
|
134
134
|
})
|
|
135
135
|
it('renders correct text for blowout', () => {
|
|
136
136
|
const dispenseCommand = mockCommandTextData.commands.find(
|
|
@@ -152,7 +152,7 @@ describe('CommandText', () => {
|
|
|
152
152
|
{ i18nInstance: i18n }
|
|
153
153
|
)
|
|
154
154
|
screen.getByText(
|
|
155
|
-
'Blowing out at well A1 of NEST 96 Well Plate 100 µL PCR Full Skirt (1) in Magnetic Module GEN2 in Slot 1 at 300 µL/sec'
|
|
155
|
+
'Blowing out at well A1 of NEST 96 Well Plate 100 µL PCR Full Skirt (1) in Magnetic Module GEN2 in Slot 1 at 300.00 µL/sec'
|
|
156
156
|
)
|
|
157
157
|
}
|
|
158
158
|
})
|
|
@@ -174,7 +174,7 @@ describe('CommandText', () => {
|
|
|
174
174
|
/>,
|
|
175
175
|
{ i18nInstance: i18n }
|
|
176
176
|
)
|
|
177
|
-
screen.getByText('Blowing out in place at 300 µL/sec')
|
|
177
|
+
screen.getByText('Blowing out in place at 300.00 µL/sec')
|
|
178
178
|
})
|
|
179
179
|
it('renders correct text for aspirateInPlace', () => {
|
|
180
180
|
renderWithProviders(
|
|
@@ -187,15 +187,15 @@ describe('CommandText', () => {
|
|
|
187
187
|
commandType: 'aspirateInPlace',
|
|
188
188
|
params: {
|
|
189
189
|
pipetteId: 'f6d1c83c-9d1b-4d0d-9de3-e6d649739cfb',
|
|
190
|
-
flowRate: 300,
|
|
191
|
-
volume: 10,
|
|
190
|
+
flowRate: 300.7653423,
|
|
191
|
+
volume: 10.12526,
|
|
192
192
|
},
|
|
193
193
|
} as AspirateInPlaceRunTimeCommand
|
|
194
194
|
}
|
|
195
195
|
/>,
|
|
196
196
|
{ i18nInstance: i18n }
|
|
197
197
|
)
|
|
198
|
-
screen.getByText('Aspirating 10 µL in place at 300 µL/sec')
|
|
198
|
+
screen.getByText('Aspirating 10.13 µL in place at 300.77 µL/sec')
|
|
199
199
|
})
|
|
200
200
|
it('renders correct text for moveToWell', () => {
|
|
201
201
|
const dispenseCommand = mockCommandTextData.commands.find(
|
|
@@ -217,7 +217,7 @@ describe('CommandText', () => {
|
|
|
217
217
|
{ i18nInstance: i18n }
|
|
218
218
|
)
|
|
219
219
|
screen.getByText(
|
|
220
|
-
'Moving to well A1 of NEST 1 Well Reservoir 195 mL in Slot 5'
|
|
220
|
+
'Moving to X 0.00 Y 0.00 Z -24.00 relative to top of well A1 of NEST 1 Well Reservoir 195 mL in Slot 5'
|
|
221
221
|
)
|
|
222
222
|
}
|
|
223
223
|
})
|
|
@@ -589,7 +589,7 @@ describe('CommandText', () => {
|
|
|
589
589
|
labwareId: 'mockId',
|
|
590
590
|
definition: {
|
|
591
591
|
metadata: { displayName: 'mock displayName' },
|
|
592
|
-
} as
|
|
592
|
+
} as LabwareDefinition,
|
|
593
593
|
offset: { x: 0, y: 0, z: 0 },
|
|
594
594
|
},
|
|
595
595
|
status: 'queued',
|
|
@@ -9,7 +9,7 @@ import { useCommandTextString } from './useCommandTextString'
|
|
|
9
9
|
|
|
10
10
|
import type { ComponentProps } from 'react'
|
|
11
11
|
import type {
|
|
12
|
-
|
|
12
|
+
LabwareDefinition,
|
|
13
13
|
RobotType,
|
|
14
14
|
RunTimeCommand,
|
|
15
15
|
} from '@opentrons/shared-data'
|
|
@@ -36,7 +36,7 @@ type STProps = LegacySTProps | ModernSTProps
|
|
|
36
36
|
|
|
37
37
|
interface BaseProps extends StyleProps {
|
|
38
38
|
command: RunTimeCommand
|
|
39
|
-
allRunDefs:
|
|
39
|
+
allRunDefs: LabwareDefinition[]
|
|
40
40
|
commandTextData: CommandTextData
|
|
41
41
|
robotType: RobotType
|
|
42
42
|
isOnDevice?: boolean
|
|
@@ -4,7 +4,7 @@ import * as utils from './utils'
|
|
|
4
4
|
|
|
5
5
|
import type { TFunction } from 'i18next'
|
|
6
6
|
import type {
|
|
7
|
-
|
|
7
|
+
LabwareDefinition,
|
|
8
8
|
RobotType,
|
|
9
9
|
RunTimeCommand,
|
|
10
10
|
} from '@opentrons/shared-data'
|
|
@@ -19,7 +19,7 @@ export * from './utils'
|
|
|
19
19
|
|
|
20
20
|
export interface UseCommandTextStringParams {
|
|
21
21
|
command: RunTimeCommand | null
|
|
22
|
-
allRunDefs:
|
|
22
|
+
allRunDefs: LabwareDefinition[]
|
|
23
23
|
commandTextData: CommandTextData | null
|
|
24
24
|
robotType: RobotType
|
|
25
25
|
}
|
|
@@ -4,7 +4,7 @@ import { fixtureTiprack10ul } from '@opentrons/shared-data'
|
|
|
4
4
|
|
|
5
5
|
import { getFinalLabwareLocation } from '../getFinalLabwareLocation'
|
|
6
6
|
|
|
7
|
-
import type {
|
|
7
|
+
import type { LabwareDefinition } from '@opentrons/shared-data'
|
|
8
8
|
|
|
9
9
|
describe('getFinalLabwareLocation', () => {
|
|
10
10
|
it('calculates labware location after only load_labware', () => {
|
|
@@ -23,7 +23,7 @@ describe('getFinalLabwareLocation', () => {
|
|
|
23
23
|
},
|
|
24
24
|
result: {
|
|
25
25
|
labwareId,
|
|
26
|
-
definition: fixtureTiprack10ul as
|
|
26
|
+
definition: fixtureTiprack10ul as LabwareDefinition,
|
|
27
27
|
offset: { x: 1, y: 2, z: 3 },
|
|
28
28
|
},
|
|
29
29
|
status: 'succeeded',
|
|
@@ -51,7 +51,7 @@ describe('getFinalLabwareLocation', () => {
|
|
|
51
51
|
},
|
|
52
52
|
result: {
|
|
53
53
|
labwareId,
|
|
54
|
-
definition: fixtureTiprack10ul as
|
|
54
|
+
definition: fixtureTiprack10ul as LabwareDefinition,
|
|
55
55
|
offset: { x: 1, y: 2, z: 3 },
|
|
56
56
|
},
|
|
57
57
|
status: 'succeeded',
|
|
@@ -93,7 +93,7 @@ describe('getFinalLabwareLocation', () => {
|
|
|
93
93
|
},
|
|
94
94
|
result: {
|
|
95
95
|
labwareId,
|
|
96
|
-
definition: fixtureTiprack10ul as
|
|
96
|
+
definition: fixtureTiprack10ul as LabwareDefinition,
|
|
97
97
|
offset: { x: 1, y: 2, z: 3 },
|
|
98
98
|
},
|
|
99
99
|
status: 'succeeded',
|
|
@@ -92,7 +92,7 @@ describe('getPipettingCommandText', () => {
|
|
|
92
92
|
|
|
93
93
|
render(command)
|
|
94
94
|
screen.getByText(
|
|
95
|
-
/Aspirating 100 µL from well A1 of Test Labware in Slot 1 at 150 µL\/sec/
|
|
95
|
+
/Aspirating 100.00 µL from well A1 of Test Labware in Slot 1 at 150.00 µL\/sec/
|
|
96
96
|
)
|
|
97
97
|
})
|
|
98
98
|
|
|
@@ -110,7 +110,7 @@ describe('getPipettingCommandText', () => {
|
|
|
110
110
|
|
|
111
111
|
render(command)
|
|
112
112
|
screen.getByText(
|
|
113
|
-
/Dispensing 100 µL into well A1 of Test Labware in Slot 1 at 150 µL\/sec/
|
|
113
|
+
/Dispensing 100.00 µL into well A1 of Test Labware in Slot 1 at 150.00 µL\/sec/
|
|
114
114
|
)
|
|
115
115
|
})
|
|
116
116
|
|
|
@@ -129,7 +129,7 @@ describe('getPipettingCommandText', () => {
|
|
|
129
129
|
|
|
130
130
|
render(command)
|
|
131
131
|
screen.getByText(
|
|
132
|
-
/Dispensing 100 µL into well A1 of Test Labware in Slot 1 at 150 µL\/sec and pushing out 10 µL/
|
|
132
|
+
/Dispensing 100.00 µL into well A1 of Test Labware in Slot 1 at 150.00 µL\/sec and pushing out 10.00 µL/
|
|
133
133
|
)
|
|
134
134
|
})
|
|
135
135
|
|
|
@@ -8,8 +8,7 @@ import type {
|
|
|
8
8
|
FlexStackerRetrieveRunTimeCommand,
|
|
9
9
|
FlexStackerSetStoredLabwareRunTimeCommand,
|
|
10
10
|
FlexStackerStoreRunTimeCommand,
|
|
11
|
-
|
|
12
|
-
LabwareDefinition3,
|
|
11
|
+
LabwareDefinition,
|
|
13
12
|
RunTimeCommand,
|
|
14
13
|
} from '@opentrons/shared-data'
|
|
15
14
|
import type { HandlesCommands } from '../types'
|
|
@@ -40,8 +39,7 @@ type GetFlexStackerCommandText = HandlesCommands<HandledCommands>
|
|
|
40
39
|
|
|
41
40
|
const getLabwareDisplayName = (labwareUri: string, allRunDefs: any): string => {
|
|
42
41
|
const currentLabwareDef = allRunDefs.find(
|
|
43
|
-
(def:
|
|
44
|
-
getLabwareDefURI(def) === labwareUri
|
|
42
|
+
(def: LabwareDefinition) => getLabwareDefURI(def) === labwareUri
|
|
45
43
|
)
|
|
46
44
|
return currentLabwareDef?.metadata.displayName ?? null
|
|
47
45
|
}
|
package/src/organisms/CommandText/useCommandTextString/utils/commandText/getMoveToWellCommandText.ts
CHANGED
|
@@ -12,7 +12,12 @@ export function getMoveToWellCommandText({
|
|
|
12
12
|
commandTextData,
|
|
13
13
|
robotType,
|
|
14
14
|
}: HandlesCommands<MoveToWellRunTimeCommand>): string {
|
|
15
|
-
const { wellName, labwareId } = command.params
|
|
15
|
+
const { wellName, labwareId, wellLocation } = command.params
|
|
16
|
+
const {
|
|
17
|
+
x: xOffsetUnformatted,
|
|
18
|
+
y: yOffsetUnformatted,
|
|
19
|
+
z: zOffsetUnformatted,
|
|
20
|
+
} = wellLocation?.offset ?? { x: '', y: '', z: '' }
|
|
16
21
|
const allPreviousCommands = commandTextData?.commands.slice(
|
|
17
22
|
0,
|
|
18
23
|
commandTextData.commands.findIndex(c => c.id === command.id)
|
|
@@ -31,8 +36,15 @@ export function getMoveToWellCommandText({
|
|
|
31
36
|
t,
|
|
32
37
|
})
|
|
33
38
|
|
|
39
|
+
const xOffset =
|
|
40
|
+
typeof xOffsetUnformatted === 'number' ? xOffsetUnformatted?.toFixed(2) : ''
|
|
41
|
+
const yOffset =
|
|
42
|
+
typeof yOffsetUnformatted === 'number' ? yOffsetUnformatted?.toFixed(2) : ''
|
|
43
|
+
const zOffset =
|
|
44
|
+
typeof zOffsetUnformatted === 'number' ? zOffsetUnformatted?.toFixed(2) : ''
|
|
45
|
+
|
|
34
46
|
return t('move_to_well', {
|
|
35
|
-
|
|
47
|
+
wellName,
|
|
36
48
|
labware:
|
|
37
49
|
commandTextData != null
|
|
38
50
|
? getLabwareName({
|
|
@@ -41,6 +53,10 @@ export function getMoveToWellCommandText({
|
|
|
41
53
|
allRunDefs,
|
|
42
54
|
})
|
|
43
55
|
: null,
|
|
44
|
-
|
|
56
|
+
xOffset,
|
|
57
|
+
yOffset,
|
|
58
|
+
zOffset,
|
|
59
|
+
positionRelative: wellLocation?.origin,
|
|
60
|
+
displayLocation,
|
|
45
61
|
})
|
|
46
62
|
}
|