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 {atoms as a} from '#/alf'
import {AppModerationCause} from '#/components/Pills' import {AppModerationCause} from '#/components/Pills'
import {RichText} from '#/components/RichText' import {RichText} from '#/components/RichText'
import {Text as NewText} from '#/components/Typography'
import {ContentHider} from '../../../components/moderation/ContentHider' import {ContentHider} from '../../../components/moderation/ContentHider'
import {LabelsOnMyPost} from '../../../components/moderation/LabelsOnMe' import {LabelsOnMyPost} from '../../../components/moderation/LabelsOnMe'
import {PostAlerts} from '../../../components/moderation/PostAlerts' import {PostAlerts} from '../../../components/moderation/PostAlerts'
@@ -307,24 +308,30 @@ let PostThreadItemLoaded = ({
<View <View
style={[styles.meta, styles.metaExpandedLine1, {zIndex: 1}]}> style={[styles.meta, styles.metaExpandedLine1, {zIndex: 1}]}>
<Link style={s.flex1} href={authorHref} title={authorTitle}> <Link style={s.flex1} href={authorHref} title={authorTitle}>
<Text <NewText
type="xl-bold" style={[
style={[pal.text, a.self_start]} pal.text,
numberOfLines={1} a.self_start,
lineHeight={1.2}> a.text_lg,
a.font_bold,
a.leading_tight,
]}
numberOfLines={1}>
{sanitizeDisplayName( {sanitizeDisplayName(
post.author.displayName || post.author.displayName ||
sanitizeHandle(post.author.handle), sanitizeHandle(post.author.handle),
moderation.ui('displayName'), moderation.ui('displayName'),
)} )}
</Text> </NewText>
</Link> </Link>
</View> </View>
<View style={styles.meta}> <View style={styles.meta}>
<Link style={s.flex1} href={authorHref} title={authorTitle}> <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, '@')} {sanitizeHandle(post.author.handle, '@')}
</Text> </NewText>
</Link> </Link>
</View> </View>
</View> </View>
+3 -3
View File
@@ -69,7 +69,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
numberOfLines={1} numberOfLines={1}
style={[styles.maxWidth, pal.textLight, opts.displayNameStyle]}> style={[styles.maxWidth, pal.textLight, opts.displayNameStyle]}>
<TextLinkOnWebOnly <TextLinkOnWebOnly
type={opts.displayNameType || 'lg-bold'} type={opts.displayNameType || 'md-bold'}
style={[pal.text]} style={[pal.text]}
lineHeight={1.2} lineHeight={1.2}
disableMismatchWarning disableMismatchWarning
@@ -83,7 +83,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
onBeforePress={onBeforePressAuthor} onBeforePress={onBeforePressAuthor}
/> />
<TextLinkOnWebOnly <TextLinkOnWebOnly
type="md" type="sm"
disableMismatchWarning disableMismatchWarning
style={[pal.textLight, {flexShrink: 4}]} style={[pal.textLight, {flexShrink: 4}]}
text={NON_BREAKING_SPACE + sanitizeHandle(handle, '@')} text={NON_BREAKING_SPACE + sanitizeHandle(handle, '@')}
@@ -101,7 +101,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
<TimeElapsed timestamp={opts.timestamp}> <TimeElapsed timestamp={opts.timestamp}>
{({timeElapsed}) => ( {({timeElapsed}) => (
<TextLinkOnWebOnly <TextLinkOnWebOnly
type="md" type="sm"
style={pal.textLight} style={pal.textLight}
text={timeElapsed} text={timeElapsed}
accessibilityLabel={niceDate(i18n, opts.timestamp)} accessibilityLabel={niceDate(i18n, opts.timestamp)}