wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

Stats: Adding UTM upgrade overlay

Open grzegorz-cp opened this issue 1 year ago • 3 comments

Related to #87571

Proposed Changes

  • adding and overlay to the UTM module for plans that don't support it
  • proper visibility will be adjusted as part of https://github.com/Automattic/wp-calypso/issues/87569

Testing Instructions

  • open the live branch
  • create new JN site and instead of purchasing a plan click "I will do it later"
  • go to the Stats on Calypso for that JN and apply stats/utm-module featureflag
  • verify that the new UTM module is covered with an overlay (screenshot below)
  • extra: purchase a commercial plan for a new JN page and verify that you see the component without an overlay

SCR-20240223-oqyz

Pre-merge Checklist

  • [ ] Has the general commit checklist been followed? (PCYsg-hS-p2)
  • [ ] https://wpcalypso.wordpress.com/devdocs/docs/testing/index.md 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)?

grzegorz-cp avatar Feb 23 '24 02:02 grzegorz-cp

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

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

  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/stats-87571-utm-overlay on your sandbox.

matticbot avatar Feb 23 '24 02:02 matticbot

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

Sections (~535 bytes added 📈 [gzipped])

name   parsed_size           gzip_size
stats      +2074 B  (+0.2%)     +535 B  (+0.2%)

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 (~70 bytes added 📈 [gzipped])

name                                       parsed_size           gzip_size
async-load-store-app-store-stats-listview       +484 B  (+0.2%)      +70 B  (+0.1%)
async-load-store-app-store-stats                +484 B  (+0.2%)      +70 B  (+0.1%)

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.

matticbot avatar Feb 23 '24 02:02 matticbot

This tests well for me but it doesn't take into account older plans. For example, one of my test sites has a legacy Jetpack Premium plan and on that site, the UTM module is blocked. We should probably confirm if that is the desired behaviour or not. Likewise for legacy Jetpack Professional plans.

I don't think we'll want to support any of the legacy plans, and we didn't consider these plans before either.

Likewise it shows the module as blocked on Jetpack.com and on the Jetpack P2, though I think you've already noted your investigating this via Slack.

That's a good call, but I guess it wouldn't block the PR as it's still behind the feature flag.

kangzj avatar Feb 26 '24 20:02 kangzj

Thank you for the feedback team. I'll merge this PR and iterate on the visibility as part of #87569.

We will also have to update the overlay after we introduce the "new" indicator and the header dropdown, but aligning the button colour sooner is a good idea.

grzegorz-cp avatar Feb 26 '24 22:02 grzegorz-cp

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

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 @grzegorz-cp for including a screenshot in the description! This is really helpful for our translators.

a8ci18n avatar Feb 27 '24 22:02 a8ci18n

Translation for this Pull Request has now been finished.

a8ci18n avatar Mar 01 '24 09:03 a8ci18n