Put display name and handle on one line in invite dialog (#10824)

This commit is contained in:
DS Boyce
2026-06-10 09:17:09 -07:00
committed by GitHub
parent a69836216c
commit 90f8fe59ba
+41 -33
View File
@@ -197,8 +197,7 @@ function GroupChatJoinDialogContent({code}: {code?: string}) {
return ( return (
<> <>
<ChainLinkBrokenIcon fill={t.palette.primary_500} size="3xl" /> <ChainLinkBrokenIcon fill={t.palette.primary_500} size="3xl" />
<Text <Text style={[a.text_center, a.text_lg, a.font_semi_bold]}>
style={[a.text_center, a.text_lg, a.font_semi_bold, t.atoms.text]}>
<Trans>This invite link is invalid</Trans> <Trans>This invite link is invalid</Trans>
</Text> </Text>
<Button <Button
@@ -278,7 +277,7 @@ function GroupChatJoinDialogContent({code}: {code?: string}) {
return ( return (
<> <>
<View style={[a.py_lg, a.align_center]}> <View style={[a.w_full, a.py_lg, a.align_center]}>
<AvatarBubbles <AvatarBubbles
profiles={[ profiles={[
joinLinkPreview.owner, joinLinkPreview.owner,
@@ -287,7 +286,7 @@ function GroupChatJoinDialogContent({code}: {code?: string}) {
self self
size={135} size={135}
/> />
<View style={[a.gap_sm, a.align_center, a.mt_lg]}> <View style={[a.w_full, a.gap_sm, a.align_center, a.mt_lg]}>
<View> <View>
<Text <Text
style={[ style={[
@@ -299,14 +298,12 @@ function GroupChatJoinDialogContent({code}: {code?: string}) {
]}> ]}>
<Trans>Group chat</Trans> <Trans>Group chat</Trans>
</Text> </Text>
<Text <Text style={[a.text_center, a.text_3xl, a.font_bold]}>
style={[a.text_center, a.text_3xl, a.font_bold, t.atoms.text]}>
{joinLinkPreview.name} {joinLinkPreview.name}
</Text> </Text>
</View> </View>
<View style={[a.flex_row, a.align_center]}> <View style={[a.flex_row, a.align_center]}>
<Text <Text style={[a.text_center, a.text_xs, a.leading_snug]}>
style={[a.text_center, a.text_xs, a.leading_snug, t.atoms.text]}>
<Trans comment="The number of active group chat members out of the total number allowed."> <Trans comment="The number of active group chat members out of the total number allowed.">
{joinLinkPreview.memberCount}/{joinLinkPreview.memberLimit}{' '} {joinLinkPreview.memberCount}/{joinLinkPreview.memberLimit}{' '}
members members
@@ -315,32 +312,40 @@ function GroupChatJoinDialogContent({code}: {code?: string}) {
<View style={[a.flex_row, a.ml_md]}> <View style={[a.flex_row, a.ml_md]}>
<PersonGroupIcon size="xs" style={[a.mr_xs, t.atoms.text]} /> <PersonGroupIcon size="xs" style={[a.mr_xs, t.atoms.text]} />
</View> </View>
<Text <Text style={[a.text_center, a.text_xs, a.leading_snug]}>
style={[a.text_center, a.text_xs, a.leading_snug, t.atoms.text]}>
{joinLinkPreview.joinRule === 'followedByOwner' {joinLinkPreview.joinRule === 'followedByOwner'
? l`Followers can join` ? l`Followers can join`
: l`Anyone can join`} : l`Anyone can join`}
</Text> </Text>
</View> </View>
<View> <View
<View style={[
style={[a.flex_row, a.gap_xs, a.align_center, a.justify_center]}> a.px_2xl,
<Text a.w_full,
emoji a.flex_row,
style={[ a.gap_xs,
a.mb_2xs, a.align_center,
a.text_center, a.justify_center,
a.text_sm, ]}>
a.leading_snug, <Text
a.font_semi_bold, emoji
t.atoms.text, style={[
]}> a.flex_shrink,
a.text_center,
a.text_sm,
a.leading_snug,
a.font_semi_bold,
web({minWidth: 0}),
]}
numberOfLines={1}>
<Trans comment="The group chat creator, in the format 'By {displayName}'.">
By{' '} By{' '}
<InlineLinkText <InlineLinkText
label={`@${joinLinkPreview.owner.handle}`} label={`@${joinLinkPreview.owner.handle}`}
to={makeProfileLink(joinLinkPreview.owner)} to={makeProfileLink(joinLinkPreview.owner)}
style={[ style={[
a.mb_2xs, a.flex_shrink,
a.leading_snug,
a.text_sm, a.text_sm,
a.font_semi_bold, a.font_semi_bold,
t.atoms.text, t.atoms.text,
@@ -368,20 +373,23 @@ function GroupChatJoinDialogContent({code}: {code?: string}) {
), ),
)} )}
</InlineLinkText> </InlineLinkText>
</Text> </Trans>
<ProfileBadges </Text>
profile={joinLinkPreview.owner} <ProfileBadges
size="sm" profile={joinLinkPreview.owner}
style={{marginTop: -3}} size="sm"
/> style={{marginTop: -3}}
</View> />
<Text <Text
style={[ style={[
a.flex_shrink,
a.text_center, a.text_center,
a.text_xs,
a.leading_snug, a.leading_snug,
a.text_sm,
t.atoms.text_contrast_high, t.atoms.text_contrast_high,
]}> web({minWidth: 0}),
]}
numberOfLines={1}>
{sanitizeHandle(joinLinkPreview.owner.handle, '@')} {sanitizeHandle(joinLinkPreview.owner.handle, '@')}
</Text> </Text>
</View> </View>