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

Tracks: Add Remote Data Blocks in the list of allowed sources #96007

Merged
merged 6 commits into from
Nov 15, 2024

Conversation

mehmoodak
Copy link
Member

Proposed Changes

Update @automattic/calypso-analytics package to add "Remote Data Blocks" in the list of allowed sources.

Why are these changes being made?

  • We are planning to use @automattic/calypso-analytics in the "Remote Data Blocks" plugin and, as a result, need to allow it.

Testing Instructions

  • Checkout this branch.
  • Link @automattic/calypso-analytics package.
  • Follow instructions of this Remote Data Blocks PR and verify that events are getting tracked without any error.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@mehmoodak mehmoodak self-assigned this Nov 2, 2024
@matticbot
Copy link
Contributor

matticbot commented Nov 2, 2024

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Nov 2, 2024

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • command-palette-wp-admin
  • happy-blocks
  • help-center
  • odyssey-stats
  • whats-new

To test WordPress.com changes, run install-plugin.sh $pluginSlug cafe-942/add-remote-data-blocks-in-tracks on your sandbox.

@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 2, 2024
@mehmoodak mehmoodak marked this pull request as ready for review November 2, 2024 10:29
@mehmoodak mehmoodak requested a review from tyxla November 6, 2024 15:27
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Comment on lines 216 to 219
! /^calypso(?:_[a-z0-9]+){2,}$/.test( eventName ) &&
! /^jetpack(?:_[a-z0-9]+){2,}$/.test( eventName ) &&
! /^remotedatablocks(?:_[a-z0-9]+){2,}$/.test( eventName ) &&
! /^wpcom_dsp_widget(?:_[a-z0-9]+){2,}$/.test( eventName ) &&
Copy link
Member

Choose a reason for hiding this comment

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

Not a blocker for this PR, but a nice potential follow-up: would be nice if we avoid this regex repetition here by having an array of allowed source prefixes declared and checking against that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 786e273. Please have a look.

@mehmoodak mehmoodak merged commit cf4359b into trunk Nov 15, 2024
11 checks passed
@mehmoodak mehmoodak deleted the cafe-942/add-remote-data-blocks-in-tracks branch November 15, 2024 18:20
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 15, 2024
@mehmoodak
Copy link
Member Author

Make sure to publish the new version

Deployed 🚢

mehmoodak added a commit to Automattic/remote-data-blocks that referenced this pull request Nov 15, 2024
Updating `calypso-analytics` package to version `1.1.3` which contains whitelisting logic (Automattic/wp-calypso#96007) for `remotedatablocks` source.
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.

4 participants