Merge pull request #546 from jenny-s51/directMembershipHelpText
Users(groups): Adds help text for direct membership
This commit is contained in:
commit
00188a9751
2 changed files with 25 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import React, { useContext, useEffect, useState } from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
|
@ -7,6 +7,7 @@ import {
|
|||
ButtonVariant,
|
||||
Checkbox,
|
||||
PageSection,
|
||||
Popover,
|
||||
} from "@patternfly/react-core";
|
||||
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
|
||||
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
||||
|
@ -20,6 +21,8 @@ import { useErrorHandler } from "react-error-boundary";
|
|||
import _ from "lodash";
|
||||
import UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
|
||||
import { JoinGroupDialog } from "./JoinGroupDialog";
|
||||
import { HelpContext } from "../components/help-enabler/HelpHeader";
|
||||
import { QuestionCircleIcon } from "@patternfly/react-icons";
|
||||
|
||||
type GroupTableData = GroupRepresentation & {
|
||||
membersLength?: number;
|
||||
|
@ -55,6 +58,8 @@ export const UserGroups = () => {
|
|||
>([]);
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
const { enabled } = useContext(HelpContext);
|
||||
|
||||
const adminClient = useAdminClient();
|
||||
const { id } = useParams<{ id: string }>();
|
||||
const alphabetize = (groupsList: GroupRepresentation[]) => {
|
||||
|
@ -325,6 +330,22 @@ export const UserGroups = () => {
|
|||
onChange={() => setDirectMembership(!isDirectMembership)}
|
||||
isChecked={isDirectMembership}
|
||||
/>
|
||||
{enabled && (
|
||||
<Popover
|
||||
aria-label="Basic popover"
|
||||
position="bottom"
|
||||
bodyContent={<div>{t("users:whoWillAppearPopoverText")}</div>}
|
||||
>
|
||||
<Button
|
||||
variant="link"
|
||||
className="kc-who-will-appear-button"
|
||||
key="who-will-appear-button"
|
||||
icon={<QuestionCircleIcon />}
|
||||
>
|
||||
{t("users:whoWillAppearLinkText")}
|
||||
</Button>
|
||||
</Popover>
|
||||
)}
|
||||
</>
|
||||
}
|
||||
columns={[
|
||||
|
|
|
@ -58,6 +58,8 @@
|
|||
"updateUserLocale": "Update User Locale",
|
||||
"consents": "Consents",
|
||||
"noConsents": "No consents",
|
||||
"noConsentsText": "The consents will only be recorded when users try to access a client that is configured to require consent. In that case, users will get a consent page which asks them to grant access to the client."
|
||||
"noConsentsText": "The consents will only be recorded when users try to access a client that is configured to require consent. In that case, users will get a consent page which asks them to grant access to the client.",
|
||||
"whoWillAppearLinkText": "Who will appear in this group list?",
|
||||
"whoWillAppearPopoverText": "Groups are hierarchical. When you select Direct Membership, you see only the child group that the user joined. Ancestor groups are not included."
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue