Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protocol-designer): remove DisabledModal from PD #16964

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind adding a comment to DisabledScreen explaining that it is not in use currently but we might add it back when we revisit PD responsiveness?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, sure.


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
Loading