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

Add quantity summary to billing purchase history when available #50028

Merged
merged 5 commits into from
Feb 18, 2021

Conversation

olaseni
Copy link
Contributor

@olaseni olaseni commented Feb 12, 2021

Changes proposed in this Pull Request

  • Retrieves new parameters licensed_quantity_summary and new_quantity for purchase history line items and details and uses it to display contextual information for products with upgradeable quantities.

This PR depends on changes from code-D56964.

The purchase billing history UI should look similar to this after changes.

Screenshot 2021-02-16 at 4 35 04 AM

Testing instructions

  • Ensure code-D56964
  • Checkout this branch
  • Visit your billing history page i.e. /purchases/subscriptions/. You may still need to click on Billing history
  • Confirm that the products with upgradeable quantities i.e. Email display meaningful description i.e. quantity upgrades.

@olaseni olaseni requested a review from a team as a code owner February 12, 2021 09:53
@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 Feb 12, 2021
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

matticbot commented Feb 12, 2021

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

Sections (~379 bytes added 📈 [gzipped])

name            parsed_size           gzip_size
site-purchases      +2014 B  (+0.2%)     +379 B  (+0.1%)
purchases           +2014 B  (+0.1%)     +379 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.

@olaseni olaseni self-assigned this Feb 12, 2021
Copy link
Member

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

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

This seems fine to me although I do have a concern about how the "(renewal)" text added by the backend is localized. Discussion on the backend patch.

@stephanethomas
Copy link
Contributor

I agree with the concerns raised by Payton in the server patch.

1 new mailbox. Total malboxes: 13 (upgrade)

I really think we should avoid this upgrade term in user-facing content when we want to refer to the process of adding new mailboxes. It's not clear enough, and we use it for other things such as subscriptions (e.g. see the Active Upgrades tab) . I'm also not sure why we need to display the total number of mailboxes, so I would suggest just the following:

Purchase for 1 new mailbox

In order to be consistent, we could have the following for renewals:

Renewal for 13 mailboxes

Also, let's ping @Wesco for feedback ☺.

@olaseni
Copy link
Contributor Author

olaseni commented Feb 16, 2021

I understand where you are coming from @stephanethomas . I was initially trying to be consistent with some of the billing emails we already send on purchase, but I think your points are valid.

Of course, I would not mind to get @wensco opinion into the mix.

@olaseni olaseni force-pushed the update/add-quantity-summary-to-billing-history branch from f63c100 to d00c44a Compare February 16, 2021 02:44
Copy link
Contributor

@hambai hambai left a comment

Choose a reason for hiding this comment

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

Tested this and it looks okay. I left a small comment on the copy.

client/me/purchases/billing-history/utils.jsx Outdated Show resolved Hide resolved
translate
) {
if ( isRenewal ) {
return translate( 'Renewal for %(quantity)s mailbox', 'Renewal for %(quantity)s mailboxes', {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably use %(quantity)d instead of %(quantity)s.

@olaseni olaseni force-pushed the update/add-quantity-summary-to-billing-history branch from b59c2d6 to 2bacfd9 Compare February 18, 2021 10:46
@olaseni olaseni added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 18, 2021
@olaseni olaseni merged commit 6612c45 into trunk Feb 18, 2021
@olaseni olaseni deleted the update/add-quantity-summary-to-billing-history branch February 18, 2021 13:07
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 18, 2021
@a8ci18n
Copy link

a8ci18n commented Feb 18, 2021

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

Thank you @olaseni for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Feb 25, 2021

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants