Skip to content

Commit

Permalink
fix(components, protocol-designer): fix design bugs from PD 8.4.0 alp…
Browse files Browse the repository at this point in the history
…ha.1 (#17443)

Fix several bugs including
1) properly displaying labware on absorbance reader in absorbance reader
step form module options
2) removing the 'delete' button from wavelengths if selected
insitialization mode is 'single'

Closes RQA-3942, Closes RQA-3945
  • Loading branch information
ncdiehl11 authored Feb 6, 2025
1 parent 9c70e65 commit 78848e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/src/molecules/DropdownMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
</StyledText>
<StyledText
desktopStyle="captionRegular"
color={COLORS.black70}
color={COLORS.grey60}
>
{option.subtext}
</StyledText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ function WavelengthItem(props: WavelengthItemProps): JSX.Element {
handleDeleteWavelength,
index,
error,
mode,
} = props
const { t } = useTranslation('form')
const showCustom = !DEFINED_OPTIONS.some(({ value }) => value === wavelength)
Expand Down Expand Up @@ -334,7 +335,7 @@ function WavelengthItem(props: WavelengthItemProps): JSX.Element {
error={!isFocused ? error : null}
/>
) : null}
{wavelengths.length > 1 ? (
{wavelengths.length > 1 && mode === 'multi' ? (
<Btn
onClick={() => {
handleDeleteWavelength(index)
Expand Down
7 changes: 4 additions & 3 deletions protocol-designer/src/ui/modules/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
TEMPERATURE_MODULE_TYPE,
} from '@opentrons/shared-data'
import { getInitialDeckSetup } from '../../step-forms/selectors'
import { getDeckSetupForActiveItem } from '../../top-selectors/labware-locations'
import { getLabwareNicknamesById } from '../labware/selectors'
import {
getModuleLabwareOptions,
Expand Down Expand Up @@ -86,11 +87,11 @@ export const getHeaterShakerLabwareOptions: Selector<
export const getAbsorbanceReaderLabwareOptions: Selector<
DropdownOption[]
> = createSelector(
getInitialDeckSetup,
getDeckSetupForActiveItem,
getLabwareNicknamesById,
(initialDeckSetup, nicknamesById) => {
(deckSetup, nicknamesById) => {
const absorbanceReaderModuleOptions = getModuleLabwareOptions(
initialDeckSetup,
deckSetup,
nicknamesById,
ABSORBANCE_READER_TYPE
)
Expand Down

0 comments on commit 78848e5

Please sign in to comment.