-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
513 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
protocol-designer/src/localization/en/create_new_protocol.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"add_fixtures": "Add your fixtures", | ||
"add_gripper": "Add a gripper", | ||
"add_modules": "Add your modules", | ||
"add_pip": "Add a pipette", | ||
"basics": "Let’s start with the basics", | ||
"need_gripper": "Does your protocol need a Flex Gripper?", | ||
"pip_type": "Pipette type", | ||
"pip_vol": "Pipette volume", | ||
"name": "Name", | ||
"description": "Description", | ||
"author_org": "Author/Organization", | ||
"questions": "We’re going to ask a few questions to help you get started building your protocol.", | ||
"robot_type": "Which robot would you like to use?", | ||
"tell_us": "Tell us about your protocol", | ||
"which_fixtures": "Which fixtures will you be using?", | ||
"which_mods": "Which modules will you be using?", | ||
"which_pip": "Tell us what pipette and tips you want to use." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 57 additions & 20 deletions
77
protocol-designer/src/pages/CreateNewProtocolWizard/AddMetadata.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,71 @@ | ||
import * as React from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import styled from 'styled-components' | ||
import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' | ||
import { | ||
DIRECTION_COLUMN, | ||
Flex, | ||
SPACING, | ||
PrimaryButton, | ||
StyledText, | ||
BORDERS, | ||
TYPOGRAPHY, | ||
} from '@opentrons/components' | ||
|
||
import { GoBack } from './GoBack' | ||
import { InputField } from '../../components/modals/CreateFileWizard/InputField' | ||
import { WizardBody } from './WizardBody' | ||
|
||
import type { WizardTileProps } from './types' | ||
|
||
export function AddMetadata(props: WizardTileProps): JSX.Element | null { | ||
const { goBack, proceed } = props | ||
const { t } = useTranslation('shared') | ||
const { goBack, proceed, watch, register } = props | ||
const { t } = useTranslation(['create_new_protocol', 'shared']) | ||
const fields = watch('fields') | ||
const robotType = fields.robotType | ||
|
||
return ( | ||
<Flex flexDirection={DIRECTION_COLUMN} padding={SPACING.spacing32}> | ||
metadata | ||
<GoBack | ||
onClick={() => { | ||
goBack() | ||
}} | ||
/> | ||
<PrimaryButton | ||
onClick={() => { | ||
proceed() | ||
}} | ||
> | ||
{t('confirm')} | ||
</PrimaryButton> | ||
</Flex> | ||
<WizardBody | ||
stepNumber={robotType === FLEX_ROBOT_TYPE ? 6 : 4} | ||
header={t('tell_us')} | ||
disabled={false} | ||
goBack={() => { | ||
goBack(1) | ||
}} | ||
proceed={() => { | ||
proceed(1) | ||
}} | ||
> | ||
<> | ||
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing4}> | ||
<StyledText desktopStyle="captionRegular">{t('name')}</StyledText> | ||
{/* TODO(ja, 8/9/24): add new input field */} | ||
<InputField autoFocus register={register} fieldName="fields.name" /> | ||
</Flex> | ||
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing4}> | ||
<StyledText desktopStyle="captionRegular"> | ||
{t('description')} | ||
</StyledText> | ||
<DescriptionField {...register('fields.description')} /> | ||
</Flex> | ||
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing4}> | ||
<StyledText desktopStyle="captionRegular"> | ||
{t('author_org')} | ||
</StyledText> | ||
{/* TODO(ja, 8/9/24): add new input field */} | ||
<InputField | ||
fieldName="fields.organizationOrAuthor" | ||
register={register} | ||
/> | ||
</Flex> | ||
</> | ||
</WizardBody> | ||
) | ||
} | ||
|
||
const DescriptionField = styled.textarea` | ||
min-height: 5rem; | ||
width: 100%; | ||
border: ${BORDERS.lineBorder}; | ||
border-radius: ${BORDERS.borderRadius4}; | ||
padding: ${SPACING.spacing8}; | ||
font-size: ${TYPOGRAPHY.fontSizeP}; | ||
resize: none; | ||
` |
17 changes: 0 additions & 17 deletions
17
protocol-designer/src/pages/CreateNewProtocolWizard/GoBack.tsx
This file was deleted.
Oops, something went wrong.
48 changes: 24 additions & 24 deletions
48
protocol-designer/src/pages/CreateNewProtocolWizard/SelectFixtures.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
import * as React from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import { | ||
DIRECTION_COLUMN, | ||
Flex, | ||
SPACING, | ||
PrimaryButton, | ||
} from '@opentrons/components' | ||
|
||
import { GoBack } from './GoBack' | ||
import { Flex, SPACING, StyledText } from '@opentrons/components' | ||
import { WizardBody } from './WizardBody' | ||
|
||
import type { WizardTileProps } from './types' | ||
|
||
export function SelectFixtures(props: WizardTileProps): JSX.Element | null { | ||
const { goBack, proceed } = props | ||
const { t } = useTranslation('shared') | ||
const { t } = useTranslation(['create_new_protocol', 'shared']) | ||
|
||
return ( | ||
<Flex flexDirection={DIRECTION_COLUMN} padding={SPACING.spacing32}> | ||
fixture | ||
<GoBack | ||
onClick={() => { | ||
goBack() | ||
}} | ||
/> | ||
<PrimaryButton | ||
onClick={() => { | ||
proceed() | ||
}} | ||
> | ||
{t('confirm')} | ||
</PrimaryButton> | ||
</Flex> | ||
<WizardBody | ||
stepNumber={5} | ||
header={t('add_fixtures')} | ||
disabled={false} | ||
goBack={() => { | ||
goBack(1) | ||
}} | ||
proceed={() => { | ||
proceed(1) | ||
}} | ||
> | ||
<> | ||
<StyledText | ||
desktopStyle="headingSmallBold" | ||
marginBottom={SPACING.spacing16} | ||
> | ||
{t('which_fixtures')} | ||
</StyledText> | ||
<Flex gridGap={SPACING.spacing4}>TODO: add fixture info</Flex> | ||
</> | ||
</WizardBody> | ||
) | ||
} |
Oops, something went wrong.