diff options
author | dan <dan.abramov@gmail.com> | 2024-04-16 23:44:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 23:44:41 +0100 |
commit | 480fa10e0b90ba907db04123f0791f8ba756ab65 (patch) | |
tree | a458f97e12c762f4165b1298dea7b1ba8c80af4d /src | |
parent | 1e26654a9b7fb7eeb2f35a99b10ad085577cf4bd (diff) | |
download | voidsky-480fa10e0b90ba907db04123f0791f8ba756ab65.tar.zst |
Add hovercards to "Reply To" (#3587)
* Add hovercard for Reply To * Tweak durations
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ProfileHoverCard/index.web.tsx | 6 | ||||
-rw-r--r-- | src/view/com/post/Post.tsx | 15 | ||||
-rw-r--r-- | src/view/com/posts/FeedItem.tsx | 14 |
3 files changed, 20 insertions, 15 deletions
diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx index 763919103..467cbddc6 100644 --- a/src/components/ProfileHoverCard/index.web.tsx +++ b/src/components/ProfileHoverCard/index.web.tsx @@ -72,10 +72,10 @@ type Action = | 'unhovered-long-enough' | 'finished-animating-hide' -const SHOW_DELAY = 350 +const SHOW_DELAY = 400 const SHOW_DURATION = 300 -const HIDE_DELAY = 200 -const HIDE_DURATION = 200 +const HIDE_DELAY = 150 +const HIDE_DURATION = 150 export function ProfileHoverCardInner(props: ProfileHoverCardProps) { const {refs, floatingStyles} = useFloating({ diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 9a084e96a..b46586941 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -23,6 +23,7 @@ import {countLines} from 'lib/strings/helpers' import {colors, s} from 'lib/styles' import {RQKEY as RQKEY_URI} from 'state/queries/resolve-uri' import {atoms as a} from '#/alf' +import {ProfileHoverCard} from '#/components/ProfileHoverCard' import {RichText} from '#/components/RichText' import {ContentHider} from '../../../components/moderation/ContentHider' import {LabelsOnMyPost} from '../../../components/moderation/LabelsOnMe' @@ -176,12 +177,14 @@ function PostInner({ numberOfLines={1}> <Trans context="description"> Reply to{' '} - <UserInfoText - type="sm" - did={replyAuthorDid} - attr="displayName" - style={[pal.textLight]} - /> + <ProfileHoverCard inline did={replyAuthorDid}> + <UserInfoText + type="sm" + did={replyAuthorDid} + attr="displayName" + style={[pal.textLight]} + /> + </ProfileHoverCard> </Trans> </Text> </View> diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index cc403b774..7694b5024 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -284,12 +284,14 @@ let FeedItemInner = ({ numberOfLines={1}> <Trans context="description"> Reply to{' '} - <UserInfoText - type="md" - did={replyAuthorDid} - attr="displayName" - style={[pal.textLight]} - /> + <ProfileHoverCard inline did={replyAuthorDid}> + <UserInfoText + type="md" + did={replyAuthorDid} + attr="displayName" + style={[pal.textLight]} + /> + </ProfileHoverCard> </Trans> </Text> </View> |