Repository navigation
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Premium Analytics plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Stats Data plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
There was a problem hiding this comment.
Looks good. The flag and its script data are gone cleanly, and the channel is stats on both the PHP and the client side.
One question, not blocking. With no announcement registered, every dashboard load still fetches the announcements chunk and asks the endpoint for an empty list, and Settings shows a switch for a teaser nobody can see yet. Is a first announcement planned before the December 8 release?
Heads up that this and #55372 both touch neighbouring lines in jetpack-script-data.d.ts, so whichever lands second gets a small conflict there.
Tested on a Jurassic Ninja site running this branch at 27ec23f, with no flag set.
- Settings shows the What's new card with the switch on.
- The dashboard shows no teaser, and
jetpack-announcementsreturns an empty list. - With a test announcement registered on
stats/mainthrough thejetpack_register_announcementsaction, the teaser shows on the dashboard.
All as described. Here is the Settings card.
Fair question, let's discuss with folks |

Proposed changes
What's new is on in Stats for every site. Its feature flag is gone, and the dashboard publishes no announcement yet.
Closes WOOA7S-2478
[Screenshot: the What's new card in Stats > Settings]
No flag
jetpack-stats-whats-newis removed. The dashboard mounts the surface on every page load, once its onboarding is done, and Settings always offers the switch that turns the teaser off.The registrant loses
FLAG,is_enabled()andadd_script_data(), and the script data loseswhats_new_enabled.The channel is
statsThe channel of the dashboard takes the slug of the product:
statson every page, andstats/<section>on one. It waspremium-analytics.With the flag gone, the name is what other code publishes to. So it changes now.
No announcement yet
"Arrange your tabs" is no longer registered, so nobody sees a teaser after this change. It stays as the example entry in
docs/whats-new-channels.md.Adding an announcement is adding an entry to
get_announcements(). The rules of the dashboard still apply to it, and a fixture tests them: whoever can read the dashboard sees it, and a user who registered after its date does not.Related product discussion/links
Does this pull request change what data or activity we track or use?
It adds no event. The five Tracks events of #55341 were recorded only with the flag on, and are now recorded for every user of the new Stats.
Testing instructions
Build
Settings
Open Stats, and go to Settings from the Stats options menu. No flag is needed. The "What's new" card shows, with its switch on.
Turn the switch off and reload. It stays off.
The dashboard
Open Stats. No teaser shows, as there is no announcement.
In the Network tab, the page reads
wpcom/v2/jetpack-announcementsand gets an empty list.With an announcement
Paste the entry of
docs/whats-new-channels.mdintoget_announcements(), inprojects/packages/premium-analytics/src/class-dashboard-announcements.php, and reload Stats.The teaser "Arrange your tabs" shows on the dashboard, and not in Settings. A user registered after November 12 does not see it.
Tests