Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): add branding #3

Merged
merged 25 commits into from
Apr 29, 2024
Merged

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

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.

None yet

3 participants