Skip to content

Commit

Permalink
fix(protocol-designer): remove liquid defining restrictions
Browse files Browse the repository at this point in the history
closes RQA-3260
  • Loading branch information
jerader committed Nov 18, 2024
1 parent 99b9f76 commit 4953ef4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 51 deletions.

This file was deleted.

24 changes: 2 additions & 22 deletions protocol-designer/src/organisms/DefineLiquidsModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import { SketchPicker } from 'react-color'
import { yupResolver } from '@hookform/resolvers/yup'
import * as Yup from 'yup'
import { Controller, useForm } from 'react-hook-form'
import {
DEFAULT_LIQUID_COLORS,
DEPRECATED_WHALE_GREY,
} from '@opentrons/shared-data'
import { DEFAULT_LIQUID_COLORS } from '@opentrons/shared-data'
import {
Btn,
COLORS,
Expand All @@ -30,7 +27,6 @@ import {
import * as labwareIngredActions from '../../labware-ingred/actions'
import { selectors as labwareIngredSelectors } from '../../labware-ingred/selectors'
import { swatchColors } from '../../components/swatchColors'
import { checkColor } from './utils'
import { HandleEnter } from '../../atoms/HandleEnter'
import { DescriptionField, LINE_CLAMP_TEXT_STYLE } from '../../atoms'

Expand All @@ -47,25 +43,9 @@ interface LiquidEditFormValues {
[key: string]: unknown
}

const BLACK = '#000000'
const WHITE = '#ffffff'

const INVALID_DISPLAY_COLORS = [BLACK, WHITE, DEPRECATED_WHALE_GREY]

const liquidEditFormSchema: any = Yup.object().shape({
name: Yup.string().required('liquid name is required'),
displayColor: Yup.string().test(
'disallowed-color',
'Invalid display color',
value => {
if (value == null) {
return true
}
return !INVALID_DISPLAY_COLORS.includes(value)
? !checkColor(value)
: false
}
),
displayColor: Yup.string(),
description: Yup.string(),
serialize: Yup.boolean(),
})
Expand Down
8 changes: 0 additions & 8 deletions protocol-designer/src/organisms/DefineLiquidsModal/utils.ts

This file was deleted.

0 comments on commit 4953ef4

Please sign in to comment.