-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(protocol-designer, step-generation, components, shared-data): ad…
…d flex and move labware (#12920) Introduce a new file creation wizard within protocol designer that sequentially walks users through initializing a protocol for either the OT2 or the Opentrons Flex. Plug these new values into the rest of the applications state, and follow the path all the way to the analysis/protocol engine via updates to step generation to handle moving labware and speccing a robot type inside of a JSON protocol file. Use modern module visualization components for rendering deck map items now that the deck definition is variable within protocol designer. Render timeline module state visually on the module svg with a new generic module name label. Remove step-generation error handling for deck collisions that don't apply to the Flex. Present the Magnetic Block on the File Info Modules section. Co-authored-by: Jethary <[email protected]>
- Loading branch information
Showing
115 changed files
with
9,474 additions
and
2,009 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import * as React from 'react' | ||
import { css } from 'styled-components' | ||
import { Box } from '../../primitives' | ||
import { COLORS, RESPONSIVENESS, SPACING } from '../../ui-style-constants' | ||
import { POSITION_ABSOLUTE, POSITION_RELATIVE } from '../../styles' | ||
|
||
interface StepMeterProps { | ||
totalSteps: number | ||
currentStep: number | null | ||
} | ||
|
||
export const StepMeter = (props: StepMeterProps): JSX.Element => { | ||
const { totalSteps, currentStep } = props | ||
const progress = currentStep != null ? currentStep : 0 | ||
const percentComplete = `${ | ||
// this logic puts a cap at 100% percentComplete which we should never run into | ||
currentStep != null && currentStep > totalSteps | ||
? 100 | ||
: (progress / totalSteps) * 100 | ||
}%` | ||
|
||
const StepMeterContainer = css` | ||
position: ${POSITION_RELATIVE}; | ||
height: ${SPACING.spacing4}; | ||
background-color: ${COLORS.medGreyEnabled}; | ||
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} { | ||
height: ${SPACING.spacing12}; | ||
} | ||
` | ||
const StepMeterBar = css` | ||
position: ${POSITION_ABSOLUTE}; | ||
top: 0; | ||
height: 100%; | ||
background-color: ${COLORS.blueEnabled}; | ||
width: ${percentComplete}; | ||
webkit-transition: width 0.5s ease-in-out; | ||
moz-transition: width 0.5s ease-in-out; | ||
o-transition: width 0.5s ease-in-out; | ||
transition: width 0.5s ease-in-out; | ||
` | ||
|
||
return ( | ||
<Box data-testid="StepMeter_StepMeterContainer" css={StepMeterContainer}> | ||
<Box data-testid="StepMeter_StepMeterBar" css={StepMeterBar} /> | ||
</Box> | ||
) | ||
} |
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,2 +1,3 @@ | ||
export * from './CheckboxField' | ||
export * from './StepMeter' | ||
export * from './buttons' |
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
Oops, something went wrong.