created a collapsed and expanded size for the status to accomodate status sizes and the message button

This commit is contained in:
Shea Duma committed 2026-03-04 02:07:53 +02:00
1 parent 922866aa59
commit f2142c6a0d
3 files changed
+29 -4

No files matched your search

+19 -2
View File
@@ -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<string>();
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
</div>
{presence?.status?.length && (
<div className={css.UserHeroStatusContainer}>
<Tooltip style={{ maxWidth: '90%', justifySelf: 'left' }}>
<Text size="T200"> {presence.status} </Text>
<Tooltip
onClick={() => setIsFullStatus(!isFullStatus)}
className={css.UserHeroStatusTooltip}
style={{
maxHeight: isFullStatus ? toRem(105) : toRem(48),
}}
>
<Text
size="T200"
style={{
overflow: isFullStatus ? 'scroll' : 'hidden',
height: '100%',
wordBreak: 'break-word',
}}
>
{presence.status}
</Text>
</Tooltip>
</div>
)}
@@ -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: {
+1 -2
View File
@@ -168,8 +168,7 @@ function MemberItem({
{name}
</Text>
{presence?.status && (
/* The Color value should be edited to the theme specific disabled text color */
<Text size="T300" truncate style={{ color: '#888888', fontFamily: font }}>
<Text size="T300" truncate style={{ color: config.opacity.P300, fontFamily: font }}>
{presence.status}
</Text>
)}