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

Gifting: show gifted site name in Checkout #69834

Merged
merged 2 commits into from
Nov 8, 2022
Merged

Conversation

pottedmeat
Copy link
Contributor

@pottedmeat pottedmeat commented Nov 7, 2022

Proposed Changes

  • Adds gift_details to ResponseCart (introduced in D90977-code)
  • Updates the way the displayed site is determined
  • Prioritizes using a domain name in the cart
  • Uses receiver_blog_url from this response as a fall-through before using siteUrl

Testing Instructions

You'll need two accounts and make sure that the store is sandboxed.

  • With account A, purchase a personal plan (or use an account which already owns a plan) and a .live domain name
  • With account B, go to the following URL: /checkout/personal-bundle/gift/<ACCOUNT_A_SUBSCRIPTION_ID>. You can use Store Admin to find the subscription ID of the account A's plan.
  • Verify the site name is account A's blog URL
  • Screen Shot 2022-11-07 at 11 09 38 AM
  • With account B, go to the following URL: /checkout/personal-bundle,dotlive_domain/gift/<ACCOUNT_A_PLAN_SUBSCRIPTION_ID>,<ACCOUNT_A_DOMAIN_SUBSCRIPTION_ID>. You can use Store Admin to find the subscription ID of the account A's plan and .live domain.
  • Verify the site name is the domain name added to the purchase
  • Screen Shot 2022-11-07 at 11 12 00 AM

Fixes #1195

@pottedmeat pottedmeat requested a review from a team as a code owner November 7, 2022 21:54
@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 Nov 7, 2022
@michaeldcain michaeldcain changed the title Add/gift site name Gifting: show gifted site name in Checkout Nov 7, 2022
@matticbot
Copy link
Contributor

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

Sections (~26 bytes added 📈 [gzipped])

name      parsed_size           gzip_size
checkout        +36 B  (+0.0%)      +26 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 (~26 bytes added 📈 [gzipped])

name                                             parsed_size           gzip_size
async-load-calypso-my-sites-checkout-modal             +36 B  (+0.0%)      +26 B  (+0.0%)
async-load-calypso-blocks-editor-checkout-modal        +36 B  (+0.0%)      +26 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.

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.

Looks good to me!

@pottedmeat pottedmeat merged commit 5d70ff6 into trunk Nov 8, 2022
@pottedmeat pottedmeat deleted the add/gift-site-name branch November 8, 2022 17:14
@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 Nov 8, 2022
vasyas pushed a commit that referenced this pull request Nov 9, 2022
* Add gift_details type to response cart
* Fall through to the gift blog URL
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.

3 participants