From 581a58f639cb661c8506eef5ad780c701a1667c8 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 6 Nov 2023 11:22:16 +0530 Subject: [PATCH 1/2] Improve text branding section logic --- .../providers/branding-preference-provider.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/console/src/features/branding/providers/branding-preference-provider.tsx b/apps/console/src/features/branding/providers/branding-preference-provider.tsx index 30cb947e0b1..79afb7e09a6 100644 --- a/apps/console/src/features/branding/providers/branding-preference-provider.tsx +++ b/apps/console/src/features/branding/providers/branding-preference-provider.tsx @@ -39,6 +39,7 @@ import useGetBrandingPreferenceResolve from "../api/use-get-branding-preference- import useGetCustomTextPreference from "../api/use-get-custom-text-preference"; import useGetCustomTextPreferenceFallbacks from "../api/use-get-custom-text-preference-fallbacks"; import useGetCustomTextPreferenceMeta from "../api/use-get-custom-text-preference-meta"; +import { BrandingPreferencesConstants } from "../constants/branding-preferences-constants"; import { CustomTextPreferenceConstants } from "../constants/custom-text-preference-constants"; import AuthenticationFlowContext from "../context/branding-preference-context"; import { BrandingSubFeatures, PreviewScreenType } from "../models/branding-preferences"; @@ -363,7 +364,15 @@ const BrandingPreferenceProvider: FunctionComponent { + // If the tab is the text tab, set the preview screen to common before changing the tab. + // This is done to overcome an issue occurred in only production. + if (tab === BrandingPreferencesConstants.TABS.TEXT_TAB_ID) { + setSelectedPreviewScreen(PreviewScreenType.COMMON); + } + + setActiveTab(tab); + }, updateCustomTextFormSubscription: ( subscription: FormState ): void => { From 2286beb24a19c05ed040548646e3ee296c30dba5 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 6 Nov 2023 11:24:09 +0530 Subject: [PATCH 2/2] =?UTF-8?q?Add=20changeset=20=F0=9F=A6=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/perfect-forks-perform.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/perfect-forks-perform.md diff --git a/.changeset/perfect-forks-perform.md b/.changeset/perfect-forks-perform.md new file mode 100644 index 00000000000..36d3242d582 --- /dev/null +++ b/.changeset/perfect-forks-perform.md @@ -0,0 +1,5 @@ +--- +"@wso2is/console": patch +--- + +Improve text branding section logic