Open vfraga opened 3 months ago
Since we are not supporting custom texts, the solution should be towards not allowing custom texts to be added in the first place.
Hi @amanda-ariyaratne ,
Why do we provide an API for adding/updating custom texts [1] if we're not supporting it?
Describe the issue: The Branding component in the Console [1] allows users to add their branding styling and label text preferences. They're also able to add custom text by editing the JSON under the path
Branding > Styles & Text > Text > JSON
.I believe the snippet [2] was introduced to keep users from removing the default JSON entries, however the way it was implemented also makes it impossible to remove custom texts already persisted, since the API used to retrieve the data [3] returns both default and custom texts.
Therefore, it'd be best to use the data in the
resources/branding/i18n/screens/${screen}/${locale}.json
file, as it only stores the default entries [4].How to reproduce:
Save & Publish
button.Expected behavior: The Branding UI component should allow users to remove the added custom text.
Environment information:
[1] https://is.docs.wso2.com/en/7.0.0/guides/branding/configure-ui-branding/ [2] https://github.com/wso2/identity-apps/blob/%40wso2is/console%402.12.46/apps/console/src/features/branding/providers/branding-preference-provider.tsx#L413-L426 [3] https://github.com/wso2/identity-apps/blob/%40wso2is/console%402.12.46/apps/console/src/features/branding/api/use-get-custom-text-preference-resolve.ts#L72-L75 [4] https://github.com/wso2/identity-apps/blob/%40wso2is/console%402.12.46/apps/console/src/features/branding/api/use-get-custom-text-preference-fallbacks.ts#L51-L53