-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce hovercard false positives, add them to display names and handles #3739
Conversation
Your Render PR Server URL is https://social-app-pr-3739.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-comp25uct0pc73disbig. |
246ac48
to
ef2eabd
Compare
|
Now that this decreases the unintentional trigger rate, I'm adding them to display names and handles. I've also bumped the threshold delay to 500ms to further reduce false positives. more.mov |
@@ -244,12 +244,20 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) { | |||
} | |||
}, [prefetchProfileQuery, props.did]) | |||
|
|||
const onPointerEnterTarget = React.useCallback(() => { | |||
const didFireHover = React.useRef(false) | |||
const onPointerMoveTarget = React.useCallback(() => { | |||
prefetchIfNeeded() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but this is another good use case for getting a bit more info from the API rather than just ProfileBasic
. Added to a little list of "why we want this" for Wednesday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels a lot better. The scroll issue was definitely noticeable when using a mouse w/ scroll wheel, but now I don't get those false positives. 🙏
* origin: Fix dropdown immediately closing on Enter (#3745) Account for momentum when hiding minimal shell (#3740) Reduce hovercard false positives, add them to display names and handles (#3739) YouTube Music as supported player (#3736) Patch lexicon for perf (#3733) ensure dialog is closed on unmount (#3650) remove precacheThreadPostProfiles (#3729) [Clipclops] New routes with placeholder screens (#3725) Special-case bsky.app/download to open share sheet or copy to clipboard (#3710) ver bump (#3731) Improve usability of search on web (#3663)
Instead of activating on pointer enter, activate on the first pointer move within.
This avoids triggering them just due to scroll. Intentionally moving the cursor still triggers it.
hover.mov