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

Paid stats: add Stats reference on Personal checkout #97305

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

Initsogar
Copy link
Contributor

@Initsogar Initsogar commented Dec 10, 2024

Resolves https://github.com/Automattic/red-team/issues/305

We want to include Stats features on the checkout page while purchasing a WordPress.com Personal plan.

To achieve this, we need to replace the existing feature texts from FEATURE_STATS_PAID with FEATURE_STATS_COMMERCIAL and add the new feature message for FEATURE_STATS_PAID on the checkout page.

To ensure a smooth transition, these changes are being made conditionally under the stats/paid-wpcom-v3 feature flag to ensure everything works as expected.

CleanShot 2024-12-10 at 20 18 00@2x

Note

Due to restrictions on how the features list is presented, I am merging both lines into a single line while we gather feedback from the design team. I believe it is safe to proceed with this PR and iterate if needed.

Expected Proposal
CleanShot 2024-12-10 at 20 20 23@2x CleanShot 2024-12-10 at 20 20 45@2x

Proposed Changes

  • Add FEATURE_STATS_COMMERCIAL feature details using the existing FEATURE_STATS_PAID.
  • Update FEATURE_STATS_PAID title/description with the new texts under the stats/paid-wpcom-v3 feature flag.
  • Replace FEATURE_STATS_PAID with conditional logic to use FEATURE_STATS_COMMERCIAL under the stats/paid-wpcom-v3 feature flag in the Calypso plans list configuration.
    • This ensures that any references to FEATURE_STATS_PAID will continue working as usual and will switch to FEATURE_STATS_COMMERCIAL when the feature flag is enabled.
Before After
CleanShot 2024-12-10 at 19 47 04@2x CleanShot 2024-12-10 at 19 47 32@2x

Why are these changes being made?

https://github.com/Automattic/red-team/issues/305

Testing Instructions

  • Spin up a Calypso Live Branch

Validate Personal checkout has the new message under stats/paid-wpcom-v3 flag

  • Try upgrading to Personal plan. You can click on Upgrade plan on Clicks module.
  • Ensure you see the Stats beyond last 7 days message in the features list (the feature flag is enabled by default in live branch environment).
    CleanShot 2024-12-10 at 20 01 56@2x
  • Now disable the feature flag by appending ?flags=-stats/paid-wpcom-v3 to the checkout page.
  • Ensure you don't see any Stats message in the features list.
    CleanShot 2024-12-10 at 19 59 55@2x

Validate Premium checkout is not affected

  • Try upgrading to Premium plan, you can click on Upgrade plan on the UTM or Devices module.
  • In the checkout page, ensure you see In-depth site analytics dashboard. in the features list, with and without the stats/paid-wpcom-v3 flag.
    CleanShot 2024-12-10 at 19 54 17@2x

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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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)?

…PAID` title/description under `stats/paid-wpcom-v3` feature flag
…TATS_COMMERCIAL` under `stats/paid-wpcom-v3` feature flag
@Initsogar Initsogar self-assigned this Dec 10, 2024
@matticbot
Copy link
Contributor

matticbot commented Dec 11, 2024

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

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

  • happy-blocks
  • help-center
  • notifications
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/stats-personal-checkout on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented Dec 11, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~93 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper       +660 B  (+0.0%)      +93 B  (+0.0%)
entry-main          +660 B  (+0.0%)      +93 B  (+0.0%)
entry-login         +660 B  (+0.0%)      +93 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@Initsogar Initsogar marked this pull request as ready for review December 11, 2024 01:28
@Initsogar Initsogar requested review from lsl and a team December 11, 2024 01:28
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 11, 2024
@Initsogar Initsogar changed the title Update/stats personal checkout Paid stats: add Stats reference on Personal checkout Dec 11, 2024
@Initsogar Initsogar added the [Feature] Stats Everything related to our analytics product at /stats/ label Dec 11, 2024
Copy link
Contributor

@kangzj kangzj left a comment

Choose a reason for hiding this comment

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

Works as described 👍

Initsogar and others added 2 commits December 10, 2024 20:55
Co-authored-by: Louis Laugesen <louis.laugesen@gmail.com>
Co-authored-by: Louis Laugesen <louis.laugesen@gmail.com>
@Initsogar Initsogar merged commit c780b16 into trunk Dec 11, 2024
11 checks passed
@Initsogar Initsogar deleted the update/stats-personal-checkout branch December 11, 2024 02:10
@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 Dec 11, 2024
@a8ci18n
Copy link

a8ci18n commented Dec 11, 2024

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17057489

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @Initsogar for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Dec 15, 2024

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Stats Everything related to our analytics product at /stats/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants