-
Notifications
You must be signed in to change notification settings - Fork 2k
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: Add subscribers-dataviews flag and component #97946
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~351 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~38319 bytes added 📈 [gzipped])
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 (~1892 bytes removed 📉 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
@arcangelini Yes, thanks for the reminder! The same but with Jetpack Cloud styles and Jetpack support links. I'll open an issue, but let me know if we should fix anything in this initial merge. |
d5f6afc
to
389e785
Compare
setSortTerm, | ||
} = useSubscribersPage(); | ||
|
||
const isSimple = useSelector( isSimpleSite ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm preserving this empty view logic, but we could refactor or replace it.
onGiftSubscription={ onGiftSubscription } | ||
onClickUnsubscribe={ onClickUnsubscribe } | ||
/> | ||
{ isEnabled( 'subscribers-dataviews' ) ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm showing the new DataViews component when the flag is enabled. I repurposed a lot from the existing SubscriberListContainer
component.
389e785
to
05c3240
Compare
import './style.scss'; | ||
|
||
const SubscriptionTypeCell = ( { subscriber }: { subscriber: Subscriber } ) => { | ||
const plans = useSubscriptionPlans( subscriber ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that we're not returning plans data from the endpoint used here. So this is how it works in the individual subscriber page, but it's not actually working yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good start. Since this is just the foundation that is going to be behind a flag I say we ship. I tested for regressions and didn't run into any issue. There are a few things that need to be fixed but they are all covered in other issues (as far as I saw). 🚀 🚀
Related to https://github.com/Automattic/loop/issues/291
Proposed Changes
subscribers-dataviews
.Why are these changes being made?
Testing Instructions
/subscribers/{ site id }?flags=subscribers-dataviews
Note: I tested with paid subscribers and we're not currently returning plans data from the endpoint used here.
Pre-merge Checklist