Skip to content

Conversation

movinsilva
Copy link
Contributor

@movinsilva movinsilva commented Apr 22, 2024

Purpose

  • add branding
  • add brandingText
  • add getBranding function (merge different branding input according to priority)
  • add getLocalization function (merge different branding text input according to priority)
  • add default branding objects
  • add default translations

Related Issues

Related PRs

Checklist

  • e2e cypress tests locally verified.
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

@movinsilva movinsilva force-pushed the js-ui-core--branding branch from 26f7079 to b47a515 Compare April 26, 2024 04:45
const {
baseUrl,
type = BrandingPreferenceTypes.Org,
name = 'WSO2',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a fallback?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes
since they are optional properties in the config, added these as a fallback.

* @returns A Promise that resolves to the response from the server.
* @throws {AsgardeoUIException} If the API call fails or when the response is not successful.
*/
export const brandingText = async (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const brandingText = async (
export const getBrandingPreferenceText = async (

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with 3951760

* @returns {Promise<BrandingPreferenceAPIResponseInterface>} A promise that resolves with the branding preferences.
* @throws {AsgardeoUIException} If an error occurs while fetching the branding preferences or when the response is unsuccessful.
*/
const branding = async (): Promise<BrandingPreferenceAPIResponseInterface> => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const branding = async (): Promise<BrandingPreferenceAPIResponseInterface> => {
const getBrandingPreference = async (): Promise<BrandingPreferenceAPIResponseInterface> => {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with adb5461

* under the License.
*/

import {AuthClient} from '../auth-client';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we have space after {. Let's check why this is not checked in Eslint?

Suggested change
import {AuthClient} from '../auth-client';
import { AuthClient } from '../auth-client';

@dasuni-30 dasuni-30 merged commit a385ab1 into asgardeo:main Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants