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: Add UTM module overlay with blurred fake data bars #88629

Merged
merged 4 commits into from
Mar 18, 2024

Conversation

dognose24
Copy link
Contributor

Closes #88055

Proposed Changes

  • Introduce StatsModuleUTMOverlay to utilize StatsListCard with overlay and fake bars.
  • Remove unused prop statType of StatsCardUpsellJetpack.

Testing Instructions

  • Spin up this change with the Calypso Live branch.
  • Prepare a site without a purchased Stats commercial license.
  • Navigate to Stats > Traffic page with the feature flag: stats/utm-module.
  • Ensure the UTM module is disabled with an overlay aligned with the design.
截圖 2024-03-19 上午12 28 54
  • Navigate to the post details page and the UTM module summary page.
  • Ensure the UTM module is disabled with an overlay aligned with the design.
截圖 2024-03-19 上午12 29 49 截圖 2024-03-19 上午12 30 13

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

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

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

Sections (~154 bytes added 📈 [gzipped])

name   parsed_size           gzip_size
stats       +432 B  (+0.0%)     +154 B  (+0.1%)

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

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
Copy link
Contributor

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

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

  • odyssey-stats

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

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.

It works as described 👍

@kangzj kangzj merged commit 473a05e into trunk Mar 18, 2024
14 of 15 checks passed
@kangzj kangzj deleted the update/stats_utm_module_overlay branch March 18, 2024 20:44
@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 Mar 18, 2024
className={ classNames( className, 'stats-module-utm-overlay', 'stats-module__card', 'utm' ) }
moduleType="utm"
data={ fakeData }
mainItemLabel="Posts by Source / Medium"
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to translate the strings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it would not be necessary since the label would generally be under the blur overlay. 🙂

billrobbins pushed a commit that referenced this pull request Mar 20, 2024
* Remove unused prop of StatsCardUpsellJetpack

* Introduce StatsCard with fake data and an overlay as StatsModuleUTMOverlay

* Add blur to splitHeader of StatsCard

* Pass className to StatsModuleUTMOverlay for layout grid
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.

Stats: Add overlay and blur to the summary pages
4 participants