-
Notifications
You must be signed in to change notification settings - Fork 243
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
fix: comment tracking #2880
fix: comment tracking #2880
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
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.
Looks good (I assume you checked it locally)
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.
Use case is valid, added non blocking comment, we can add it as a task.
@@ -90,7 +140,7 @@ export default function MainComment({ | |||
contentVisibility: initialInView ? 'visible' : 'auto', | |||
}} | |||
> | |||
{!editProps && inView && ( | |||
{!editProps && (trackImpression || inView) && ( |
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.
Only issue I see is that this renders all the comments that are currently loaded no matter if they are in view or not, which contradicts what lazy
prop means.
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.
I think it can be fixed by extracting lazy logic into a wrapper component which can then be used in specific places like post page.
<LazyComment>
<MainComment />
</LazyComment>
Changes
Describe what this PR does
Events
Did you introduce any new tracking events?
Don't forget to update the Analytics Taxonomy sheet
Log the new/changed events below:
Please make sure existing components are not breaking/affected by this PR
Manual Testing
On those affected packages:
Did you test the modified components media queries?
Did you test on actual mobile devices?
WT-{number} #done
Preview domain
https://fix-comment-tracking.preview.app.daily.dev