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

[WIP] Devgrad/test/dataviews in purchase management #97484

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

Conversation

JessBoctor
Copy link
Collaborator

Related to # #86616

Proposed Changes

  • This WIP diff is only a proof of concept to see how difficult it would be to implement the WordPress Core DataView component into the me/purchases screen. I was able to create a very minimum proof of concept using a flat JSON copy of the data available from the me/purchases endpoint. To avoid doxing myself, I am deleting the JSON file from this PR. For testing, you can replicate by downloading the subscriptions response from me/purchases and converting it to a single JSON object.

Why are these changes being made?

  • By utilizing DataViews, we can implement searching, filtering, and sorting in a way that will soon become WordPress standard.

Testing Instructions

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

@JessBoctor JessBoctor requested a review from a team as a code owner December 13, 2024 21:53
@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 13, 2024
@matticbot
Copy link
Contributor

matticbot commented Dec 13, 2024

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

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

  • blaze-dashboard
  • odyssey-stats

To test WordPress.com changes, run install-plugin.sh $pluginSlug devgrad/test/dataviews-in-purchase-management on your sandbox.

Simplify subscription test data
@matticbot
Copy link
Contributor

matticbot commented Dec 13, 2024

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

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

name                   parsed_size           gzip_size
entry-stepper              +3569 B  (+0.2%)     +385 B  (+0.1%)
entry-main                 +3441 B  (+0.2%)     +369 B  (+0.1%)
entry-login                +1005 B  (+0.0%)     +290 B  (+0.0%)
entry-domains-landing      +1005 B  (+0.1%)     +290 B  (+0.1%)
entry-browsehappy          +1005 B  (+0.5%)     +290 B  (+0.5%)
entry-subscriptions         +949 B  (+0.1%)     +254 B  (+0.0%)

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

Sections (~36681 bytes added 📈 [gzipped])

name                               parsed_size            gzip_size
purchases                            +686808 B  (+32.0%)  +173273 B  (+29.3%)
update-design-flow                      +693 B   (+0.1%)     +143 B   (+0.0%)
signup                                  +600 B   (+0.2%)      +18 B   (+0.0%)
link-in-bio-tld-flow                    +475 B   (+0.0%)       +4 B   (+0.0%)
security                                +335 B   (+0.0%)     +146 B   (+0.1%)
themes                                  -260 B   (-0.0%)     -343 B   (-0.1%)
onboarding-flow                         +230 B   (+0.3%)      +42 B   (+0.4%)
email                                   -224 B   (-0.0%)      -94 B   (-0.0%)
checkout                                -198 B   (-0.0%)     -189 B   (-0.0%)
domains                                 -190 B   (-0.0%)       +7 B   (+0.0%)
site-blocks                             +170 B   (+0.0%)     +764 B   (+0.3%)
theme                                   -159 B   (-0.0%)      -54 B   (-0.0%)
staging-site                            -159 B   (-0.0%)      -53 B   (-0.0%)
sites-dashboard                         -159 B   (-0.0%)      -53 B   (-0.0%)
site-tools                              -159 B   (-0.0%)      -53 B   (-0.0%)
site-settings                           -159 B   (-0.0%)      -53 B   (-0.0%)
site-performance                        -159 B   (-0.0%)      -53 B   (-0.0%)
site-overview                           -159 B   (-0.0%)      -53 B   (-0.0%)
site-monitoring                         -159 B   (-0.0%)      -53 B   (-0.0%)
site-marketing                          -159 B   (-0.0%)      -53 B   (-0.0%)
site-logs                               -159 B   (-0.0%)      -53 B   (-0.0%)
settings-writing                        -159 B   (-0.0%)      -51 B   (-0.0%)
settings-reading                        -159 B   (-0.0%)      -48 B   (-0.0%)
settings-performance                    -159 B   (-0.0%)      -48 B   (-0.0%)
settings-newsletter                     -159 B   (-0.0%)      -48 B   (-0.0%)
settings-discussion                     -159 B   (-0.0%)      -48 B   (-0.0%)
scan                                    -159 B   (-0.0%)      -51 B   (-0.0%)
promote-post-i2                         -159 B   (-0.0%)      -48 B   (-0.0%)
people                                  -159 B   (-0.0%)      -50 B   (-0.0%)
jetpack-search                          -159 B   (-0.0%)      -51 B   (-0.0%)
jetpack-cloud-settings                  -159 B   (-0.0%)      -48 B   (-0.0%)
jetpack-cloud-partner-portal            -159 B   (-0.0%)      -51 B   (-0.0%)
jetpack-cloud-overview                  -159 B   (-0.0%)      -49 B   (-0.0%)
jetpack-cloud-agency-sites-v2           -159 B   (-0.0%)      -55 B   (-0.0%)
jetpack-cloud                           -159 B   (-0.0%)      -47 B   (-0.0%)
hosting-features                        -159 B   (-0.0%)      -53 B   (-0.0%)
hosting                                 -159 B   (-0.0%)      -53 B   (-0.0%)
google-my-business                      -159 B   (-0.0%)      -43 B   (-0.0%)
github-deployments                      -159 B   (-0.0%)      -53 B   (-0.0%)
backup                                  -159 B   (-0.0%)      -48 B   (-0.0%)
a8c-for-agencies-sites                  -159 B   (-0.0%)      -55 B   (-0.0%)
account-close                           -119 B   (-0.0%)     -532 B   (-0.2%)
with-theme-assembler-flow               +115 B   (+0.2%)      +18 B   (+0.2%)
update-options-flow                     +115 B   (+0.2%)      +17 B   (+0.3%)
trial-wooexpress-flow                   +115 B   (+0.2%)      +18 B   (+0.2%)
tailored-ecommerce-flow                 +115 B   (+0.2%)      +19 B   (+0.3%)
reblogging-flow                         +115 B   (+1.9%)      +30 B   (+1.6%)
new-hosted-site-flow                    +115 B   (+1.2%)      +30 B   (+1.1%)
free-post-setup-flow                    +115 B   (+0.2%)      +18 B   (+0.3%)
write-flow                              -103 B   (-0.0%)      -15 B   (-0.0%)
woocommerce-installation                -103 B   (-0.0%)      -13 B   (-0.0%)
woocommerce                             -103 B   (-0.0%)      -13 B   (-0.0%)
subscribers                             -103 B   (-0.0%)      -13 B   (-0.0%)
stats                                   -103 B   (-0.0%)      -13 B   (-0.0%)
settings-security                       -103 B   (-0.0%)     -116 B   (-0.1%)
settings-jetpack                        -103 B   (-0.0%)      -13 B   (-0.0%)
preview                                 -103 B   (-0.0%)      -13 B   (-0.0%)
posts-custom                            -103 B   (-0.0%)      -26 B   (-0.0%)
posts                                   -103 B   (-0.0%)      -26 B   (-0.0%)
plans                                   -103 B   (-0.0%)      -13 B   (-0.0%)
pages                                   -103 B   (-0.0%)      -28 B   (-0.0%)
migrate                                 -103 B   (-0.0%)      -13 B   (-0.0%)
marketing                               -103 B   (-0.0%)      -14 B   (-0.0%)
jetpack-social                          -103 B   (-0.0%)      -13 B   (-0.0%)
jetpack-connect                         -103 B   (-0.0%)      -13 B   (-0.0%)
jetpack-cloud-pricing                   -103 B   (-0.0%)      -13 B   (-0.0%)
jetpack-cloud-features-comparison       -103 B   (-0.0%)      -13 B   (-0.0%)
import                                  -103 B   (-0.0%)      -19 B   (-0.0%)
export                                  -103 B   (-0.0%)      -13 B   (-0.0%)
earn                                    -103 B   (-0.0%)      -13 B   (-0.0%)
customize                               -103 B   (-0.0%)      -13 B   (-0.0%)
concierge                               -103 B   (-0.0%)      -13 B   (-0.0%)
comments                                -103 B   (-0.0%)      -13 B   (-0.0%)
build-flow                              -103 B   (-0.0%)      -15 B   (-0.0%)
add-ons                                 -103 B   (-0.0%)      -13 B   (-0.0%)
activity                                -103 B   (-0.0%)      -13 B   (-0.0%)
home                                     +80 B   (+0.0%)     +944 B   (+0.2%)
privacy                                  +77 B   (+0.0%)     +258 B   (+0.1%)
notification-settings                    +77 B   (+0.0%)      +80 B   (+0.0%)
marketplace                              -77 B   (-0.0%)      +46 B   (+0.0%)
help                                     +77 B   (+0.0%)     -288 B   (-0.1%)
developer                                +77 B   (+0.0%)     +258 B   (+0.1%)
start-writing-flow                       +59 B   (+0.2%)      -16 B   (-0.3%)
site-setup-wg                            +59 B   (+0.1%)      -11 B   (-0.1%)
site-setup-flow                          +59 B   (+0.1%)      -11 B   (-0.1%)
site-migration-flow                      +59 B   (+0.1%)      -14 B   (-0.1%)
readymade-template-flow                  +59 B   (+0.0%)      -13 B   (-0.0%)
newsletter-flow                          +59 B   (+0.3%)      -12 B   (-0.2%)
migration-signup                         +59 B   (+0.1%)       -9 B   (-0.1%)
migration-flow                           +59 B   (+0.1%)      -14 B   (-0.1%)
import-flow                              +59 B   (+0.1%)      -10 B   (-0.1%)
hundred-year-plan                        +59 B   (+0.2%)       -8 B   (-0.1%)
hundred-year-domain                      +59 B   (+0.1%)       +6 B   (+0.0%)
hosted-site-migration-flow               +59 B   (+0.1%)      -14 B   (-0.1%)
entrepreneur-flow                        +59 B   (+0.0%)      -20 B   (-0.1%)
design-first-flow                        +59 B   (+0.2%)      -11 B   (-0.2%)
assembler-first-flow                     +59 B   (+0.1%)       -9 B   (-0.0%)
ai-assembler-flow                        +59 B   (+0.1%)      -10 B   (-0.1%)
transferring-hosted-site-flow            -56 B   (-0.1%)      -40 B   (-0.1%)
performance-profiler                     -56 B   (-0.0%)      -32 B   (-0.0%)
newsletter-post-setup-flow               -56 B   (-0.0%)      -27 B   (-0.1%)
link-in-bio-post-setup-flow              -56 B   (-0.0%)      -27 B   (-0.1%)
jetpack-cloud-manage-pricing             -56 B   (-0.0%)      -30 B   (-0.0%)
import-hosted-site-flow                  -56 B   (-0.0%)      -39 B   (-0.0%)
a8c-for-agencies-team                    -56 B   (-0.0%)      -40 B   (-0.0%)
a8c-for-agencies-referrals               -56 B   (-0.0%)      -40 B   (-0.0%)
a8c-for-agencies-purchases               -56 B   (-0.0%)      -33 B   (-0.0%)
a8c-for-agencies-overview                -56 B   (-0.0%)      -40 B   (-0.0%)
a8c-for-agencies-migrations              -56 B   (-0.0%)      -40 B   (-0.0%)
a8c-for-agencies-marketplace             -56 B   (-0.0%)      -36 B   (-0.0%)
a8c-for-agencies-client                  -56 B   (-0.0%)      -40 B   (-0.0%)
devdocs                                  -54 B   (-0.0%)       -5 B   (-0.0%)
copy-site-flow                           +54 B   (+0.0%)     -201 B   (-0.1%)
plugins                                  +50 B   (+0.0%)     +622 B   (+0.1%)
reader                                   +37 B   (+0.0%)     +635 B   (+0.1%)
jetpack-cloud-plugin-management          +37 B   (+0.0%)     +637 B   (+0.1%)
site-purchases                           -30 B   (-0.0%)     -673 B   (-0.2%)
media                                    -27 B   (-0.0%)     -147 B   (-0.0%)
me                                       -26 B   (-0.0%)     +323 B   (+0.2%)
account                                  -26 B   (-0.0%)     +126 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 (~1016 bytes added 📈 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-signup-steps-domains                                                        +203 B  (+0.0%)     +683 B  (+0.4%)
async-load-calypso-post-editor-media-modal                                             +169 B  (+0.0%)     +625 B  (+0.2%)
async-load-calypso-post-editor-editor-media-modal                                      +169 B  (+0.0%)     +625 B  (+0.2%)
async-load-design-blocks                                                               -159 B  (-0.0%)      +81 B  (+0.0%)
async-load-signup-steps-site-picker                                                    -103 B  (-0.1%)      -15 B  (-0.0%)
async-load-signup-steps-difm-site-picker                                               -103 B  (-0.1%)      -15 B  (-0.0%)
async-load-calypso-components-sites-popover                                            -103 B  (-0.1%)      -15 B  (-0.0%)
async-load-signup-steps-page-picker                                                     -56 B  (-0.0%)      -21 B  (-0.0%)
async-load-signup-steps-initial-intent                                                  -56 B  (-0.1%)      -36 B  (-0.1%)
async-load-signup-steps-courses                                                         -56 B  (-0.2%)      -17 B  (-0.2%)
async-load-purchase-modal-wrapper                                                       -56 B  (-0.0%)      -23 B  (-0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...        -56 B  (-0.0%)      -22 B  (-0.0%)
async-load-masterbar-launchpad-navigator                                                -56 B  (-0.1%)      -38 B  (-0.2%)
async-load-calypso-layout-command-palette                                               -56 B  (-0.0%)      -24 B  (-0.0%)
async-load-calypso-jetpack-cloud-sections-sidebar-navigation-manage-selected-...        -56 B  (-0.0%)      -34 B  (-0.1%)
async-load-calypso-blocks-jitm-templates-home-task                                      -56 B  (-0.1%)      -30 B  (-0.2%)
async-load-automattic-whats-new                                                         -56 B  (-0.2%)      -38 B  (-0.3%)
async-load-calypso-my-sites-checkout-modal                                              -39 B  (-0.0%)     -274 B  (-0.1%)
async-load-calypso-blocks-editor-checkout-modal                                         -39 B  (-0.0%)     -383 B  (-0.1%)
async-load-design-playground                                                            -27 B  (-0.0%)      +42 B  (+0.0%)
async-load-design                                                                       -27 B  (-0.0%)      +42 B  (+0.0%)
async-load-signup-steps-rewind-form-creds                                               +20 B  (+0.0%)      +10 B  (+0.0%)
async-load-signup-steps-clone-credentials                                               +20 B  (+0.0%)      +10 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.

@JessBoctor JessBoctor self-assigned this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE [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.

2 participants