Skip to content

Commit

Permalink
fix(1657): better name as subject when deleting a flow
Browse files Browse the repository at this point in the history
  • Loading branch information
tplevko committed Nov 29, 2024
1 parent 4c19ab6 commit 27a4e40
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ export const FlowsList: FunctionComponent<IFlowsList> = (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.',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
});

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pf-v5-c-modal-box {
&__title-text {
white-space: normal;
}
}
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 27a4e40

Please sign in to comment.