[Glitch] Fix text overflow issues in list item component

Port b71333921bb571b4023adc33ba75a900d7c094fe to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
diondiondion 2026-05-08 10:34:55 +02:00 committed by Claire
parent c68fa5638d
commit 0da13f7632
4 changed files with 14 additions and 2 deletions

View File

@ -93,7 +93,7 @@ export const AccountListItem: React.FC<Props> = ({
<ListItemLink <ListItemLink
to={`/@${account.acct}`} to={`/@${account.acct}`}
data-hover-card-account={accountId} data-hover-card-account={accountId}
subtitle={handle} subtitle={<span className={classes.handle}>{handle}</span>}
> >
<DisplayNameSimple <DisplayNameSimple
account={account} account={account}

View File

@ -24,6 +24,13 @@
vertical-align: -4px; vertical-align: -4px;
} }
.handle {
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.button { .button {
align-self: start; align-self: start;
} }

View File

@ -30,7 +30,7 @@ export const ListItemWrapper: React.FC<WrapperProps> = ({
return ( return (
<div {...otherProps} className={classNames(classes.wrapper, className)}> <div {...otherProps} className={classNames(classes.wrapper, className)}>
{icon} {icon}
<div>{children}</div> <div className={classes.main}>{children}</div>
{sideContent && ( {sideContent && (
<span className={classes.sideContent}>{sideContent}</span> <span className={classes.sideContent}>{sideContent}</span>
)} )}

View File

@ -14,6 +14,11 @@
color: var(--color-text-primary); color: var(--color-text-primary);
} }
.main {
min-width: 0;
overflow-wrap: break-word;
}
.title { .title {
font-weight: 500; font-weight: 500;