Skip to content

Premium Analytics: swap the ease question for a readiness one in the feedback modal - #52109

Open
chihsuan wants to merge 1 commit into
trunkfrom
change/uni-757-readiness-question
Open

Premium Analytics: swap the ease question for a readiness one in the feedback modal#52109
chihsuan wants to merge 1 commit into
trunkfrom
change/uni-757-readiness-question

Conversation

@chihsuan

@chihsuan chihsuan commented Sep 9, 2026

Copy link
Copy Markdown
Member

Fixes UNI-757

Proposed changes

  • The dashboard feedback modal now asks "Is the new Traffic tab ready to replace the old one?" instead of placing the new tab on a five point comparison scale.
  • Three answers, in this order: "Yes, I'd be happy to switch now", "Almost — there are a few things missing", "Not yet".
  • The open question under it becomes "What's missing?".
  • jetpack_premium_analytics_feedback_submit now carries readiness (ready | almost | not_yet) instead of rating.
  • The Stats feedback endpoint has no readiness field, so the modal writes the answer into the message text and sends no rating.
  • FeedbackFields splits into ComparisonFields and ReadinessFields; the switch off dialog keeps the comparison scale and its numeric rating, unchanged.

The switch off dialog was deliberately left alone: pressing "Switch it off" already answers the readiness question by action, so asking it again there would be redundant. That dialog shares the comment field but now supplies its own question above it.

Related product discussion/links

  • UNI-757

Does this pull request change what data or activity we track or use?

Yes, for one existing event. jetpack_premium_analytics_feedback_submit keeps its name but swaps its main property: rating (an integer 1 to 5) is replaced by readiness (one of three fixed strings). No new category of data is collected; the free text comment property is unchanged, and the same answer also reaches the existing Stats feedback endpoint as message text rather than as a numeric field. See "Open questions" below, since keeping the event name is a decision worth a second opinion.

Testing instructions

  • Build and activate Premium Analytics, then go to Jetpack > Stats v2 in wp-admin.
  • Open the Page options menu (top right) and choose Any feedback?.
  • Confirm the modal asks "Is the new Traffic tab ready to replace the old one?" with exactly the three answers above, and that the box below is labelled "What's missing?".
  • Confirm Send feedback stays disabled until an answer is picked.
  • Pick an answer, type a comment, and submit with the network panel open. The pixel.wp.com/t.gif request should carry readiness=<answer> and no rating, and there should be a POST to .../jetpack-stats/user-feedback.
  • Repeat with the comment box left empty. Tracks should still fire, and there should be no POST to user-feedback at all.
  • Open Page options > Switch off the preview and confirm it still shows the five point "Much worse" to "Much better" scale with its own "What made you switch it off?" question.

Before / after

Same site, same session, captured at the moment of the switch.

Before (trunk) After (this PR)
before after

An answer picked and a comment typed:

@chihsuan chihsuan self-assigned this Sep 9, 2026
@chihsuan chihsuan changed the title UNI-757: Premium Analytics: ask whether the new Traffic tab is ready to replace the old one Premium Analytics: ask whether the new Traffic tab is ready to replace the old one Sep 9, 2026
@chihsuan chihsuan changed the title Premium Analytics: ask whether the new Traffic tab is ready to replace the old one Premium Analytics: swap the ease question for a readiness one in the feedback modal Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the change/uni-757-readiness-question branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack change/uni-757-readiness-question
bin/jetpack-downloader test jetpack-mu-wpcom-plugin change/uni-757-readiness-question

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added [Package] Premium Analytics [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Premium Analytics [Plugin] Wpcomsh labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

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:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2)

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.

@chihsuan
chihsuan marked this pull request as ready for review September 9, 2026 03:24
@chihsuan
chihsuan requested a review from a team as a code owner September 9, 2026 03:24
@chihsuan chihsuan added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Sep 9, 2026
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/premium-analytics/routes/dashboard/components/feedback/feedback-fields.tsx 15/15 (100.00%) 0.00% 0 💚
projects/packages/premium-analytics/routes/dashboard/components/feedback/feedback-modal.tsx 16/17 (94.12%) -0.33% 0 💚

Full summary · PHP report · JS report

@Nikschavan Nikschavan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, the changes look good. I left two comments inline: one on the separator in the Happiness message, and one question about keeping the event name.

);
// The endpoint has no readiness field, so the answer rides along in the message.
submitStatsUserFeedback( {
comment: `${ readinessSummary( readiness ) }\n\n${ message }`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The \n\n between the summary and the comment does not survive the endpoint: the wpcom handler for jetpack-stats/user-feedback runs feedback through sanitize_text_field, which collapses every run of newlines and spaces to a single space before the email body is built. Happiness reads Message: Ready to replace the old Traffic tab? Not yet Charts load slowly, so the boundary between the answer and the comment is gone, and the it.each at dashboard-options-menu.test.tsx#L285 asserts a separator nothing downstream keeps. Ending the summary with a full stop, or wrapping the answer in brackets, would keep the two readable on one line.

const message = comment.trim();

trackEvent( 'jetpack_premium_analytics_feedback_submit', { rating, comment: message } );
trackEvent( 'jetpack_premium_analytics_feedback_submit', { readiness, comment: message } );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The tracking section of the description points at an "Open questions" section for the event-name decision, but there is no such section, so the question is only implied. Keeping jetpack_premium_analytics_feedback_submit means rows carry rating up to this deploy and readiness after it, and a query on rating goes quiet without an error. The event is six days old (#51870), so a rename is the cheapest it will ever be. Is keeping the name the intended choice?

@dognose24 dognose24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the diff and ran it locally on the branch: the options-menu, feedback and data/api suites (91 tests), tsc and ESLint all pass, and the branch is level with trunk.

Dropping rating from the Happiness copy is safe: StatsUserFeedback.rating is already optional, the stats-admin proxy validates nothing on that route, and Calypso's own Stats feedback modal sends only product_name and feedback to the same endpoint. The split into ComparisonFields / ReadinessFields with a shared CommentField keeps the modal change small, and the new test pins the switch off dialog to its five point scale. Changelog coverage matches the plugins that bundle the package (mu-wpcom-plugin rightly skipped).

Approving, with two things worth tidying before merge:

  1. The description points at a section that isn't there. The data paragraph says "See 'Open questions' below", but the body has no such section. Either add it (the event name decision below is presumably what it was going to hold) or drop the sentence.

  2. Keeping the event name while swapping its main property. From the merge date, jetpack_premium_analytics_feedback_submit silently stops carrying rating while preview_disable still does, so anything querying rating on the feedback event goes quietly empty rather than failing. I'd keep the name (the event still means "the reader sent feedback") but note the cutover date wherever the analysis lives, STATS-461 or the tracking doc, so nobody reads the gap as a drop in submissions.

One optional product nit, not for this PR: after "Yes, I'd be happy to switch now", the follow up "What's missing?" reads oddly. That's what UNI-757 specifies, so it belongs with Gary rather than here, but it might be worth asking whether the open question should follow the answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Premium Analytics [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Premium Analytics [Plugin] Wpcomsh [Status] Needs Review This PR is ready for review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants