From deb13a5a26926d0b597d4880565723a301584bf3 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 18 Jun 2025 13:41:46 -0500 Subject: [PATCH] Fix anchor text overflow in threads v2 --- src/components/ProfileHoverCard/index.web.tsx | 2 +- src/components/ProfileHoverCard/types.ts | 6 +- .../components/ThreadItemAnchor.tsx | 96 +++++++++---------- 3 files changed, 49 insertions(+), 55 deletions(-) diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx index 17148a1b36..eb6efa4c97 100644 --- a/src/components/ProfileHoverCard/index.web.tsx +++ b/src/components/ProfileHoverCard/index.web.tsx @@ -74,7 +74,7 @@ export function ProfileHoverCard(props: ProfileHoverCardProps) { return props.children } else { return ( - + ) diff --git a/src/components/ProfileHoverCard/types.ts b/src/components/ProfileHoverCard/types.ts index 01ef0fce71..7d9e19ac5b 100644 --- a/src/components/ProfileHoverCard/types.ts +++ b/src/components/ProfileHoverCard/types.ts @@ -1,7 +1,9 @@ import type React from 'react' -export type ProfileHoverCardProps = { - children: React.ReactElement +import {type ViewStyleProp} from '#/alf' + +export type ProfileHoverCardProps = ViewStyleProp & { + children: React.ReactNode did: string disable?: boolean } diff --git a/src/screens/PostThread/components/ThreadItemAnchor.tsx b/src/screens/PostThread/components/ThreadItemAnchor.tsx index 05088cb483..23a92bc286 100644 --- a/src/screens/PostThread/components/ThreadItemAnchor.tsx +++ b/src/screens/PostThread/components/ThreadItemAnchor.tsx @@ -311,69 +311,61 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ isRoot && [a.pt_lg], ]}> - - - - + + + + + + - + {sanitizeDisplayName( post.author.displayName || sanitizeHandle(post.author.handle), moderation.ui('displayName'), )} - onPress={onOpenAuthor}> - - {sanitizeDisplayName( - post.author.displayName || - sanitizeHandle(post.author.handle), - moderation.ui('displayName'), - )} - - + - - - - {sanitizeHandle(post.author.handle, '@')} - - - - - - + + {sanitizeHandle(post.author.handle, '@')} + + + + {showFollowButton && ( - + )}