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

refactor(protocol-designer): initial refactoring of MoveLiquidTools #17470

Merged
merged 6 commits into from
Feb 11, 2025

Conversation

koji
Copy link
Contributor

@koji koji commented Feb 7, 2025

Overview

close AUTH-1417

Test Plan and Hands on Testing

Changelog

  • refactor MoveLiquidTools
  • add test for MoveLiquidTools
  • add test for SingleStep MoveLiquidTools
  • add fixtures for tests

Review requests

low

Risk assessment

create new two components to reduce MoveLiquidTools and add basic tests

close AUTH-1417
@koji koji requested review from ncdiehl11 and syao1226 February 7, 2025 20:06
@koji koji marked this pull request as ready for review February 7, 2025 20:07
@koji koji requested a review from a team as a code owner February 7, 2025 20:07
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 25.71429% with 390 lines in your changes missing coverage. Please review.

Project coverage is 20.19%. Comparing base (875346d) to head (71db6c5).
Report is 1 commits behind head on edge.

Files with missing lines Patch % Lines
...s/MoveLiquidTools/MultipleStepsMoveLiquidTools.tsx 0.81% 366 Missing ⚠️
...ools/MoveLiquidTools/SingleStepMoveLiquidTools.tsx 84.89% 21 Missing ⚠️
...ile/migration/utils/getMigrationPositionFromTop.ts 0.00% 1 Missing ⚠️
...otocolSteps/BatchEditToolbox/BatchEditMixTools.tsx 0.00% 1 Missing ⚠️
...teps/BatchEditToolbox/BatchEditMoveLiquidTools.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #17470      +/-   ##
==========================================
- Coverage   26.17%   20.19%   -5.99%     
==========================================
  Files        3191     3194       +3     
  Lines      230174   230283     +109     
  Branches     9814     8582    -1232     
==========================================
- Hits        60251    46506   -13745     
- Misses     169898   183777   +13879     
+ Partials       25        0      -25     
Flag Coverage Δ
app ?
labware-library ?
opentrons-ai-client ?
protocol-designer 17.52% <25.71%> (+0.08%) ⬆️
step-generation 4.08% <0.19%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...-designer/src/organisms/TipPositionModal/index.tsx 90.44% <ø> (ø)
...ol-designer/src/organisms/WellOrderModal/index.tsx 83.90% <ø> (ø)
...ocolSteps/StepForm/PipetteFields/FlowRateField.tsx 2.56% <ø> (ø)
...ocolSteps/StepForm/PipetteFields/PositionField.tsx 1.20% <ø> (ø)
...olSteps/StepForm/PipetteFields/WellsOrderField.tsx 2.98% <ø> (ø)
...Steps/StepForm/StepTools/MoveLiquidTools/index.tsx 100.00% <100.00%> (+99.40%) ⬆️
protocol-designer/src/resources/types.ts 100.00% <100.00%> (ø)
protocol-designer/src/steplist/formLevel/errors.ts 48.79% <ø> (ø)
...ile/migration/utils/getMigrationPositionFromTop.ts 5.88% <0.00%> (ø)
...otocolSteps/BatchEditToolbox/BatchEditMixTools.tsx 1.40% <0.00%> (ø)
... and 3 more

... and 281 files with indirect coverage changes

@koji koji removed the request for review from a team February 7, 2025 21:08
@koji koji added the authorship label Feb 7, 2025
Comment on lines +182 to +241
<>
<Divider marginY="0" />
<Flex
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing8}
padding={`0 ${SPACING.spacing16}`}
>
<Flex gridGap={SPACING.spacing8} alignItems={ALIGN_CENTER}>
<StyledText
desktopStyle="bodyDefaultRegular"
color={COLORS.grey60}
>
{t('protocol_steps:submerge')}
</StyledText>
<Flex {...targetProps}>
<Icon
name="information"
size="1rem"
color={COLORS.grey60}
data-testid="information_icon"
/>
</Flex>
<Tooltip tooltipProps={tooltipProps}>
{t(`tooltip:step_fields.defaults.${tab}_submerge`)}
</Tooltip>
</Flex>
<ListItem type="noActive">
<Flex
padding={SPACING.spacing12}
width="100%"
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing8}
>
<InputStepFormField
showTooltip={false}
padding="0"
title={t('protocol_steps:submerge_speed')}
{...propsForFields[`${tab}_submerge_speed`]}
units={t('application:units.millimeterPerSec')}
errorToShow={getFormLevelError(
`${tab}_submerge_speed`,
mappedErrorsToField
)}
/>
<InputStepFormField
showTooltip={false}
padding="0"
title={t('protocol_steps:delay_duration')}
{...propsForFields[`${tab}_submerge_delay_seconds`]}
units={t('application:units.seconds')}
errorToShow={getFormLevelError(
`${tab}_submerge_delay_seconds`,
mappedErrorsToField
)}
/>
</Flex>
</ListItem>
</Flex>
</>
) : null}
Copy link
Contributor Author

@koji koji Feb 7, 2025

Choose a reason for hiding this comment

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

@ncdiehl11 @syao1226
Do you think we should export this part as LiquidClassesForm something?

or

export these lines as Submerge component and we will add forms for liquid classese?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would exporting this part conflict with the new MultiInputField component?

Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

one nit, looks good

protocol-designer/src/resources/types.ts Outdated Show resolved Hide resolved
@koji koji merged commit 89b3f14 into edge Feb 11, 2025
10 checks passed
@koji koji deleted the refactor_MoveLiquidTools branch February 11, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants