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

Stats: Remove legacy purchase page forced redirection #95436

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

dognose24
Copy link
Contributor

Related to https://github.com/Automattic/red-team/issues/139

Proposed Changes

  • Remove the unused code from the always false condition about the shouldRenderPaywall flag.
  • Remove possibly unused notice id focus_jetpack_purchase and related code, which seemed to pause the redirection for the Personal purchase page after clicking the I will do it later button.

Why are these changes being made?

  • The force purchase page redirection is no longer used. We use a paywall lock on each module or card now. More information: pejTkB-1t3-p2.

Testing Instructions

  • Spin this change up with the Calypso Live branch.
  • Prepare a site with the commercial paywall.
  • Ensure the module paywall on Stats Traffic, Insights, and module pages work as previously.

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)?

@dognose24 dognose24 added the Stats Everything related to our analytics product at /stats/ label Oct 16, 2024
@dognose24 dognose24 requested a review from a team October 16, 2024 17:27
@dognose24 dognose24 self-assigned this Oct 16, 2024
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Oct 16, 2024
@matticbot
Copy link
Contributor

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

Sections (~633 bytes removed 📉 [gzipped])

name                parsed_size           gzip_size
stats                   -1960 B  (-0.2%)     -625 B  (-0.2%)
google-my-business        -26 B  (-0.0%)       -8 B  (-0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~103 bytes added 📈 [gzipped])

name                                              parsed_size           gzip_size
async-load-calypso-my-sites-stats-pages-purchase       +213 B  (+0.3%)     +111 B  (+0.6%)
async-load-store-app-store-stats                        -26 B  (-0.0%)       -8 B  (-0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

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.

@@ -1,35 +1,14 @@
import config from '@automattic/calypso-config';
Copy link
Contributor

Choose a reason for hiding this comment

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

It feels the whole stats-redirect module could be removed, couldn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stats Everything related to our analytics product at /stats/ [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants