From 902ee07990a5214b0ba9d544ca4a8b1387b97c15 Mon Sep 17 00:00:00 2001 From: Jeremy Pople Date: Mon, 12 Aug 2024 17:07:48 -0500 Subject: [PATCH 1/2] add new D&D toasts --- .../DetectionItemActions.tsx | 22 ++++--------------- .../DiscoveryItemActions.tsx | 7 ++++++ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/clients/admin-ui/src/features/data-discovery-and-detection/DetectionItemActions.tsx b/clients/admin-ui/src/features/data-discovery-and-detection/DetectionItemActions.tsx index d868ab65e6..c0adbc7370 100644 --- a/clients/admin-ui/src/features/data-discovery-and-detection/DetectionItemActions.tsx +++ b/clients/admin-ui/src/features/data-discovery-and-detection/DetectionItemActions.tsx @@ -12,7 +12,6 @@ import { DiffStatus, StagedResource } from "~/types/api"; import { MonitorOffIcon } from "../common/Icon/MonitorOffIcon"; import { MonitorOnIcon } from "../common/Icon/MonitorOnIcon"; -import { TrashCanOutlineIcon } from "../common/Icon/TrashCanOutlineIcon"; import ActionButton from "./ActionButton"; import { useConfirmResourceMutation, @@ -59,8 +58,6 @@ const DetectionItemAction = ({ resource }: DetectionItemActionProps) => { (childDiffStatus[DiffStatus.ADDITION] || childDiffStatus[DiffStatus.REMOVAL]); - const showRemoveAction = false; - return ( e.stopPropagation()}> {showStartMonitoringAction && ( @@ -110,21 +107,10 @@ const DetectionItemAction = ({ resource }: DetectionItemActionProps) => { staged_resource_urn: resource.urn, monitor_config_id: resource.monitor_config_id!, }); - setIsProcessingAction(false); - }} - disabled={isProcessingAction} - /> - )} - {showRemoveAction && ( - } - onClick={async () => { - setIsProcessingAction(true); - await confirmResourceMutation({ - staged_resource_urn: resource.urn, - monitor_config_id: resource.monitor_config_id!, - }); + successAlert( + `These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".`, + `Table changes confirmed`, + ); setIsProcessingAction(false); }} disabled={isProcessingAction} diff --git a/clients/admin-ui/src/features/data-discovery-and-detection/DiscoveryItemActions.tsx b/clients/admin-ui/src/features/data-discovery-and-detection/DiscoveryItemActions.tsx index a3f60aa5d8..4e97d25ca5 100644 --- a/clients/admin-ui/src/features/data-discovery-and-detection/DiscoveryItemActions.tsx +++ b/clients/admin-ui/src/features/data-discovery-and-detection/DiscoveryItemActions.tsx @@ -1,6 +1,7 @@ import { ButtonSpinner, CheckIcon, HStack, ViewOffIcon } from "fidesui"; import { useState } from "react"; +import { useAlert } from "~/features/common/hooks"; import { DiffStatus, StagedResource } from "~/types/api"; import ActionButton from "./ActionButton"; @@ -22,6 +23,8 @@ const DiscoveryItemActions = ({ resource }: DiscoveryItemActionsProps) => { const [isProcessingAction, setIsProcessingAction] = useState(false); + const { successAlert } = useAlert(); + const { diff_status: diffStatus, child_diff_statuses: childDiffStatus } = resource; @@ -56,6 +59,10 @@ const DiscoveryItemActions = ({ resource }: DiscoveryItemActionsProps) => { await promoteResourceMutation({ staged_resource_urn: resource.urn, }); + successAlert( + `These changes have been added to a Fides dataset. To view, navigate to "Manage datasets".`, + `Table changes confirmed`, + ); setIsProcessingAction(false); }} disabled={isProcessingAction} From c51bbddbbed4f243ba2eebdf60d1211176c24906 Mon Sep 17 00:00:00 2001 From: Jeremy Pople Date: Mon, 12 Aug 2024 17:19:18 -0500 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ed9f45b3f..31207d14e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The types of changes are: - Added support for SSO Login with multiple providers (Fides Plus feature) [#5134](https://github.com/ethyca/fides/pull/5134) - Added current version to the window.Fides object [#5173](https://github.com/ethyca/fides/pull/5173) - Adds user_read scope to approver role so that they can update their own password [#5178](https://github.com/ethyca/fides/pull/5178) +- Add success toast on confirming classification in data discovery tables [#5182](https://github.com/ethyca/fides/pull/5182) ### Fixed - Fixed the OAuth2 configuration for the Snap integration [#5158](https://github.com/ethyca/fides/pull/5158)