Reduce size of name/handle in feeds/threads

This commit is contained in:
Eric Bailey
2024-09-03 21:48:35 -05:00
parent 05e6b12f08
commit 403999fd6b
2 changed files with 18 additions and 11 deletions
+15 -8
View File
@@ -33,6 +33,7 @@ import {PostThreadFollowBtn} from 'view/com/post-thread/PostThreadFollowBtn'
import {atoms as a} from '#/alf'
import {AppModerationCause} from '#/components/Pills'
import {RichText} from '#/components/RichText'
import {Text as NewText} from '#/components/Typography'
import {ContentHider} from '../../../components/moderation/ContentHider'
import {LabelsOnMyPost} from '../../../components/moderation/LabelsOnMe'
import {PostAlerts} from '../../../components/moderation/PostAlerts'
@@ -307,24 +308,30 @@ let PostThreadItemLoaded = ({
<View
style={[styles.meta, styles.metaExpandedLine1, {zIndex: 1}]}>
<Link style={s.flex1} href={authorHref} title={authorTitle}>
<Text
type="xl-bold"
style={[pal.text, a.self_start]}
numberOfLines={1}
lineHeight={1.2}>
<NewText
style={[
pal.text,
a.self_start,
a.text_lg,
a.font_bold,
a.leading_tight,
]}
numberOfLines={1}>
{sanitizeDisplayName(
post.author.displayName ||
sanitizeHandle(post.author.handle),
moderation.ui('displayName'),
)}
</Text>
</NewText>
</Link>
</View>
<View style={styles.meta}>
<Link style={s.flex1} href={authorHref} title={authorTitle}>
<Text type="md" style={[pal.textLight]} numberOfLines={1}>
<NewText
style={[pal.textLight, a.text_md, a.leading_tight]}
numberOfLines={1}>
{sanitizeHandle(post.author.handle, '@')}
</Text>
</NewText>
</Link>
</View>
</View>
+3 -3
View File
@@ -69,7 +69,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
numberOfLines={1}
style={[styles.maxWidth, pal.textLight, opts.displayNameStyle]}>
<TextLinkOnWebOnly
type={opts.displayNameType || 'lg-bold'}
type={opts.displayNameType || 'md-bold'}
style={[pal.text]}
lineHeight={1.2}
disableMismatchWarning
@@ -83,7 +83,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
onBeforePress={onBeforePressAuthor}
/>
<TextLinkOnWebOnly
type="md"
type="sm"
disableMismatchWarning
style={[pal.textLight, {flexShrink: 4}]}
text={NON_BREAKING_SPACE + sanitizeHandle(handle, '@')}
@@ -101,7 +101,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
<TimeElapsed timestamp={opts.timestamp}>
{({timeElapsed}) => (
<TextLinkOnWebOnly
type="md"
type="sm"
style={pal.textLight}
text={timeElapsed}
accessibilityLabel={niceDate(i18n, opts.timestamp)}