Skip to content

Commit

Permalink
refactor(app): absolute imports for atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
sfoster1 committed Sep 18, 2024
1 parent ea34338 commit 39bf51b
Show file tree
Hide file tree
Showing 300 changed files with 375 additions and 375 deletions.
2 changes: 1 addition & 1 deletion app/src/App/OnDeviceDisplayApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { ApiHostProvider } from '@opentrons/react-api-client'
import NiceModal from '@ebay/nice-modal-react'

import { SleepScreen } from '../atoms/SleepScreen'
import { SleepScreen } from '/app/atoms/SleepScreen'
import { OnDeviceLocalizationProvider } from '../LocalizationProvider'
import { ToasterOven } from '/app/organisms/ToasterOven'
import { MaintenanceRunTakeover } from '/app/organisms/TakeoverModal'
Expand Down
2 changes: 1 addition & 1 deletion app/src/App/OnDeviceDisplayAppFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
LegacyStyledText,
} from '@opentrons/components'

import { MediumButton } from '../atoms/buttons'
import { MediumButton } from '/app/atoms/buttons'
import { OddModal } from '/app/molecules/OddModal'
import { appRestart, sendLog } from '/app/redux/shell'

Expand Down
2 changes: 1 addition & 1 deletion app/src/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux'

import { Flex, POSITION_FIXED, DIRECTION_ROW } from '@opentrons/components'

import { GlobalStyle } from '../atoms/GlobalStyle'
import { GlobalStyle } from '/app/atoms/GlobalStyle'
import { getConfig, getIsOnDevice } from '/app/redux/config'
import { DesktopApp } from './DesktopApp'
import { OnDeviceDisplayApp } from './OnDeviceDisplayApp'
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/CardButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
LegacyStyledText,
TYPOGRAPHY,
} from '@opentrons/components'
import { ODD_FOCUS_VISIBLE } from '../../atoms/buttons/constants'
import { ODD_FOCUS_VISIBLE } from '/app/atoms/buttons/constants'

import type { IconName } from '@opentrons/components'

Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/Command/Command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { RobotType, RunTimeCommand } from '@opentrons/shared-data'
import { CommandText } from './CommandText'
import { CommandIcon } from './CommandIcon'
import type { CommandTextData } from './types'
import { Skeleton } from '../../atoms/Skeleton'
import { Skeleton } from '/app/atoms/Skeleton'
import type { StyleProps } from '@opentrons/components'
import { omit } from 'lodash'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
LegacyStyledText,
ModalShell,
} from '@opentrons/components'
import { Skeleton } from '../../atoms/Skeleton'
import { Skeleton } from '/app/atoms/Skeleton'
import { WizardHeader } from '../WizardHeader'
import { configReducer } from '/app/redux/config/reducer'
import { GenericWizardTile } from './index'
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/GenericWizardTile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {

import { getIsOnDevice } from '/app/redux/config'
import { NeedHelpLink } from '/app/organisms/CalibrationPanels'
import { SmallButton, TextOnlyButton } from '../../atoms/buttons'
import { SmallButton, TextOnlyButton } from '/app/atoms/buttons'

const ALIGN_BUTTONS = css`
align-items: ${ALIGN_FLEX_END};
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/InstrumentCard/MenuOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
POSITION_ABSOLUTE,
} from '@opentrons/components'

import { Divider } from '../../atoms/structure'
import { Divider } from '/app/atoms/structure'

import type { StyleProps } from '@opentrons/components'

Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/InterventionModal/DescriptionContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
StyledText,
RESPONSIVENESS,
} from '@opentrons/components'
import { InlineNotification } from '../../atoms/InlineNotification'
import { InlineNotification } from '/app/atoms/InlineNotification'

interface NotificationProps {
notificationHeader?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
ALIGN_CENTER,
RESPONSIVENESS,
} from '@opentrons/components'
import { Divider } from '../../../atoms/structure/Divider'
import { Divider } from '/app/atoms/structure/Divider'

import type { DeckInfoLabelProps } from '@opentrons/components'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SPACING,
RESPONSIVENESS,
} from '@opentrons/components'
import { InlineNotification } from '../../../atoms/InlineNotification'
import { InlineNotification } from '/app/atoms/InlineNotification'

import { InterventionInfo } from './InterventionInfo'
export type { InterventionInfoProps } from './InterventionInfo'
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/InterventionModal/TwoColumn.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DIRECTION_COLUMN,
Box,
} from '@opentrons/components'
import { InlineNotification } from '../../atoms/InlineNotification'
import { InlineNotification } from '/app/atoms/InlineNotification'

import { TwoColumn as TwoColumnComponent } from './'
import { StandInContent } from './story-utils/StandIn'
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/JogControls/TouchControlButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components'
import { COLORS, SPACING, BORDERS } from '@opentrons/components'

import { ODD_FOCUS_VISIBLE } from '../../atoms/buttons/constants'
import { ODD_FOCUS_VISIBLE } from '/app/atoms/buttons/constants'

export const TouchControlButton = styled.button<{ selected: boolean }>`
background-color: ${({ selected }) =>
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/MiniCard/MiniCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@opentrons/components'
import OT2_PNG from '/app/assets/images/OT2-R_HERO.png'
import { MiniCard } from './'
import { Slideout } from '../../atoms/Slideout'
import { Slideout } from '/app/atoms/Slideout'

import type { Story, Meta } from '@storybook/react'

Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/OddModal/SmallModalChildren.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { SmallButton } from '../../atoms/buttons'
import { SmallButton } from '/app/atoms/buttons'
import { OddModal } from './index'

interface SmallModalChildrenProps {
Expand Down
4 changes: 2 additions & 2 deletions app/src/molecules/PipetteSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import {
EIGHT_CHANNEL,
} from '@opentrons/shared-data'
import { Box, Flex } from '@opentrons/components'
import { Select } from '../../atoms/SelectField/Select'
import { Select } from '/app/atoms/SelectField/Select'

import type { PipetteNameSpecs } from '@opentrons/shared-data'
import type { ActionMeta, SingleValue, MultiValue } from 'react-select'
import type { SelectOption } from '../../atoms/SelectField/Select'
import type { SelectOption } from '/app/atoms/SelectField/Select'

export interface PipetteSelectProps {
/** currently selected value, optional in case selecting triggers immediate action */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data'
import SuccessIcon from '/app/assets/images/icon_success.png'
import { getIsOnDevice } from '/app/redux/config'

import { Skeleton } from '../../atoms/Skeleton'
import { Skeleton } from '/app/atoms/Skeleton'
import type { RobotType } from '@opentrons/shared-data'

interface Props {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { screen } from '@testing-library/react'
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { COLORS } from '@opentrons/components'
import { renderWithProviders } from '/app/__testing-utils__'
import { Skeleton } from '../../../atoms/Skeleton'
import { Skeleton } from '/app/atoms/Skeleton'
import { getIsOnDevice } from '/app/redux/config'
import { SimpleWizardBody } from '..'

vi.mock('../../../atoms/Skeleton')
vi.mock('/app/atoms/Skeleton')
vi.mock('/app/redux/config')

const render = (props: React.ComponentProps<typeof SimpleWizardBody>) => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/UpdateBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
useHoverTooltip,
} from '@opentrons/components'

import { Banner } from '../../atoms/Banner'
import { Banner } from '/app/atoms/Banner'
import { useIsFlex } from '/app/organisms/Devices/hooks'
import { useIsEstopNotDisengaged } from '/app/resources/devices/hooks/useIsEstopNotDisengaged'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import '@testing-library/jest-dom/vitest'
import { fireEvent, screen } from '@testing-library/react'
import { i18n } from '/app/i18n'
import { getIsOnDevice } from '/app/redux/config'
import { StepMeter } from '../../../atoms/StepMeter'
import { StepMeter } from '/app/atoms/StepMeter'
import { WizardHeader } from '..'
import { renderWithProviders } from '/app/__testing-utils__'

vi.mock('../../../atoms/StepMeter')
vi.mock('/app/atoms/StepMeter')
vi.mock('/app/redux/config')

const render = (props: React.ComponentProps<typeof WizardHeader>) => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/WizardHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
LegacyStyledText,
TYPOGRAPHY,
} from '@opentrons/components'
import { StepMeter } from '../../atoms/StepMeter'
import { StepMeter } from '/app/atoms/StepMeter'

interface WizardHeaderProps {
title: string
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/WizardRequiredEquipmentList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from '@opentrons/components'

import { getIsOnDevice } from '/app/redux/config'
import { Divider } from '../../atoms/structure'
import { Divider } from '/app/atoms/structure'
import { labwareImages } from '/app/organisms/CalibrationPanels/labwareImages'
import { equipmentImages } from './equipmentImages'

Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/AddCustomLabwareSlideout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
addCustomLabwareFile,
addCustomLabware,
} from '/app/redux/custom-labware'
import { Slideout } from '../../atoms/Slideout'
import { Slideout } from '/app/atoms/Slideout'
import {
useTrackEvent,
ANALYTICS_ADD_CUSTOM_LABWARE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { TertiaryButton } from '../../atoms/buttons'
import { TertiaryButton } from '/app/atoms/buttons'
import {
changeCustomLabwareDirectory,
getCustomLabwareDirectory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
Modal,
} from '@opentrons/components'

import { TertiaryButton } from '../../atoms/buttons'
import { TertiaryButton } from '/app/atoms/buttons'
import { useToaster } from '/app/organisms/ToasterOven'
import { getTopPortalEl } from '../../App/portal'
import {
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/AdvancedSettings/EnableDevTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { ToggleButton } from '../../atoms/buttons'
import { ToggleButton } from '/app/atoms/buttons'
import { getDevtoolsEnabled, toggleDevtools } from '/app/redux/config'

import type { Dispatch } from '/app/redux/types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { TertiaryButton } from '../../atoms/buttons'
import { TertiaryButton } from '/app/atoms/buttons'
import { getPathToPythonOverride, resetConfigValue } from '/app/redux/config'
import {
openPythonInterpreterDirectory,
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/AdvancedSettings/PreventRobotCaching.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { ToggleButton } from '../../atoms/buttons'
import { ToggleButton } from '/app/atoms/buttons'
import { getConfig, toggleConfigValue } from '/app/redux/config'

import type { Dispatch, State } from '/app/redux/types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { ToggleButton } from '../../atoms/buttons'
import { ToggleButton } from '/app/atoms/buttons'

import type { Dispatch } from '/app/redux/types'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { ToggleButton } from '../../atoms/buttons'
import { ToggleButton } from '/app/atoms/buttons'
import {
getIsLabwareOffsetCodeSnippetsOn,
updateConfigValue,
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/AdvancedSettings/U2EInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { Banner } from '../../atoms/Banner'
import { Banner } from '/app/atoms/Banner'
import {
getU2EAdapterDevice,
getU2EWindowsDriverStatus,
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/AdvancedSettings/UpdatedChannel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { SelectField } from '../../atoms/SelectField'
import { SelectField } from '/app/atoms/SelectField'
import {
getUpdateChannel,
getUpdateChannelOptions,
updateConfigValue,
} from '/app/redux/config'

import type { SelectOption } from '../../atoms/SelectField/Select'
import type { SelectOption } from '/app/atoms/SelectField/Select'
import type { Dispatch } from '/app/redux/types'

export function UpdatedChannel(): JSX.Element {
Expand Down
6 changes: 3 additions & 3 deletions app/src/organisms/AppSettings/ConnectRobotSlideout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {

import { ManualIpHostnameForm } from './ManualIpHostnameForm'
import { ManualIpHostnameList } from './ManualIpHostnameList'
import { Slideout } from '../../atoms/Slideout'
import { ExternalLink } from '../../atoms/Link/ExternalLink'
import { Divider } from '../../atoms/structure'
import { Slideout } from '/app/atoms/Slideout'
import { ExternalLink } from '/app/atoms/Link/ExternalLink'
import { Divider } from '/app/atoms/structure'
import { getScanning, startDiscovery } from '/app/redux/discovery'

import type { Dispatch, State } from '/app/redux/types'
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/AppSettings/FeatureFlags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
LegacyStyledText,
TYPOGRAPHY,
} from '@opentrons/components'
import { Divider } from '../../atoms/structure'
import { ToggleButton } from '../../atoms/buttons'
import { Divider } from '/app/atoms/structure'
import { ToggleButton } from '/app/atoms/buttons'
import * as Config from '/app/redux/config'

import type { DevInternalFlag } from '/app/redux/config/types'
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/AppSettings/ManualIpHostnameField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
SPACING,
} from '@opentrons/components'

import { TertiaryButton } from '../../atoms/buttons'
import { TertiaryButton } from '/app/atoms/buttons'

interface IpHostnameFieldProps {
field: any
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/AppSettings/ManualIpHostnameForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { TertiaryButton } from '../../atoms/buttons'
import { TertiaryButton } from '/app/atoms/buttons'
import { addManualIp } from '/app/redux/config'
import { startDiscovery } from '/app/redux/discovery'

Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/AppSettings/ManualIpHostnameItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'

import { Divider } from '../../atoms/structure'
import { Divider } from '/app/atoms/structure'

const IpItem = styled.div`
flex: 1 1 auto;
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/AppSettings/PreviousVersionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Modal,
} from '@opentrons/components'

import { ExternalLink } from '../../atoms/Link/ExternalLink'
import { ExternalLink } from '/app/atoms/Link/ExternalLink'

export const UNINSTALL_APP_URL =
'https://support.opentrons.com/s/article/Uninstall-the-Opentrons-App'
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/ApplyHistoricOffsets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
ModalShell,
} from '@opentrons/components'
import { getTopPortalEl } from '../../App/portal'
import { ExternalLink } from '../../atoms/Link/ExternalLink'
import { ExternalLink } from '/app/atoms/Link/ExternalLink'
import { PythonLabwareOffsetSnippet } from '/app/molecules/PythonLabwareOffsetSnippet'
import { LabwareOffsetTabs } from '../LabwareOffsetTabs'
import { getLabwareDefinitionsFromCommands } from '/app/molecules/Command/utils/getLabwareDefinitionsFromCommands'
Expand Down
6 changes: 3 additions & 3 deletions app/src/organisms/CalibrationPanels/ChooseTipRack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import {
getTipLengthCalibrations,
getTipLengthForPipetteAndTiprack,
} from '/app/redux/calibration/'
import { Select } from '../../atoms/SelectField/Select'
import { Banner } from '../../atoms/Banner'
import { Divider } from '../../atoms/structure'
import { Select } from '/app/atoms/SelectField/Select'
import { Banner } from '/app/atoms/Banner'
import { Divider } from '/app/atoms/structure'
import { NeedHelpLink } from './NeedHelpLink'
import { ChosenTipRackRender } from './ChosenTipRackRender'

Expand Down
Loading

0 comments on commit 39bf51b

Please sign in to comment.