From b3b582c8fa17a978b941a7c8f4ac05871b0bb6a7 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Thu, 12 Aug 2021 09:54:00 -0700 Subject: [PATCH 1/5] Added notification when user updates group --- ui/src/app/dashboard/view/SourcesTab.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/src/app/dashboard/view/SourcesTab.js b/ui/src/app/dashboard/view/SourcesTab.js index d60218f08..ada7b83cd 100644 --- a/ui/src/app/dashboard/view/SourcesTab.js +++ b/ui/src/app/dashboard/view/SourcesTab.js @@ -5,10 +5,14 @@ import SourceList from '../../metadata/domain/source/component/SourceList'; import { useMetadataEntities, useMetadataEntity } from '../../metadata/hooks/api'; import { Search } from '../component/Search'; +import { NotificationContext, createNotificationAction } from '../../notifications/hoc/Notifications'; + const searchProps = ['serviceProviderName', 'entityId', 'createdBy']; export function SourcesTab () { + const { dispatch } = React.useContext(NotificationContext); + const [sources, setSources] = React.useState([]); const { get, response } = useMetadataEntities('source', { @@ -37,6 +41,9 @@ export function SourcesTab () { idOfOwner: group }); if (updater.response.ok) { + dispatch(createNotificationAction( + `Updated group successfully.` + )); loadSources(); } } From 79cc33871075e61580d11f20fb1dce255fc6b730 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Fri, 13 Aug 2021 07:27:14 -0700 Subject: [PATCH 2/5] Fixed spacing --- ui/src/app/dashboard/view/SourcesTab.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/src/app/dashboard/view/SourcesTab.js b/ui/src/app/dashboard/view/SourcesTab.js index ada7b83cd..76c5d3770 100644 --- a/ui/src/app/dashboard/view/SourcesTab.js +++ b/ui/src/app/dashboard/view/SourcesTab.js @@ -41,9 +41,7 @@ export function SourcesTab () { idOfOwner: group }); if (updater.response.ok) { - dispatch(createNotificationAction( - `Updated group successfully.` - )); + dispatch(createNotificationAction(`Updated group successfully.`)); loadSources(); } } From 3629f722a0a37a4979186f1b9e3eea73fb98d6c5 Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Fri, 13 Aug 2021 12:00:53 -0700 Subject: [PATCH 3/5] Fixed a11y issue with delete button --- ui/src/app/form/component/fields/FilterTargetField.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/app/form/component/fields/FilterTargetField.js b/ui/src/app/form/component/fields/FilterTargetField.js index 959306b71..3bd6fb26a 100644 --- a/ui/src/app/form/component/fields/FilterTargetField.js +++ b/ui/src/app/form/component/fields/FilterTargetField.js @@ -252,7 +252,7 @@ const FilterTargetField = ({ {(preview, loading, xml) => ( - {id} + {id} {preview &&