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

Fix issue with connector icons in the visual editor #4367

Merged
merged 5 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/little-cycles-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/console": patch
---

Fix borken connector icons in the visual editor
NipuniBhagya marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 6 additions & 0 deletions .changeset/witty-eggs-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@wso2is/myaccount": patch
"@wso2is/theme": patch
---

Fix my account setting section component issue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import {
import { AdaptiveScriptUtils } from "../../applications/utils/adaptive-script-utils";
import { SignInMethodUtils } from "../../applications/utils/sign-in-method-utils";
import { AuthenticatorManagementConstants } from "../../connections/constants/autheticator-constants";
import { AuthenticatorCategories } from "../../connections/models/authenticators";
import { AuthenticatorMeta } from "../../connections/meta/authenticator-meta";
import { ConnectionInterface } from "../../connections/models/connection";
import { ConnectionsManagementUtils } from "../../connections/utils/connection-utils";
import { AppState } from "../../core/store";
import {
Expand Down Expand Up @@ -174,15 +175,7 @@ const AuthenticationFlowProvider = (props: PropsWithChildren<AuthenticationFlowP
authenticator.id,
authenticator.displayName
);
}

authenticator.image = authenticator.idp === AuthenticatorCategories.LOCAL ||
authenticator.defaultAuthenticator?.authenticatorId ===
AuthenticatorManagementConstants.ORGANIZATION_ENTERPRISE_AUTHENTICATOR_ID
? authenticator.image
: ConnectionsManagementUtils
.resolveConnectionResourcePath(
connectionResourcesUrl, authenticator.image);
}

if (authenticator.name === IdentityProviderManagementConstants.BACKUP_CODE_AUTHENTICATOR) {
recoveryAuthenticators.push(authenticator);
Expand All @@ -194,6 +187,15 @@ const AuthenticationFlowProvider = (props: PropsWithChildren<AuthenticationFlowP
});

federatedAuthenticators.forEach((authenticator: GenericAuthenticatorInterface) => {
authenticator.image = authenticator.defaultAuthenticator?.authenticatorId ===
AuthenticatorManagementConstants.ORGANIZATION_ENTERPRISE_AUTHENTICATOR_ID
? AuthenticatorMeta.getAuthenticatorIcon(
(authenticator as ConnectionInterface)
.federatedAuthenticators?.defaultAuthenticatorId
?? authenticator.defaultAuthenticator?.authenticatorId)
: ConnectionsManagementUtils
.resolveConnectionResourcePath(connectionResourcesUrl, authenticator.image);

if (
ApplicationManagementConstants.SOCIAL_AUTHENTICATORS.includes(
authenticator.defaultAuthenticator.authenticatorId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
deleteConnection,
getConnectedApps
} from "../api/connections";
import { getConnectionIcons } from "../configs/ui";
import { AuthenticatorManagementConstants } from "../constants/autheticator-constants";
import { AuthenticatorMeta } from "../meta/authenticator-meta";
import {
Expand Down Expand Up @@ -416,8 +417,10 @@ export const AuthenticatorGrid: FunctionComponent<AuthenticatorGridPropsInterfac
resourceDocumentationLink = { null }
resourceImage={
(authenticator?.type === "FEDERATED" || isIdP) && !isOrganizationSSOIDP
? ConnectionsManagementUtils.resolveConnectionResourcePath(
"", authenticator?.image)
? authenticator?.image
? ConnectionsManagementUtils.resolveConnectionResourcePath(
"", authenticator?.image)
: getConnectionIcons().default
NipuniBhagya marked this conversation as resolved.
Show resolved Hide resolved
: isOrganizationSSOIDP
? AuthenticatorMeta.getAuthenticatorIcon(
(authenticator as ConnectionInterface)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const SettingsSection: FunctionComponent<PropsWithChildren<SettingsSectio
}
{ header }
</Header>
<Card.Meta className="description">{ description }</Card.Meta>
<Card.Meta className="settings-description">{ description }</Card.Meta>
</Grid.Column>
{
connectorEnabled !== undefined
Expand Down
2 changes: 1 addition & 1 deletion modules/theme/src/themes/default/views/card.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
white-space: normal;
}
}
.description {
.settings-description {
height: 62px;
display: -webkit-box;
-webkit-line-clamp: 2;
Expand Down
Loading