Fix text overflow issues in list item component (#38954)

This commit is contained in:
diondiondion 2026-05-08 10:34:55 +02:00 committed by GitHub
parent 9ff094b62e
commit b71333921b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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