fix: Fix various UI text wrapping and overflow issues (#34774)
This commit is contained in:
parent
02ac18da51
commit
5dda094daa
5 changed files with 60 additions and 34 deletions
|
@ -18,12 +18,14 @@ import { useAppSelector, useAppDispatch } from 'mastodon/store';
|
|||
import { DisplayedName } from './displayed_name';
|
||||
import { EmbeddedStatus } from './embedded_status';
|
||||
|
||||
const AVATAR_SIZE = 28;
|
||||
|
||||
export const AvatarById: React.FC<{ accountId: string }> = ({ accountId }) => {
|
||||
const account = useAppSelector((state) => state.accounts.get(accountId));
|
||||
|
||||
if (!account) return null;
|
||||
|
||||
return <Avatar withLink account={account} size={28} />;
|
||||
return <Avatar withLink account={account} size={AVATAR_SIZE} />;
|
||||
};
|
||||
|
||||
export type LabelRenderer = (
|
||||
|
@ -108,7 +110,7 @@ export const NotificationGroupWithStatus: React.FC<{
|
|||
<div className='notification-group__main'>
|
||||
<div className='notification-group__main__header'>
|
||||
<div className='notification-group__main__header__wrapper'>
|
||||
<AvatarGroup>
|
||||
<AvatarGroup avatarHeight={AVATAR_SIZE}>
|
||||
{accountIds
|
||||
.slice(0, NOTIFICATIONS_GROUP_MAX_AVATARS)
|
||||
.map((id) => (
|
||||
|
@ -123,7 +125,14 @@ export const NotificationGroupWithStatus: React.FC<{
|
|||
|
||||
<div className='notification-group__main__header__label'>
|
||||
{label}
|
||||
{timestamp && <RelativeTimestamp timestamp={timestamp} />}
|
||||
{timestamp && (
|
||||
<>
|
||||
<span className='notification-group__main__header__label-separator'>
|
||||
·
|
||||
</span>
|
||||
<RelativeTimestamp timestamp={timestamp} />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue