Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol-designer, components, step-generation): update modules section to accommodate gripper #12955

Merged
merged 13 commits into from
Jun 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(protocol-designer): update modules section to accommodate gripper
jerader committed Jun 22, 2023
commit 3cd8a4324b24da6aa109b0e4b64958579f58b1cc
4 changes: 2 additions & 2 deletions protocol-designer/src/components/DeckSetup/index.tsx
Original file line number Diff line number Diff line change
@@ -432,7 +432,7 @@ export const DeckSetup = (): JSX.Element => {
})

return (
<React.Fragment>
<>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this fragment can be deleted completely?

<div className={styles.deck_row}>
{drilledDown && <BrowseLabwareModal />}
<div ref={wrapperRef} className={styles.deck_wrapper}>
@@ -458,7 +458,7 @@ export const DeckSetup = (): JSX.Element => {
</RobotWorkSpace>
</div>
</div>
</React.Fragment>
</>
)
}

Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@ import {
} from '@opentrons/components'
import { InputField } from './InputField'
import { GoBackLink } from './GoBackLink'
import { HandleEnter } from './HandleEnter'

import type { WizardTileProps } from './types'
import { HandleEnter } from './HandleEnter'

export function MetadataTile(props: WizardTileProps): JSX.Element {
const { i18n, t } = useTranslation()
11 changes: 8 additions & 3 deletions protocol-designer/src/components/modules/GripperRow.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as React from 'react'
import styled from 'styled-components'
import { useTranslation } from 'react-i18next'
import {
OutlineButton,
Flex,
JUSTIFY_SPACE_BETWEEN,
ALIGN_CENTER,
DIRECTION_COLUMN,
} from '@opentrons/components'
import gripperImage from '../../images/flex_gripper.svg'
import styles from './styles.css'
@@ -16,19 +18,22 @@ interface GripperRowProps {

export function GripperRow(props: GripperRowProps): JSX.Element {
const { handleGripper, isGripperAdded } = props
const { i18n, t } = useTranslation()

return (
<Flex justifyContent={JUSTIFY_SPACE_BETWEEN}>
<Flex flexDirection="column">
<h4 className={styles.row_title}>{'Flex Gripper'}</h4>
<Flex flexDirection={DIRECTION_COLUMN}>
<h4 className={styles.row_title}>Flex Gripper</h4>
<AdditionalItemImage src={gripperImage} alt="Opentrons Flex Gripper" />
</Flex>
<div
className={styles.modules_button_group}
style={{ alignSelf: ALIGN_CENTER }}
>
<OutlineButton className={styles.module_button} onClick={handleGripper}>
{isGripperAdded ? 'Remove' : 'Add'}
{isGripperAdded
? i18n.format(t('shared.remove'), 'capitalize')
: i18n.format(t('shared.add'), 'capitalize')}
</OutlineButton>
</div>
</Flex>
4 changes: 3 additions & 1 deletion protocol-designer/src/localization/en/shared.json
Original file line number Diff line number Diff line change
@@ -2,5 +2,7 @@
"exit": "exit",
"go_back": "go back",
"next": "next",
"step": "Step {{current}} / {{max}}"
"step": "Step {{current}} / {{max}}",
"remove": "remove",
"add": "add"
}
14 changes: 6 additions & 8 deletions robot-server/simulators/test.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
{
"machine": "OT-3 Standard",
"strict_attached_instruments": false,
"attached_instruments": {
"right": {
"model": "p1000_single_v3.4",
"model": "p300_single_v1",
"id": "321",
"max_volume": 1000,
"name": "p1000_single_gen3",
"max_volume": 300,
"name": "p300_single",
"tip_length": 0,
"channels": 1
},
"left": {
"model": "p50_single_v3.4",
"model": "p10_single_v1",
"id": "123",
"max_volume": 50,
"name": "p50_single_gen3",
"max_volume": 10,
"name": "p10_single",
"tip_length": 0,
"channels": 1
}