-
Notifications
You must be signed in to change notification settings - Fork 264
feat: user follow notification #4722
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
referenceId, | ||
} = props; |
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.
just needed props as var to spread below
@@ -7,6 +7,7 @@ import { Button } from '../../buttons/Button'; | |||
export enum CopyType { | |||
Main = 'main', | |||
Custom = 'custom', | |||
NiceGuy = 'niceGuy', |
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.
hey thats me
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.
😆
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.
"always follow back and subscribe"
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.
Bug: Intersection Observer Fails on Empty Elements
useInView observes the same <div> that conditionally renders the FollowButton only when inView becomes true. Because the div is empty until inView is true, it has zero size, meaning the Intersection Observer never reports the element as intersecting. Consequently inView stays false, the data query is never executed, and the Follow Button is never shown to the user.
packages/shared/src/components/notifications/NotificationFollowUserButton.tsx#L39-L57
apps/packages/shared/src/components/notifications/NotificationFollowUserButton.tsx
Lines 39 to 57 in 54f9ec8
return ( | |
<div ref={ref}> | |
{inView && ( | |
<FollowButton | |
entityId={referenceId} | |
variant={ButtonVariant.Tertiary} | |
type={ContentPreferenceType.User} | |
status={followPreference?.status} | |
entityName={referenceUserName} | |
followedVariant={ButtonVariant.Primary} | |
className="mt-3" | |
buttonClassName={classNames( | |
!followPreference?.status && | |
'-ml-3.5 flex min-w-min text-text-link', | |
)} | |
copyType={CopyType.NiceGuy} | |
/> | |
)} | |
</div> |
BugBot free trial expires on July 31, 2025
Learn more in the Cursor dashboard.
Comment bugbot run
to trigger another review on this PR
Was this report helpful? Give feedback by reacting with 👍 or 👎
Changes
API: dailydotdev/daily-api#2933
Events
Did you introduce any new tracking events?
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
AS-1170
Preview domain
https://as-1170-user-follow-notification.preview.app.daily.dev
Jira ticket
AS-1170