Skip to content

Commit 169b79d

Browse files
committed
fix: app group bulk actions focus trap
1 parent 53f45d2 commit 169b79d

File tree

3 files changed

+34
-22
lines changed

3 files changed

+34
-22
lines changed

src/Pages/Shared/EnvironmentOverviewTable/EnvironmentOverviewPopupMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const EnvironmentOverviewPopupMenu = ({
2525
showAriaLabelInTippy={false}
2626
/>
2727
</PopupMenu.Button>
28-
<PopupMenu.Body rootClassName="dc__border py-4 w-180">
28+
<PopupMenu.Body noBackDrop rootClassName="dc__border py-4 w-180">
2929
{popUpMenuItems.map((popUpMenuItem) => {
3030
if ('label' in popUpMenuItem) {
3131
const { label, onClick, disabled, iconName } = popUpMenuItem

src/components/ApplicationGroup/Details/EnvironmentOverview/HibernateModal.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ export const HibernateModal = ({
110110
<VisibleModal close={closeModal} onEscape={closeModal} className="">
111111
<div onClick={stopPropagation} className="modal__body w-400 pl-24 pr-24 pt-24 pb-24 fs-14 flex column">
112112
{isDeploymentWindowLoading ? (
113-
<div className="mh-320 flex">
114-
<Progressing pageLoader />
113+
<div className="mh-150 flex">
114+
<Progressing />
115115
</div>
116116
) : (
117117
<>
@@ -130,25 +130,25 @@ export const HibernateModal = ({
130130
</span>
131131
{renderHibernateModalBody()}
132132
</div>
133-
<div className="pt-40 flexbox dc__content-end w-100 dc__align-end dc__gap-12">
134-
<button
135-
onClick={closeModal}
136-
className="flex bg__primary dc__border-radius-4-imp h-36 pl-16 pr-16 pt-8 pb-8 dc__border"
137-
>
138-
Cancel
139-
</button>
140-
141-
<button
142-
type="button"
143-
className="cta flex h-36 pl-16 pr-16 pt-8 pb-8 w-96 dc__border-radius-4-imp"
144-
disabled={!showDefaultDrawer && isActionButtonDisabled}
145-
onClick={handleAction}
146-
>
147-
{openedHibernateModalType === MODAL_TYPE.HIBERNATE ? 'Hibernate' : 'Unhibernate'}
148-
</button>
149-
</div>
150133
</>
151134
)}
135+
<div className="pt-40 flexbox dc__content-end w-100 dc__align-end dc__gap-12">
136+
<button
137+
onClick={closeModal}
138+
className="flex bg__primary dc__border-radius-4-imp h-36 pl-16 pr-16 pt-8 pb-8 dc__border"
139+
>
140+
Cancel
141+
</button>
142+
143+
<button
144+
type="button"
145+
className="cta flex h-36 pl-16 pr-16 pt-8 pb-8 w-96 dc__border-radius-4-imp"
146+
disabled={!showDefaultDrawer && isActionButtonDisabled}
147+
onClick={handleAction}
148+
>
149+
{openedHibernateModalType === MODAL_TYPE.HIBERNATE ? 'Hibernate' : 'Unhibernate'}
150+
</button>
151+
</div>
152152
</div>
153153
</VisibleModal>
154154
)

src/components/ApplicationGroup/Details/EnvironmentOverview/RestartWorkloadModal.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ import { Prompt, useHistory, useLocation } from 'react-router-dom'
2020
import {
2121
ApiQueuingWithBatch,
2222
Button,
23+
ButtonStyleType,
24+
ButtonVariantType,
2325
Checkbox,
2426
CHECKBOX_VALUE,
27+
ComponentSizeType,
2528
DEFAULT_ROUTE_PROMPT_MESSAGE,
2629
Drawer,
2730
ErrorScreenManager,
2831
GenericEmptyState,
32+
Icon,
2933
InfoBlock,
3034
MODAL_TYPE,
3135
stopPropagation,
@@ -36,7 +40,6 @@ import {
3640
import { ReactComponent as Retry } from '../../../../assets/icons/ic-arrow-clockwise.svg'
3741
import { ReactComponent as DropdownIcon } from '../../../../assets/icons/ic-arrow-left.svg'
3842
import { ReactComponent as RotateIcon } from '../../../../assets/icons/ic-arrows_clockwise.svg'
39-
import { ReactComponent as Close } from '../../../../assets/icons/ic-close.svg'
4043
import { ReactComponent as MechanicalIcon } from '../../../../assets/img/ic-mechanical-operation.svg'
4144
import { importComponentFromFELibrary } from '../../../common'
4245
import {
@@ -205,7 +208,16 @@ export const RestartWorkloadModal = ({
205208
const renderHeaderSection = (): JSX.Element => (
206209
<div className="flex dc__content-space dc__border-bottom pt-12 pr-20 pb-12 pl-20">
207210
<div className="fs-16 fw-6 lh-1-5">{` Restart workloads on '${envName}'`}</div>
208-
<Close className="icon-dim-24 cursor" onClick={closeDrawer} />
211+
<Button
212+
dataTestId="close-bulk-restart"
213+
icon={<Icon name="ic-close-large" color={null} />}
214+
size={ComponentSizeType.xs}
215+
onClick={closeDrawer}
216+
ariaLabel="close bulk restart drawer"
217+
showAriaLabelInTippy={false}
218+
style={ButtonStyleType.negativeGrey}
219+
variant={ButtonVariantType.borderLess}
220+
/>
209221
</div>
210222
)
211223

0 commit comments

Comments
 (0)