about summary refs log tree commit diff
path: root/src/view/com/notifications
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-10-29 21:42:37 +0000
committerGitHub <noreply@github.com>2024-10-29 21:42:37 +0000
commitba802eb0f24d30467dd8621f204526d6457f9613 (patch)
treecebdda251b3bbb0cb82e7052617ed2ddd90f2a7f /src/view/com/notifications
parentc8f264b78b1dfb95f68bfb820bd012828cd5fddc (diff)
downloadvoidsky-ba802eb0f24d30467dd8621f204526d6457f9613.tar.zst
Add subtle web hover to interactive rows (#5989)
* Add subtle web hover to interactive rows

* Adjust numbers

* Ignore touch devices
Diffstat (limited to 'src/view/com/notifications')
-rw-r--r--src/view/com/notifications/FeedItem.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/view/com/notifications/FeedItem.tsx b/src/view/com/notifications/FeedItem.tsx
index 3c1f51249..7aa5f494f 100644
--- a/src/view/com/notifications/FeedItem.tsx
+++ b/src/view/com/notifications/FeedItem.tsx
@@ -51,6 +51,7 @@ import {Link as NewLink} from '#/components/Link'
 import * as MediaPreview from '#/components/MediaPreview'
 import {ProfileHoverCard} from '#/components/ProfileHoverCard'
 import {Notification as StarterPackCard} from '#/components/StarterPack/StarterPackCard'
+import {SubtleWebHover} from '#/components/SubtleWebHover'
 import {FeedSourceCard} from '../feeds/FeedSourceCard'
 import {Post} from '../post/Post'
 import {Link, TextLink} from '../util/Link'
@@ -129,6 +130,8 @@ let FeedItem = ({
     ]
   }, [item, moderationOpts])
 
+  const [hover, setHover] = React.useState(false)
+
   if (item.subjectUri && !item.subject && item.type !== 'feedgen-like') {
     // don't render anything if the target post was deleted or unfindable
     return <View />
@@ -285,7 +288,14 @@ let FeedItem = ({
           onToggleAuthorsExpanded()
         }
       }}
-      onBeforePress={onBeforePress}>
+      onBeforePress={onBeforePress}
+      onPointerEnter={() => {
+        setHover(true)
+      }}
+      onPointerLeave={() => {
+        setHover(false)
+      }}>
+      <SubtleWebHover hover={hover} />
       <View style={[styles.layoutIcon, a.pr_sm]}>
         {/* TODO: Prevent conditional rendering and move toward composable
         notifications for clearer accessibility labeling */}