Skip to content

Commit

Permalink
fix(protocol-designer): fix modal position (#16733)
Browse files Browse the repository at this point in the history
* fix(protocol-designer): fix modal position
  • Loading branch information
koji authored Nov 8, 2024
1 parent 8fe6a43 commit 041c11a
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const AutoAddPauseUntilTempStepModal = (props: Props): JSX.Element => {

return (
<Modal
marginLeft="0"
title={t('auto_add_pause_until_temp_step.redesign.title', {
module: displayModule,
temp: displayTemperature,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function ConfirmDeleteModal(props: Props): JSX.Element {

return createPortal(
<Modal
marginLeft="0"
title={t(`confirm_delete_modal.${modalType}.title`)}
titleElement1={
<Icon name="alert-circle" color={COLORS.yellow50} size="1.25rem" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const AnnouncementModal = (
<>
{showAnnouncementModal && (
<Modal
marginLeft="0"
title={heading}
type="info"
footer={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export function BlockingHintModal(props: HintProps): JSX.Element {

return createPortal(
<Modal
marginLeft="0"
type="warning"
zIndexOverlay={15}
title={t(`hint.${hintKey}.title`)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function ConfirmDeleteStagingAreaModal(
return createPortal(
<HandleEnter onEnter={onConfirm}>
<Modal
marginLeft="0"
zIndexOverlay={11}
title={t('staging_area_has_labware')}
type="info"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export function DefineLiquidsModal(
}}
>
<Modal
marginLeft="0"
zIndexOverlay={15}
width="42.0625rem"
title={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export function EditInstrumentsModal(
return createPortal(
<HandleEnter onEnter={handleOnSave}>
<Modal
marginLeft="0"
title={
page === 'add'
? t('shared:edit_pipette')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function EditNickNameModal(props: EditNickNameModalProps): JSX.Element {
return createPortal(
<HandleEnter onEnter={saveNickname}>
<Modal
marginLeft="0"
title={t('rename_labware')}
type="info"
onClose={onClose}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function EditProtocolMetadataModal(

return createPortal(
<Modal
marginLeft="0"
title={t('shared:edit_protocol_metadata')}
type="info"
closeOnOutsideClick
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function FileUploadMessagesModal(): JSX.Element | null {

return (
<Modal
marginLeft="0"
type={message?.isError ? 'error' : 'info'}
title={title}
closeOnOutsideClick
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export function IncompatibleTipsModal(
return (
<HandleEnter onEnter={handleShowAllTips}>
<Modal
marginLeft="0"
title={t('incompatible_tips')}
type="warning"
closeOnOutsideClick
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function LabwareUploadModal(): JSX.Element | null {

return (
<Modal
marginLeft="0"
type={
message.messageType === 'ASK_FOR_LABWARE_OVERWRITE'
? 'warning'
Expand Down
1 change: 1 addition & 0 deletions protocol-designer/src/organisms/RenameStepModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function RenameStepModal(props: RenameStepModalProps): JSX.Element {

return createPortal(
<Modal
marginLeft="0"
title={t('shared:name_step')}
type="info"
closeOnOutsideClick
Expand Down
1 change: 1 addition & 0 deletions protocol-designer/src/organisms/SelectWellsModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const SelectWellsModal = (

return (
<Modal
marginLeft="0"
width="42.0625rem"
zIndex={15}
zIndexOverlay={11}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ export function ZTipPositionModal(props: ZTipPositionModalProps): JSX.Element {

return createPortal(
<Modal
marginLeft="0"
type="info"
width="594px"
width="37.125rem"
closeOnOutsideClick
title={t(`shared:tip_position_${name}`)}
onClose={handleCancel}
Expand Down
3 changes: 2 additions & 1 deletion protocol-designer/src/organisms/TipPositionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ export function TipPositionModal(

return createPortal(
<Modal
marginLeft="0"
type="info"
width="594px"
width="37.125rem"
closeOnOutsideClick
title={t('shared:tip_position', { prefix })}
onClose={handleCancel}
Expand Down
1 change: 1 addition & 0 deletions protocol-designer/src/organisms/WellOrderModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export function WellOrderModal(props: WellOrderModalProps): JSX.Element | null {

return createPortal(
<Modal
marginLeft="0"
width="37.125rem"
closeOnOutsideClick
type="info"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export function ThermocyclerProfileModal(

return (
<Modal
marginLeft="0"
zIndexOverlay={11} // toolbox zIndex is set to 10
title={t('form:step_edit_form.field.thermocyclerProfile.edit')}
width="45rem"
Expand Down

0 comments on commit 041c11a

Please sign in to comment.