Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed Dec 18, 2024
1 parent ad6b69e commit 3671140
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
BORDERS,
COLORS,
DIRECTION_COLUMN,
DISPLAY_FLEX,
Flex,
Icon,
JUSTIFY_CENTER,
Expand Down Expand Up @@ -133,7 +134,7 @@ export function AddStepButton({ hasText }: AddStepButtonProps): JSX.Element {
</Tooltip>
)}
<SecondaryButton
display="flex"
display={DISPLAY_FLEX}
justifyContent={JUSTIFY_CENTER}
alignItems={ALIGN_CENTER}
gridGap={SPACING.spacing10}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ import type { BaseState } from '../../../../types'
const STARTING_DECK_STATE = 'Starting deck'
const FINAL_DECK_STATE = 'Ending deck'
const PX_HEIGHT_TO_TOP_OF_CONTAINER = 32
const SIDEBAR_MIN_WIDTH_FOR_ICON = 179
const PX_SIDEBAR_MIN_WIDTH_FOR_ICON = 179

export interface StepContainerProps {
title: string
iconName: IconName
Expand Down Expand Up @@ -95,7 +96,7 @@ export function StepContainer(props: StepContainerProps): JSX.Element {
const dispatch = useDispatch<ThunkDispatch<BaseState, any, any>>()
const multiSelectItemIds = useSelector(getMultiSelectItemIds)

const hasText = sidebarWidth > SIDEBAR_MIN_WIDTH_FOR_ICON
const hasText = sidebarWidth > PX_SIDEBAR_MIN_WIDTH_FOR_ICON
let backgroundColor = isStartingOrEndingState ? COLORS.blue20 : COLORS.grey20
let color = COLORS.black90
if (selected) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useTranslation } from 'react-i18next'

Check failure on line 1 in protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx

View workflow job for this annotation

GitHub Actions / js checks

Duplicate identifier 'useTranslation'.

Check failure on line 1 in protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx

View workflow job for this annotation

GitHub Actions / js checks

'/home/runner/work/opentrons/opentrons/node_modules/react-i18next/dist/es/index.js' imported multiple times
import { useSelector, useDispatch } from 'react-redux'
import { useConditionalConfirm } from '@opentrons/components'

Check failure on line 3 in protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx

View workflow job for this annotation

GitHub Actions / js checks

Duplicate identifier 'useTranslation'.

Check failure on line 3 in protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx

View workflow job for this annotation

GitHub Actions / js checks

'useTranslation' is already defined

Check failure on line 3 in protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx

View workflow job for this annotation

GitHub Actions / js checks

'/home/runner/work/opentrons/opentrons/node_modules/react-i18next/dist/es/index.js' imported multiple times

import {
getHoveredTerminalItemId,
getSelectedTerminalItemId,
Expand All @@ -10,6 +12,7 @@ import {
getCurrentFormIsPresaved,
getCurrentFormHasUnsavedChanges,
} from '../../../../step-forms/selectors'
import { START_TERMINAL_ITEM_ID } from '../../../../steplist'
import {
CLOSE_STEP_FORM_WITH_CHANGES,
CLOSE_UNSAVED_STEP_FORM,
Expand All @@ -21,19 +24,16 @@ import {
toggleViewSubstep,
} from '../../../../ui/steps/actions/actions'
import { StepContainer } from './StepContainer'
import { START_TERMINAL_ITEM_ID } from '../../../../steplist'

import type {
SelectTerminalItemAction,
HoverOnTerminalItemAction,
} from '../../../../ui/steps'
import type { TerminalItemId } from '../../../../steplist'
import type { ThunkDispatch } from '../../../../types'
import { useTranslation } from 'react-i18next'

export interface TerminalItemStepProps {
id: TerminalItemId
title: string
sidebarWidth: number
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export function ProtocolSteps(): JSX.Element {
hasTimelineErrors && tab === 'protocolSteps' && formData == null
const stepDetails = currentStep?.stepDetails ?? null

console.log('targetWidth', targetWidth)
return (
<Flex
backgroundColor={COLORS.grey10}
Expand Down

0 comments on commit 3671140

Please sign in to comment.