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

Subscribers Dataview: add sort order #98498

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

Conversation

arcangelini
Copy link
Contributor

Closes https://github.com/Automattic/loop/issues/303
Closes https://github.com/Automattic/loop/issues/305
Closes https://github.com/Automattic/loop/issues/307

Proposed Changes

  • Adds sort order to the subscriber dataviews
  • Extends the subscription context to include the sort order
  • Update the query args on sort order update

Why are these changes being made?

  • This is needed to accommodate the sorting in data views

Testing Instructions

  1. Open live link and go to /subscribers?flags=subscribers-dataviews
  2. Sort by name or date ascending and descending
  3. Remove flag and test for regressions

@arcangelini arcangelini self-assigned this Jan 16, 2025
@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 Jan 16, 2025
@matticbot
Copy link
Contributor

matticbot commented Jan 16, 2025

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

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

name                 parsed_size           gzip_size
entry-subscriptions        +63 B  (+0.0%)      +24 B  (+0.0%)

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

Sections (~202 bytes added 📈 [gzipped])

name         parsed_size           gzip_size
subscribers       +536 B  (+0.0%)     +181 B  (+0.0%)
reader             +63 B  (+0.0%)      +21 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 (~102 bytes added 📈 [gzipped])

name                                                 parsed_size           gzip_size
async-load-calypso-my-sites-stats-pages-subscribers       +272 B  (+0.2%)     +102 B  (+0.2%)

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.

@arcangelini arcangelini added [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. Newsletters and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 16, 2025
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 16, 2025
@matticbot
Copy link
Contributor

matticbot commented Jan 16, 2025

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

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

  • blaze-dashboard
  • command-palette-wp-admin
  • help-center
  • notifications
  • odyssey-stats
  • whats-new
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug subscribers/dataview-sorting on your sandbox.

Copy link
Member

@allilevine allilevine left a comment

Choose a reason for hiding this comment

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

Looks good overall! Two things:

  1. I can click Subscription Type to sort, but I think it's actually using the Since column. Did you want to add that sorting in this PR?
  2. When I first sort, I see the loading circle for a millisecond before the subscribers load. I'm not sure why this would be any slower than what's on staging now, though. An extra check for the sort order?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. Newsletters [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