From 9dc523d57d26cef7cc14f36012cb59d7f2e9a178 Mon Sep 17 00:00:00 2001 From: "bugs-buddy-jira-ai-issue-solver[bot]" <252868304+bugs-buddy-jira-ai-issue-solver[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 13:42:48 +0000 Subject: [PATCH 1/2] EDM-3804: No confirmation screen after Catalog creation in wizard flow Co-authored-by: Celia Amador Gonzalez Made-with: Cursor --- libs/i18n/locales/en/translation.json | 5 +- .../CreateCatalogModal.tsx | 159 +++++++++++------- 2 files changed, 106 insertions(+), 58 deletions(-) diff --git a/libs/i18n/locales/en/translation.json b/libs/i18n/locales/en/translation.json index 7c3db06d0..f64c034d9 100644 --- a/libs/i18n/locales/en/translation.json +++ b/libs/i18n/locales/en/translation.json @@ -210,6 +210,10 @@ "View catalog": "View catalog", "Edit catalog": "Edit catalog", "Create catalog": "Create catalog", + "Catalog created": "Catalog created", + "Catalog created successfully": "Catalog created successfully", + "\"{{catalogName}}\" has been created. You can now create a catalog item or return to the catalog.": "\"{{catalogName}}\" has been created. You can now create a catalog item or return to the catalog.", + "Return to catalog": "Return to catalog", "Short description": "Short description", "Icon": "Icon", "Provider": "Provider", @@ -470,7 +474,6 @@ "Update configuration successful": "Update configuration successful", "Device will download and apply the update according to the configured update policies.": "Device will download and apply the update according to the configured update policies.", "Devices will download and apply the update according to the configured update policies.": "Devices will download and apply the update according to the configured update policies.", - "Return to catalog": "Return to catalog", "View device": "View device", "View fleet": "View fleet", "Not a valid configuration": "Not a valid configuration", diff --git a/libs/ui-components/src/components/Catalog/AddCatalogItemWizard/CreateCatalogModal.tsx b/libs/ui-components/src/components/Catalog/AddCatalogItemWizard/CreateCatalogModal.tsx index 01349f320..e0b5f22f4 100644 --- a/libs/ui-components/src/components/Catalog/AddCatalogItemWizard/CreateCatalogModal.tsx +++ b/libs/ui-components/src/components/Catalog/AddCatalogItemWizard/CreateCatalogModal.tsx @@ -2,6 +2,11 @@ import * as React from 'react'; import { Alert, Button, + EmptyState, + EmptyStateActions, + EmptyStateBody, + EmptyStateFooter, + EmptyStateStatus, FormGroup, Modal, ModalBody, @@ -18,6 +23,7 @@ import { Catalog } from '@flightctl/types/alpha'; import { useFetch } from '../../../hooks/useFetch'; import { useTranslation } from '../../../hooks/useTranslation'; +import { ROUTE, useNavigate } from '../../../hooks/useNavigate'; import { getDnsSubdomainValidations, validKubernetesDnsSubdomain, validURLSchema } from '../../form/validations'; import FlightCtlForm from '../../form/FlightCtlForm'; import NameField from '../../form/NameField'; @@ -37,7 +43,9 @@ type CreateCatalogModalProps = { const CreateCatalogModal = ({ onClose, onSuccess, catalog }: CreateCatalogModalProps) => { const { t } = useTranslation(); const { post, patch } = useFetch(); + const navigate = useNavigate(); const [error, setError] = React.useState(); + const [createdCatalog, setCreatedCatalog] = React.useState(); const isEdit = !!catalog; const isReadOnly = !!catalog?.metadata?.owner; @@ -97,7 +105,7 @@ const CreateCatalogModal = ({ onClose, onSuccess, catalog }: CreateCatalogModalP } } else { const result = await post('catalogs', getCatalogResource(values)); - onSuccess(result); + setCreatedCatalog(result); } } catch (e) { setError(e); @@ -106,69 +114,106 @@ const CreateCatalogModal = ({ onClose, onSuccess, catalog }: CreateCatalogModalP > {({ isSubmitting, isValid, submitForm, dirty }) => ( <> - + - - - - - - - - - - - - - - - - + + {t( + '"{{catalogName}}" has been created. You can now create a catalog item or return to the catalog.', + { + catalogName: createdCatalog.spec.displayName || createdCatalog.metadata.name, + }, + )} + + + + + + + + + + + ) : ( + + - - + + + + + + + + + + + + + + + + + )} - - - {!!error && ( + {!createdCatalog && ( + + + {!!error && ( + + + + )} - - - )} - - - {!isReadOnly && ( + + {!isReadOnly && ( + + + + )} - - )} - - - - - - - + + + + + )} )} From e9e8ed5c92f29d59eec6d336182bd68f63b3ac28 Mon Sep 17 00:00:00 2001 From: "bugs-buddy-jira-ai-issue-solver[bot]" <252868304+bugs-buddy-jira-ai-issue-solver[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 14:10:03 +0000 Subject: [PATCH 2/2] EDM-3804: address PR feedback Co-authored-by: Celia Amador Gonzalez Made-with: Cursor --- libs/i18n/locales/en/translation.json | 4 +-- .../CreateCatalogModal.tsx | 36 +++++-------------- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/libs/i18n/locales/en/translation.json b/libs/i18n/locales/en/translation.json index f64c034d9..7ffbad1e0 100644 --- a/libs/i18n/locales/en/translation.json +++ b/libs/i18n/locales/en/translation.json @@ -212,8 +212,7 @@ "Create catalog": "Create catalog", "Catalog created": "Catalog created", "Catalog created successfully": "Catalog created successfully", - "\"{{catalogName}}\" has been created. You can now create a catalog item or return to the catalog.": "\"{{catalogName}}\" has been created. You can now create a catalog item or return to the catalog.", - "Return to catalog": "Return to catalog", + "\"{{catalogName}}\" has been created and is ready to use. You can select it from the list of available catalogs.": "\"{{catalogName}}\" has been created and is ready to use. You can select it from the list of available catalogs.", "Short description": "Short description", "Icon": "Icon", "Provider": "Provider", @@ -474,6 +473,7 @@ "Update configuration successful": "Update configuration successful", "Device will download and apply the update according to the configured update policies.": "Device will download and apply the update according to the configured update policies.", "Devices will download and apply the update according to the configured update policies.": "Devices will download and apply the update according to the configured update policies.", + "Return to catalog": "Return to catalog", "View device": "View device", "View fleet": "View fleet", "Not a valid configuration": "Not a valid configuration", diff --git a/libs/ui-components/src/components/Catalog/AddCatalogItemWizard/CreateCatalogModal.tsx b/libs/ui-components/src/components/Catalog/AddCatalogItemWizard/CreateCatalogModal.tsx index e0b5f22f4..ed356e3a5 100644 --- a/libs/ui-components/src/components/Catalog/AddCatalogItemWizard/CreateCatalogModal.tsx +++ b/libs/ui-components/src/components/Catalog/AddCatalogItemWizard/CreateCatalogModal.tsx @@ -3,9 +3,7 @@ import { Alert, Button, EmptyState, - EmptyStateActions, EmptyStateBody, - EmptyStateFooter, EmptyStateStatus, FormGroup, Modal, @@ -23,7 +21,6 @@ import { Catalog } from '@flightctl/types/alpha'; import { useFetch } from '../../../hooks/useFetch'; import { useTranslation } from '../../../hooks/useTranslation'; -import { ROUTE, useNavigate } from '../../../hooks/useNavigate'; import { getDnsSubdomainValidations, validKubernetesDnsSubdomain, validURLSchema } from '../../form/validations'; import FlightCtlForm from '../../form/FlightCtlForm'; import NameField from '../../form/NameField'; @@ -43,7 +40,6 @@ type CreateCatalogModalProps = { const CreateCatalogModal = ({ onClose, onSuccess, catalog }: CreateCatalogModalProps) => { const { t } = useTranslation(); const { post, patch } = useFetch(); - const navigate = useNavigate(); const [error, setError] = React.useState(); const [createdCatalog, setCreatedCatalog] = React.useState(); @@ -120,30 +116,12 @@ const CreateCatalogModal = ({ onClose, onSuccess, catalog }: CreateCatalogModalP {t( - '"{{catalogName}}" has been created. You can now create a catalog item or return to the catalog.', + '"{{catalogName}}" has been created and is ready to use. You can select it from the list of available catalogs.', { catalogName: createdCatalog.spec.displayName || createdCatalog.metadata.name, }, )} - - - - - - - - ) : ( @@ -182,8 +160,12 @@ const CreateCatalogModal = ({ onClose, onSuccess, catalog }: CreateCatalogModalP )} - {!createdCatalog && ( - + + {createdCatalog ? ( + + ) : ( {!!error && ( @@ -212,8 +194,8 @@ const CreateCatalogModal = ({ onClose, onSuccess, catalog }: CreateCatalogModalP - - )} + )} + )}