diff --git a/src/app/components/user-profile/UserHero.tsx b/src/app/components/user-profile/UserHero.tsx index e0adc8042..42ee85062 100644 --- a/src/app/components/user-profile/UserHero.tsx +++ b/src/app/components/user-profile/UserHero.tsx @@ -10,6 +10,7 @@ import { OverlayCenter, Text, Tooltip, + toRem, } from 'folds'; import classNames from 'classnames'; import FocusTrap from 'focus-trap-react'; @@ -35,6 +36,7 @@ type UserHeroProps = { }; export function UserHero({ userId, avatarUrl, bannerUrl, presence }: UserHeroProps) { const [viewAvatar, setViewAvatar] = useState(); + const [isFullStatus, setIsFullStatus] = useState(false); const cachedBannerUrl = useBlobCache(bannerUrl); const cachedAvatarUrl = useBlobCache(avatarUrl); @@ -105,8 +107,23 @@ export function UserHero({ userId, avatarUrl, bannerUrl, presence }: UserHeroPro {presence?.status?.length && (
- - {presence.status} + setIsFullStatus(!isFullStatus)} + className={css.UserHeroStatusTooltip} + style={{ + maxHeight: isFullStatus ? toRem(105) : toRem(48), + }} + > + + {presence.status} +
)} diff --git a/src/app/components/user-profile/styles.css.ts b/src/app/components/user-profile/styles.css.ts index a08046bd5..10b0c9e51 100644 --- a/src/app/components/user-profile/styles.css.ts +++ b/src/app/components/user-profile/styles.css.ts @@ -54,6 +54,15 @@ export const UserHeroStatusContainer = style({ width: '100%', paddingLeft: '2%', }); +export const UserHeroStatusTooltip = style({ + maxWidth: '98%', + justifySelf: 'left', + cursor: 'pointer', + ':hover': { + filter: 'brightness(0.8)', + transform: 'translateY(-1px)', + }, +}); export const UserHeroAvatar = style({ outline: `${config.borderWidth.B600} solid ${color.Surface.Container}`, selectors: { diff --git a/src/app/features/room/MembersDrawer.tsx b/src/app/features/room/MembersDrawer.tsx index 5fda61757..a7004ff7f 100644 --- a/src/app/features/room/MembersDrawer.tsx +++ b/src/app/features/room/MembersDrawer.tsx @@ -168,8 +168,7 @@ function MemberItem({ {name} {presence?.status && ( - /* The Color value should be edited to the theme specific disabled text color */ - + {presence.status} )}