@@ -149,11 +196,10 @@ function PollIndicator ({ item }) {
return (
)
diff --git a/components/item.module.css b/components/item.module.css
index 816d83c3..5d83b494 100644
--- a/components/item.module.css
+++ b/components/item.module.css
@@ -6,6 +6,14 @@
margin-bottom: .15rem;
}
+.summaryText {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+}
+
.notification {
position: absolute;
padding: 3px;
diff --git a/components/text.js b/components/text.js
index 0908baa1..1dc9d445 100644
--- a/components/text.js
+++ b/components/text.js
@@ -22,6 +22,7 @@ import Link from 'next/link'
import { UNKNOWN_LINK_REL } from '@/lib/constants'
import isEqual from 'lodash/isEqual'
import UserPopover from './user-popover'
+import ItemPopover from './item-popover'
export function SearchText ({ text }) {
return (
@@ -227,7 +228,11 @@ export default memo(function Text ({ rel, imgproxyUrls, children, tab, itemId, o
try {
const linkText = parseInternalLinks(href)
if (linkText) {
- return
{linkText}
+ return (
+
+ {linkText}
+
+ )
}
} catch {
// ignore errors like invalid URLs
diff --git a/components/user-popover.js b/components/user-popover.js
index 445ec2c7..11d7d65b 100644
--- a/components/user-popover.js
+++ b/components/user-popover.js
@@ -1,28 +1,28 @@
import { USER } from '@/fragments/users'
import errorStyles from '@/styles/error.module.css'
import { useLazyQuery } from '@apollo/client'
-import Link from 'next/link'
-import { useRef, useState } from 'react'
-import { Popover } from 'react-bootstrap'
-import OverlayTrigger from 'react-bootstrap/OverlayTrigger'
-import { UserBase, UserSkeleton } from './user-list'
-import styles from './user-popover.module.css'
import classNames from 'classnames'
+import Link from 'next/link'
+import HoverablePopover from './hoverable-popover'
+import ItemPopover from './item-popover'
+import { UserBase, UserSkeleton } from './user-list'
function StackingSince ({ since }) {
return (
stacking since:{' '}
{since
- ? #{since}
+ ? (
+
+ #{since}
+
+ )
: never}
)
}
export default function UserPopover ({ name, children }) {
- const [showOverlay, setShowOverlay] = useState(false)
-
const [getUser, { loading, data }] = useLazyQuery(
USER,
{
@@ -31,52 +31,19 @@ export default function UserPopover ({ name, children }) {
}
)
- const timeoutId = useRef(null)
-
- const handleMouseEnter = () => {
- clearTimeout(timeoutId.current)
- getUser()
- timeoutId.current = setTimeout(() => {
- setShowOverlay(true)
- }, 500)
- }
-
- const handleMouseLeave = () => {
- clearTimeout(timeoutId.current)
- timeoutId.current = setTimeout(() => setShowOverlay(false), 100)
- }
-
return (
-
-
- {!data || loading
- ?
- : !data.user
- ? USER NOT FOUND
- : (
-
-
-
- )}
-
-
- }
- >
-
- {children}
-
-
+
+ : !data.user
+ ?
USER NOT FOUND
+ : (
+
+
+
+ )}
+ />
)
}