Skip to content

Commit

Permalink
Fix overflow behavior of account rows (#25131)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Jun 1, 2023
1 parent 8884d1e commit 5fae2de
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
10 changes: 7 additions & 3 deletions app/javascript/mastodon/components/account.jsx
Expand Up @@ -143,7 +143,7 @@ class Account extends ImmutablePureComponent {
const firstVerifiedField = account.get('fields').find(item => !!item.get('verified_at'));

if (firstVerifiedField) {
verification = <>· <VerifiedBadge link={firstVerifiedField.get('value')} /></>;
verification = <VerifiedBadge link={firstVerifiedField.get('value')} />;
}

return (
Expand All @@ -154,9 +154,13 @@ class Account extends ImmutablePureComponent {
<Avatar account={account} size={size} />
</div>

<div>
<div className='account__contents'>
<DisplayName account={account} />
{!minimal && <><ShortNumber value={account.get('followers_count')} renderer={counterRenderer('followers')} /> {verification} {muteTimeRemaining}</>}
{!minimal && (
<div className='account__details'>
<ShortNumber value={account.get('followers_count')} renderer={counterRenderer('followers')} /> {verification} {muteTimeRemaining}
</div>
)}
</div>
</Link>

Expand Down
17 changes: 16 additions & 1 deletion app/javascript/styles/mastodon/components.scss
Expand Up @@ -7814,13 +7814,28 @@ noscript {
}
}

.account__contents {
overflow: hidden;
}

.account__details {
display: flex;
flex-wrap: wrap;
column-gap: 1em;
}

.verified-badge {
display: inline-flex;
align-items: center;
color: $valid-value-color;
gap: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

> span {
overflow: hidden;
text-overflow: ellipsis;
}

a {
color: inherit;
Expand Down

0 comments on commit 5fae2de

Please sign in to comment.