Fix reply username overflow (#1501)
* fix reply overflow * fix shrinkable typing indicator * fix message avatar hover & cursor
This commit is contained in:
parent
8731f58948
commit
c7e5c1fce8
5 changed files with 18 additions and 3 deletions
|
@ -67,7 +67,11 @@ export const Reply = as<'div', ReplyProps>(
|
||||||
{...props}
|
{...props}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
>
|
>
|
||||||
<Box style={{ color: colorMXID(sender ?? eventId) }} alignItems="Center" shrink="No">
|
<Box
|
||||||
|
style={{ color: colorMXID(sender ?? eventId), maxWidth: '50%' }}
|
||||||
|
alignItems="Center"
|
||||||
|
shrink="No"
|
||||||
|
>
|
||||||
<Icon src={Icons.ReplyArrow} size="50" />
|
<Icon src={Icons.ReplyArrow} size="50" />
|
||||||
{sender && (
|
{sender && (
|
||||||
<Text size="T300" truncate>
|
<Text size="T300" truncate>
|
||||||
|
|
|
@ -118,8 +118,8 @@ export const CompactHeader = style([
|
||||||
|
|
||||||
export const AvatarBase = style({
|
export const AvatarBase = style({
|
||||||
paddingTop: toRem(4),
|
paddingTop: toRem(4),
|
||||||
cursor: 'pointer',
|
|
||||||
transition: 'transform 200ms cubic-bezier(0, 0.8, 0.67, 0.97)',
|
transition: 'transform 200ms cubic-bezier(0, 0.8, 0.67, 0.97)',
|
||||||
|
alignSelf: 'start',
|
||||||
|
|
||||||
selectors: {
|
selectors: {
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
|
|
|
@ -10,6 +10,7 @@ export const TypingIndicator = as<'div', TypingIndicatorProps>(({ size, style, .
|
||||||
<Box
|
<Box
|
||||||
as="span"
|
as="span"
|
||||||
alignItems="Center"
|
alignItems="Center"
|
||||||
|
shrink="No"
|
||||||
style={{ gap: toRem(size === '300' ? 1 : 2), ...style }}
|
style={{ gap: toRem(size === '300' ? 1 : 2), ...style }}
|
||||||
{...props}
|
{...props}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
|
|
@ -654,7 +654,13 @@ export const Message = as<'div', MessageProps>(
|
||||||
|
|
||||||
const avatarJSX = !collapse && messageLayout !== 1 && (
|
const avatarJSX = !collapse && messageLayout !== 1 && (
|
||||||
<AvatarBase>
|
<AvatarBase>
|
||||||
<Avatar as="button" size="300" data-user-id={senderId} onClick={onUserClick}>
|
<Avatar
|
||||||
|
className={css.MessageAvatar}
|
||||||
|
as="button"
|
||||||
|
size="300"
|
||||||
|
data-user-id={senderId}
|
||||||
|
onClick={onUserClick}
|
||||||
|
>
|
||||||
{senderAvatarMxc ? (
|
{senderAvatarMxc ? (
|
||||||
<AvatarImage
|
<AvatarImage
|
||||||
src={mx.mxcUrlToHttp(senderAvatarMxc, 48, 48, 'crop') ?? senderAvatarMxc}
|
src={mx.mxcUrlToHttp(senderAvatarMxc, 48, 48, 'crop') ?? senderAvatarMxc}
|
||||||
|
|
|
@ -56,6 +56,10 @@ export const MessageOptionsBar = style([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
export const MessageAvatar = style({
|
||||||
|
cursor: 'pointer',
|
||||||
|
});
|
||||||
|
|
||||||
export const MessageQuickReaction = style({
|
export const MessageQuickReaction = style({
|
||||||
minWidth: toRem(32),
|
minWidth: toRem(32),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue