Skip to content

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

Merged
merged 2 commits into from
Jul 21, 2025
Merged

Conversation

capJavert
Copy link
Contributor

@capJavert capJavert commented Jul 18, 2025

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

Copy link

vercel bot commented Jul 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview Jul 21, 2025 10:04am
1 Skipped Deployment
Name Status Preview Updated (UTC)
storybook ⬜️ Ignored (Inspect) Jul 21, 2025 10:04am

Comment on lines +154 to +155
referenceId,
} = props;
Copy link
Contributor Author

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

@capJavert capJavert marked this pull request as ready for review July 18, 2025 16:58
@capJavert capJavert requested a review from a team as a code owner July 18, 2025 16:58
@@ -7,6 +7,7 @@ import { Button } from '../../buttons/Button';
export enum CopyType {
Main = 'main',
Custom = 'custom',
NiceGuy = 'niceGuy',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey thats me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆

Copy link
Contributor Author

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"

@capJavert capJavert enabled auto-merge (squash) July 21, 2025 10:02
@capJavert capJavert merged commit c0b2c6b into main Jul 21, 2025
11 checks passed
@capJavert capJavert deleted the AS-1170-user-follow-notification branch July 21, 2025 10:06
Copy link

@cursor cursor bot left a 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

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>

Fix in CursorFix in Web


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 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants