Skip to content

UserInfo panel: Ensure displayname and userId can be viewed #29554

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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
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
7 changes: 7 additions & 0 deletions res/css/views/right_panel/_UserInfo.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ Please see LICENSE files in the repository root for full details.
word-break: break-all;
text-overflow: ellipsis;

/* Don't spill over the container */
width: 90%;

/* E2E icon wrapper */
.mx_Flex > span {
display: inline-block;
Expand All @@ -127,11 +130,15 @@ Please see LICENSE files in the repository root for full details.

.mx_UserInfo_profile_name {
height: 30px;
text-wrap: nowrap;
}

.mx_UserInfo_profile_mxid {
color: var(--cpd-color-text-secondary);
height: 28px;
max-width: 100%;
/* MXIDs are one long "word" */
word-break: break-all;
}

.mx_UserInfo_profileStatus {
Expand Down
32 changes: 19 additions & 13 deletions src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1409,24 +1409,30 @@ export const UserInfoHeader: React.FC<{
<Flex direction="column" align="center" className="mx_UserInfo_profile">
<Heading size="sm" weight="semibold" as="h1" dir="auto">
<Flex className="mx_UserInfo_profile_name" direction="row-reverse" align="center">
{displayName}
<Tooltip isTriggerInteractive={true} placement="left" label={displayName}>
<span>
{displayName}
</span>
</Tooltip>
</Flex>
</Heading>
{presenceLabel}
{timezoneInfo && (
<Tooltip label={timezoneInfo?.timezone ?? ""}>
<Flex align="center" className="mx_UserInfo_timezone">
<Text size="sm" weight="regular">
{timezoneInfo?.friendly ?? ""}
</Text>
</Flex>
</Tooltip>
<Flex align="center" className="mx_UserInfo_timezone">
<Text size="sm" weight="regular">
<Tooltip label={timezoneInfo?.timezone ?? ""}>
<span>{timezoneInfo?.friendly ?? ""}</span>
</Tooltip>
</Text>
</Flex>
)}
{userIdentifier && (
<Text size="sm" weight="semibold" className="mx_UserInfo_profile_mxid">
<CopyableText getTextToCopy={() => userIdentifier} border={false}>
{userIdentifier}
</CopyableText>
</Text>
)}
<Text size="sm" weight="semibold" className="mx_UserInfo_profile_mxid">
<CopyableText getTextToCopy={() => userIdentifier} border={false}>
{userIdentifier}
</CopyableText>
</Text>
</Flex>
{!hideVerificationSection && <VerificationSection member={member} devices={devices} />}
</Container>
Expand Down
Loading