diff --git a/playwright/snapshots/user-view/user-view.spec.ts/user-info-linux.png b/playwright/snapshots/user-view/user-view.spec.ts/user-info-linux.png index 30206f1a25..4e30587935 100644 Binary files a/playwright/snapshots/user-view/user-view.spec.ts/user-info-linux.png and b/playwright/snapshots/user-view/user-view.spec.ts/user-info-linux.png differ diff --git a/res/css/views/right_panel/_UserInfo.pcss b/res/css/views/right_panel/_UserInfo.pcss index 0af5585d1a..7a67986ae8 100644 --- a/res/css/views/right_panel/_UserInfo.pcss +++ b/res/css/views/right_panel/_UserInfo.pcss @@ -34,7 +34,7 @@ Please see LICENSE files in the repository root for full details. } .mx_UserInfo_container { - padding: var(--cpd-space-4x) 0; + padding: var(--cpd-space-2x) 0 var(--cpd-space-4x); margin: 0 var(--cpd-space-4x); .mx_UserInfo_container_verifyButton { @@ -65,7 +65,7 @@ Please see LICENSE files in the repository root for full details. } .mx_UserInfo_avatar { - margin: $spacing-24 $spacing-32 0 $spacing-32; + margin: var(--cpd-space-12x) var(--cpd-space-4x) 0 var(--cpd-space-4x); .mx_UserInfo_avatar_transition { max-width: 120px; @@ -98,8 +98,18 @@ Please see LICENSE files in the repository root for full details. margin: 5px 0; } + .mx_UserInfo_header { + margin-bottom: var(--cpd-space-8x); + padding-bottom: 0; + } + .mx_UserInfo_profile { + display: flex; + flex-direction: column; + gap: var(--cpd-space-1x); + h1 { + margin: 0; font-size: $font-20px; line-height: $font-25px; @@ -119,8 +129,45 @@ Please see LICENSE files in the repository root for full details. } } + .mx_UserInfo_profile_name { + height: 30px; + } + + .mx_UserInfo_profile_mxid { + color: var(--cpd-color-text-secondary); + height: 28px; + } + .mx_UserInfo_profileStatus { - margin: var(--cpd-space-1x) 0; + height: 20px; + } + + .mx_UserInfo_timezone { + height: 20px; + margin: 0; + display: flex; + align-items: center; + } + + /** Overrides for the copy to clipboard button **/ + .mx_CopyableText { + align-items: center; + } + + .mx_CopyableText_copyButton { + width: 28px; + height: 28px; + display: flex; + justify-content: center; + align-items: center; + position: unset; + padding-left: var(--cpd-space-2x); + } + + .mx_CopyableText_copyButton::before { + width: 20px; + height: 20px; + background-color: var(--cpd-color-icon-secondary-alpha); } } diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index 4e8968afaa..3be3725576 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -85,6 +85,7 @@ import { asyncSome } from "../../../utils/arrays"; import { Flex } from "../../utils/Flex"; import CopyableText from "../elements/CopyableText"; import { useUserTimezone } from "../../../hooks/useUserTimezone"; + export interface IDevice extends Device { ambiguous?: boolean; } @@ -580,8 +581,10 @@ export const warnSelfDemote = async (isSpace: boolean): Promise => { const Container: React.FC<{ children: ReactNode; -}> = ({ children }) => { - return
{children}
; + className?: string; +}> = ({ children, className }) => { + const classes = classNames("mx_UserInfo_container", className); + return
{children}
; }; interface IPowerLevelsContent { @@ -1707,10 +1710,10 @@ export const UserInfoHeader: React.FC<{ - + - + {displayName} {e2eIcon} @@ -1718,11 +1721,11 @@ export const UserInfoHeader: React.FC<{ {presenceLabel} {timezoneInfo && ( - + {timezoneInfo?.friendly ?? ""} - + )} diff --git a/test/unit-tests/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap b/test/unit-tests/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap index 1744081389..5ba2d3b5fc 100644 --- a/test/unit-tests/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap +++ b/test/unit-tests/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap @@ -142,7 +142,7 @@ exports[` with crypto enabled renders 1`] = `
with crypto enabled renders 1`] = ` dir="auto" >
@user:example.com @@ -456,7 +456,7 @@ exports[` with crypto enabled should render a deactivate button for
with crypto enabled should render a deactivate button for dir="auto" >
@user:example.com