From 229bada2ea57d6731c51756ed8f4055bb03e39b5 Mon Sep 17 00:00:00 2001 From: savindi7 Date: Fri, 11 Oct 2024 19:31:11 +0530 Subject: [PATCH 1/3] Improve the revert Branding confirmation message --- .../console/src/extensions/i18n/resources/en-US/extensions.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/console/src/extensions/i18n/resources/en-US/extensions.ts b/apps/console/src/extensions/i18n/resources/en-US/extensions.ts index f8cfce5937f..a0d1ed8e204 100755 --- a/apps/console/src/extensions/i18n/resources/en-US/extensions.ts +++ b/apps/console/src/extensions/i18n/resources/en-US/extensions.ts @@ -1353,9 +1353,7 @@ export const extensions: Extensions = { assertionHint: "Please confirm your action.", content: "This action is irreversible and will permanently revert your branding preferences.", header: "Are you sure?", - message: - "If you revert the branding preferences, your users will start to see " + - "{{ productName }} branding on the login flows. Please proceed with caution." + message: "Reverting your branding preferences will apply the default branding from the next available level (such as your organization or parent organization)." }, unpublishBranding: { assertionHint: "Please confirm your action.", From 926ca4a0d10307da21db3b28fc467a0c0c910e68 Mon Sep 17 00:00:00 2001 From: savindi7 Date: Sat, 12 Oct 2024 08:42:38 +0530 Subject: [PATCH 2/3] Add notification message on default app-wise branding --- .../src/extensions/i18n/models/extensions.ts | 1 + .../i18n/resources/en-US/extensions.ts | 3 ++- .../components/branding-page-layout.tsx | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/apps/console/src/extensions/i18n/models/extensions.ts b/apps/console/src/extensions/i18n/models/extensions.ts index aaddd74433f..74ff6b34257 100755 --- a/apps/console/src/extensions/i18n/models/extensions.ts +++ b/apps/console/src/extensions/i18n/models/extensions.ts @@ -1759,6 +1759,7 @@ export interface Extensions { applicationBrandingtitle: string; applicationBrandingDescription: string; applicationListWarning: string; + defaultBrandingAppliedMessage: string; backButtonText: string; description: string; organization: string; diff --git a/apps/console/src/extensions/i18n/resources/en-US/extensions.ts b/apps/console/src/extensions/i18n/resources/en-US/extensions.ts index a0d1ed8e204..de4dae4de29 100755 --- a/apps/console/src/extensions/i18n/resources/en-US/extensions.ts +++ b/apps/console/src/extensions/i18n/resources/en-US/extensions.ts @@ -1983,7 +1983,8 @@ export const extensions: Extensions = { application: "Application", applicationBrandingtitle: "Application Branding", applicationBrandingDescription: "Customize consumer-facing user interfaces of applications.", - applicationListWarning: "Please select an application from the list above to customize the branding preferences.", + applicationListWarning: "Select an application from the list above to customize the branding preferences.", + defaultBrandingAppliedMessage: "Organization branding has been applied to this application because no app-specific branding is set.", backButtonText: "Go back to Application Settings", description: "Customize consumer-facing user interfaces of applications in your organization.", organization: "Organization", diff --git a/features/admin.branding.v1/components/branding-page-layout.tsx b/features/admin.branding.v1/components/branding-page-layout.tsx index e9ff266277e..59ecb0a3a69 100644 --- a/features/admin.branding.v1/components/branding-page-layout.tsx +++ b/features/admin.branding.v1/components/branding-page-layout.tsx @@ -29,6 +29,8 @@ import useAIBrandingPreference from "@wso2is/admin.branding.ai.v1/hooks/use-ai-b import { AppConstants, AppState, history } from "@wso2is/admin.core.v1"; import { FeatureStatusLabel } from "@wso2is/admin.feature-gate.v1/models/feature-status"; import { useGetCurrentOrganizationType } from "@wso2is/admin.organizations.v1/hooks/use-get-organization-type"; +import useGetBrandingPreferenceResolve from "@wso2is/common.branding.v1/api/use-get-branding-preference-resolve"; +import { BrandingPreferenceTypes } from "@wso2is/common.branding.v1/models"; import { AlertLevels, IdentifiableComponentInterface } from "@wso2is/core/models"; import { addAlert } from "@wso2is/core/store"; import { DocumentationLink, PageLayout, useDocumentation } from "@wso2is/react-components"; @@ -77,6 +79,10 @@ const BrandingPageLayout: FunctionComponent = ( updateActiveTab } = useBrandingPreference(); + const { + data: brandingData + } = useGetBrandingPreferenceResolve(selectedApplication, BrandingPreferenceTypes.APP); + const { data: applicationList, isLoading: isApplicationListFetchRequestLoading, @@ -418,6 +424,18 @@ const BrandingPageLayout: FunctionComponent = ( ) } + { + brandingMode === BrandingModes.APPLICATION && + selectedApplication && + brandingData?.type === BrandingPreferenceTypes.ORG && ( + + { t("extensions:develop.branding.pageHeader.defaultBrandingAppliedMessage") } + + ) + } { !brandingDisabledFeatures?.includes(AI_BRANDING_FEATURE_ID) && From bbe9190f74ec6d772e68dfc0103ecc538be3bce0 Mon Sep 17 00:00:00 2001 From: savindi7 Date: Sat, 12 Oct 2024 08:45:08 +0530 Subject: [PATCH 3/3] Add Changeset --- .changeset/lovely-weeks-wait.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/lovely-weeks-wait.md diff --git a/.changeset/lovely-weeks-wait.md b/.changeset/lovely-weeks-wait.md new file mode 100644 index 00000000000..867c842d92d --- /dev/null +++ b/.changeset/lovely-weeks-wait.md @@ -0,0 +1,6 @@ +--- +"@wso2is/admin.branding.v1": patch +"@wso2is/console": patch +--- + +Improve the revert Branding confirmation and default app-wise branding messages.