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

Activity Widget: Windows optimized API #1441

Closed

Conversation

greyivy
Copy link
Contributor

@greyivy greyivy commented Jan 29, 2025

Asana Task/Github Issue:

Description

Implements a "fetched" API for Windows while maintaining compatibility with the existing API.

Usage examples

In reply to GetData (the previous format can still be used) activity_getUrls

{
  "urls": ["https://www.example.com", "https://www.another-example.com", "https://www.yet-another-example.com"],
  "totalTrackersBlocked": 7
}

When notifying OnDataUpdate (the previous format can still be used) activitiy_onDataPatch

Note that patch is optional here (and only used when patching existing records, not creating or deleting)

{
  "urls": ["https://www.example.com", "https://www.another-example.com", "https://www.yet-another-example.com"],
  "totalTrackersBlocked": 9,
  "patch": {
    "url": "https://www.example.com",
    "title": "Example",
    "history": [ ... ],
    ...
  }
}

The frontend sends activity_getDataForUrls with a list of urls as needed...

{
  "urls": ["https://www.another-example.com", ...]
}

...and the native side responds with an array of Domain Activity records

[
  {
      "url": "https://www.another-example.com",
      "title": "Another Example",
      "history": [ ... ],
      ...
  },
  ...
]

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

@greyivy greyivy requested review from shakyShane, mgurgel and a team as code owners January 29, 2025 19:07
Copy link

netlify bot commented Jan 29, 2025

Deploy Preview for content-scope-scripts failed.

Name Link
🔨 Latest commit 073c9db
🔍 Latest deploy log https://app.netlify.com/sites/content-scope-scripts/deploys/679a82e0be754c0008bb61b2

@shakyShane shakyShane force-pushed the 01-21-ntp_activity_widget branch from 836da75 to 2227fa2 Compare January 30, 2025 22:13
@shakyShane shakyShane closed this Jan 30, 2025
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.

2 participants