Skip to content
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

Merged
merged 2 commits into from
Mar 28, 2024
Merged

fix: comment tracking #2880

merged 2 commits into from
Mar 28, 2024

Conversation

rebelchris
Copy link
Contributor

@rebelchris rebelchris commented Mar 28, 2024

Changes

Describe what this PR does

  • Added optional impression and click tracking
  • Had to modify the inView render a bit as we needed it to be absolute

Events

Did you introduce any new tracking events?
Don't forget to update the Analytics Taxonomy sheet

Log the new/changed events below:

Type event_name value
Change/New event name extra: { ... }

Please make sure existing components are not breaking/affected by this PR

Manual Testing

On those affected packages:

  • Have you done sanity checks in the webapp?
  • Have you done sanity checks in the extension?
  • Does this not break anything in companion?

Did you test the modified components media queries?

  • MobileL (420px)
  • Tablet (656px)
  • Laptop (1020px)

Did you test on actual mobile devices?

  • iOS (Chrome and Safari)
  • Android

WT-{number} #done

Preview domain

https://fix-comment-tracking.preview.app.daily.dev

Copy link

vercel bot commented Mar 28, 2024

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

Name Status Preview Comments Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2024 2:46pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
storybook ⬜️ Ignored (Inspect) Mar 28, 2024 2:46pm

Copy link
Member

@idoshamun idoshamun left a 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)

Copy link
Contributor

@capJavert capJavert left a 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) && (
Copy link
Contributor

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.

Copy link
Contributor

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>

@rebelchris rebelchris merged commit accf260 into main Mar 28, 2024
10 checks passed
@rebelchris rebelchris deleted the fix-comment-tracking branch March 28, 2024 14:51
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