Skip to content

Commit

Permalink
fix(protocol-designer): remove DisabledModal from PD (#16964)
Browse files Browse the repository at this point in the history
* fix(protocol-designer): remove DisabledModal from PD
  • Loading branch information
koji authored Nov 22, 2024
1 parent 9b9ed16 commit 015e182
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions protocol-designer/src/ProtocolEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ import { HTML5Backend } from 'react-dnd-html5-backend'
import { DIRECTION_COLUMN, Flex, OVERFLOW_AUTO } from '@opentrons/components'
import { PortalRoot as TopPortalRoot } from './components/portals/TopPortal'
import { ProtocolRoutes } from './ProtocolRoutes'
import { useScreenSizeCheck } from './resources/useScreenSizeCheck'
import { DisabledScreen } from './organisms/DisabledScreen'

function ProtocolEditorComponent(): JSX.Element {
const isValidSize = useScreenSizeCheck()
return (
<div
id="protocol-editor"
style={{ width: '100%', height: '100vh', overflow: OVERFLOW_AUTO }}
>
<TopPortalRoot />
<Flex flexDirection={DIRECTION_COLUMN}>
{!isValidSize && <DisabledScreen />}
<HashRouter>
<ProtocolRoutes />
</HashRouter>
Expand Down
3 changes: 3 additions & 0 deletions protocol-designer/src/organisms/DisabledScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import {
} from '@opentrons/components'
import { getTopPortalEl } from '../../components/portals/TopPortal'

// Note: We decided not to use this component for the release.
// We will find out a better way to handle responsiveness with user's screen size issue.
// This component may be used in the future. If not, we will remove it.
export function DisabledScreen(): JSX.Element {
const { t } = useTranslation('shared')

Expand Down

0 comments on commit 015e182

Please sign in to comment.