diff --git a/packages/ui/src/components/Visualization/ContextToolbar/Flows/FlowsList.test.tsx b/packages/ui/src/components/Visualization/ContextToolbar/Flows/FlowsList.test.tsx index 0bed73e62..5aa557311 100644 --- a/packages/ui/src/components/Visualization/ContextToolbar/Flows/FlowsList.test.tsx +++ b/packages/ui/src/components/Visualization/ContextToolbar/Flows/FlowsList.test.tsx @@ -126,7 +126,7 @@ describe('FlowsList.tsx', () => { }); expect(mockDeleteModalContext.actionConfirmation).toHaveBeenCalledWith({ - title: 'Permanently delete flow?', + title: "Do you want to delete the 'route-1234' route?", text: 'All steps will be lost.', }); }); diff --git a/packages/ui/src/components/Visualization/ContextToolbar/Flows/FlowsList.tsx b/packages/ui/src/components/Visualization/ContextToolbar/Flows/FlowsList.tsx index ca7738bc6..77479254c 100644 --- a/packages/ui/src/components/Visualization/ContextToolbar/Flows/FlowsList.tsx +++ b/packages/ui/src/components/Visualization/ContextToolbar/Flows/FlowsList.tsx @@ -140,7 +140,12 @@ export const FlowsList: FunctionComponent = (props) => { variant="plain" onClick={async (event) => { const isDeleteConfirmed = await deleteModalContext?.actionConfirmation({ - title: 'Permanently delete flow?', + title: + "Do you want to delete the '" + + flow.toVizNode().getId() + + "' " + + flow.toVizNode().getTitle() + + '?', text: 'All steps will be lost.', }); diff --git a/packages/ui/src/components/Visualization/Custom/ContextMenu/ItemDeleteGroup.test.tsx b/packages/ui/src/components/Visualization/Custom/ContextMenu/ItemDeleteGroup.test.tsx index 10c46d84f..83270ecab 100644 --- a/packages/ui/src/components/Visualization/Custom/ContextMenu/ItemDeleteGroup.test.tsx +++ b/packages/ui/src/components/Visualization/Custom/ContextMenu/ItemDeleteGroup.test.tsx @@ -42,7 +42,7 @@ describe('ItemDeleteGroup', () => { fireEvent.click(wrapper.getByText('Delete')); expect(mockDeleteModalContext.actionConfirmation).toHaveBeenCalledWith({ - title: 'Permanently delete flow?', + title: "Do you want to delete the 'undefined' test?", text: 'All steps will be lost.', }); }); diff --git a/packages/ui/src/components/Visualization/Custom/hooks/delete-group.hook.tsx b/packages/ui/src/components/Visualization/Custom/hooks/delete-group.hook.tsx index 7b3483cf9..2df9aa4c8 100644 --- a/packages/ui/src/components/Visualization/Custom/hooks/delete-group.hook.tsx +++ b/packages/ui/src/components/Visualization/Custom/hooks/delete-group.hook.tsx @@ -11,7 +11,7 @@ export const useDeleteGroup = (vizNode: IVisualizationNode) => { const onDeleteGroup = useCallback(async () => { /** Open delete confirm modal, get the confirmation */ const isDeleteConfirmed = await deleteModalContext?.actionConfirmation({ - title: 'Permanently delete flow?', + title: "Do you want to delete the '" + vizNode.getId() + "' " + vizNode.getTitle() + '?', text: 'All steps will be lost.', }); diff --git a/packages/ui/src/providers/action-confirmation-modal.provider.scss b/packages/ui/src/providers/action-confirmation-modal.provider.scss new file mode 100644 index 000000000..fd71ea894 --- /dev/null +++ b/packages/ui/src/providers/action-confirmation-modal.provider.scss @@ -0,0 +1,5 @@ +.pf-v5-c-modal-box { + &__title-text { + white-space: normal; + } +} diff --git a/packages/ui/src/providers/action-confirmation-modal.provider.tsx b/packages/ui/src/providers/action-confirmation-modal.provider.tsx index 2dcd5ad23..0c84021f4 100644 --- a/packages/ui/src/providers/action-confirmation-modal.provider.tsx +++ b/packages/ui/src/providers/action-confirmation-modal.provider.tsx @@ -1,5 +1,6 @@ import { Button, ButtonVariant, Modal, ModalVariant, Split, SplitItem } from '@patternfly/react-core'; import { FunctionComponent, PropsWithChildren, createContext, useCallback, useMemo, useRef, useState } from 'react'; +import './action-confirmation-modal.provider.scss'; export const ACTION_ID_CANCEL = 'cancel'; export const ACTION_ID_CONFIRM = 'confirm';