diff --git a/src/components/Post/Embed/ChatInviteEmbed.tsx b/src/components/Post/Embed/ChatInviteEmbed.tsx --- a/src/components/Post/Embed/ChatInviteEmbed.tsx +++ b/src/components/Post/Embed/ChatInviteEmbed.tsx @@ -23,7 +23,7 @@ onOpen?: () => void style?: StyleProp }) { return ( - + ) diff --git a/src/components/Post/Embed/JoinRequestEmbed.tsx b/src/components/Post/Embed/JoinRequestEmbed.tsx --- a/src/components/Post/Embed/JoinRequestEmbed.tsx +++ b/src/components/Post/Embed/JoinRequestEmbed.tsx @@ -31,7 +31,10 @@ const resolvedCode = code ?? preview?.code if (!resolvedCode) return null return ( - + ) diff --git a/src/components/ProfileBadges.tsx b/src/components/ProfileBadges.tsx --- a/src/components/ProfileBadges.tsx +++ b/src/components/ProfileBadges.tsx @@ -31,10 +31,12 @@ profile, interactive = false, size, style, + allowFontScaling = true, }: ViewStyleProp & { profile: bsky.profile.AnyProfileView interactive?: boolean size: Size + allowFontScaling?: boolean }) { const shadowed = useProfileShadow(profile) const verification = useSimpleVerificationState({profile}) @@ -48,10 +50,12 @@ if (!verification.showBadge && !isBotAccount(shadowed)) return null const isOnTheSmallSide = size === 'xs' || size === 'sm' - const verificationIconWidth = - verificationIconSizes[size] * nativeScaleMultiplier * alfScaleMultiplier - const botIconWidth = - botIconSizes[size] * nativeScaleMultiplier * alfScaleMultiplier + const scaleMultiplier = allowFontScaling + ? nativeScaleMultiplier * alfScaleMultiplier + : 1 + + const verificationIconWidth = verificationIconSizes[size] * scaleMultiplier + const botIconWidth = botIconSizes[size] * scaleMultiplier return ( + numberOfLines={1} + allowFontScaling={!hasFixedHeight}> {preview.name} + numberOfLines={1} + allowFontScaling={!hasFixedHeight}> Group chat + numberOfLines={1} + allowFontScaling={!hasFixedHeight}> {preview.memberCount}/{preview.memberLimit}{' '} + numberOfLines={1} + allowFontScaling={!hasFixedHeight}> - By {ownerDisplayName} + By{' '} + + {ownerDisplayName} + - + + numberOfLines={1} + allowFontScaling={!hasFixedHeight}> {ownerHandle} diff --git a/src/components/dms/ChatInvite/Context.tsx b/src/components/dms/ChatInvite/Context.tsx --- a/src/components/dms/ChatInvite/Context.tsx +++ b/src/components/dms/ChatInvite/Context.tsx @@ -32,6 +32,8 @@ * The derived action descriptor. Undefined while loading or when there's no * preview to act on. */ action: ChatInviteAction | undefined + /** Whether the invite is rendered inside a fixed-height container; when true, text inside disables font scaling so the card doesn't overflow. */ + hasFixedHeight: boolean } const ChatInviteContext = createContext(null) diff --git a/src/components/dms/ChatInvite/JoinButton.tsx b/src/components/dms/ChatInvite/JoinButton.tsx --- a/src/components/dms/ChatInvite/JoinButton.tsx +++ b/src/components/dms/ChatInvite/JoinButton.tsx @@ -17,7 +17,7 @@ }: { onPress?: () => void style?: StyleProp }) { - const {action} = useChatInvite() + const {action, hasFixedHeight} = useChatInvite() if (!action) return null @@ -35,7 +35,7 @@ color={action.color} disabled={action.disabled} style={[a.w_full, style]}> {action.side === 'left' && } - {action.label} + {action.label} {action.side === 'right' && } ) diff --git a/src/components/dms/ChatInvite/Root.tsx b/src/components/dms/ChatInvite/Root.tsx --- a/src/components/dms/ChatInvite/Root.tsx +++ b/src/components/dms/ChatInvite/Root.tsx @@ -30,6 +30,7 @@ export function Root({ code, initialPreview, currentConvoId, + hasFixedHeight, children, }: { code: string @@ -40,6 +41,7 @@ * links to the same chat, the action becomes "Copy link" instead of * open/join (you're already here). */ currentConvoId?: string + hasFixedHeight: boolean children: React.ReactNode }) { const {hasSession} = useSession() @@ -137,7 +139,7 @@ } return ( + value={{code, loading, error: !!error, preview, action, hasFixedHeight}}> {children} ) diff --git a/src/components/dms/MessageItemInviteEmbed.tsx b/src/components/dms/MessageItemInviteEmbed.tsx --- a/src/components/dms/MessageItemInviteEmbed.tsx +++ b/src/components/dms/MessageItemInviteEmbed.tsx @@ -74,7 +74,8 @@ ]}> + currentConvoId={convo.convo.view.id} + hasFixedHeight={false}> diff --git a/src/screens/Messages/components/MessageInputEmbed.tsx b/src/screens/Messages/components/MessageInputEmbed.tsx --- a/src/screens/Messages/components/MessageInputEmbed.tsx +++ b/src/screens/Messages/components/MessageInputEmbed.tsx @@ -273,7 +273,7 @@ const t = useTheme() const {t: l} = useLingui() return ( - +