Skip to content

Conversation

@jsoningram
Copy link
Contributor

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1211050482669423/task/1212009313322049?focus=true

Description

Testing Steps

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit 07f57ab
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/692f10df7c22e50007753cd6
😎 Deploy Preview https://deploy-preview-2063--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

[Beta] Generated file diff

Time updated: Tue, 02 Dec 2025 01:12:24 GMT

Apple
    - apple/pages/new-tab/dist/index.js

File has changed

Integration
    - integration/pages/new-tab/dist/index.js

File has changed

Windows
    - windows/pages/new-tab/dist/index.js

File has changed

@jsoningram jsoningram force-pushed the jingram/cpm-stats-on-ntp-scroll branch from 9692dfe to cd0e5bc Compare December 1, 2025 22:28
@jsoningram jsoningram force-pushed the jingram/cpm-stats-on-ntp-scroll branch from cd0e5bc to 1e6a692 Compare December 2, 2025 00:21
Handle undefined trackingStatus when sites are first logged. The
component now provides a safe default and reactively updates when
tracking status data arrives, fixing the issue where "no trackers
blocked" was shown initially even when trackers were actually blocked.
Updated the component to use reactive computed signals. Changes:
  1. `trackingStatus` — computed signal tracking
activity.value.trackingStatus[id]
  2. `totalTrackersBlocked` — computed signal derived from
trackingStatus
  3. `totalTrackersPillText` — computed signal that updates when the
count changes
  4. `cookiePopUpBlocked` — kept as a computed signal (removed the
.value that read it once)
1. Added `useSignalEffect`: Tracks when computed signals
(totalTrackersPillText, totalTrackersBlocked, cookiePopUpBlocked)
change.
2. Used a ref to track previous values: prevValuesRef stores the last
values to avoid unnecessary re-renders.
3. State update on change: When computed values change, update state via
setRenderKey to trigger a re-render.
4. Conditional updates: Only update state when values actually change,
reducing unnecessary re-renders.

How it works:
• useSignalEffect runs whenever the computed signals change.
• It compares current values with previous values stored in the ref.
• If values changed, it updates the ref and calls setRenderKey to force
a re-render.
• The re-render causes TickPill to display the updated values.
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.

1 participant