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

In progress: Don't recommend transferring unsupported domain and don't connect unregistered domains #97098

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

Conversation

StevenPartridge
Copy link
Contributor

@StevenPartridge StevenPartridge commented Dec 5, 2024

Introduces logic to hide the recommendation to transfer an unsupported domain to wp.com

related to code-D166359

Related to #

Proposed Changes

  • Hides suggestion to transfer when the tld is not supported

image

  • Don't continue forward to the Transfer/Connect step at all if the domain is not Registered
    image

Why are these changes being made?

  • To avoid asking customers to do things that are unsupported, giving a false impression

Testing Instructions

  • Apply this diff
  • Apply this backend diff: 170089-ghe-Automattic/wpcom
  • Build and proxy Calypso
  • Proxy for Sandbox
  • Navigate to a site you own
  • Navigate to Upgrades > Domains
  • Select 'Use a Domain I Own' from the dropdown
  • image

TEST CASE 1 - Unsupported, Registered Domain:

  • Enter 'google.pl', or another UNSUPPORTED TLD that is definitely registered (elsewhere)
  • On the next page, ensure the "Transfer [Recommended]" side banner is not shown

TEST CASE 2 - Unsupported, Unregistered Domain:

  • Enter 'veryfakedomain12345.pl' or another Unsupported TLD that is certainly not registered here or anywhere
  • You should see the same error that you would see with 'veryfakedomain12345.com' (a supported tld), suggesting you seek further answers on the Domain Search page

TEST CASE 3 - Supported Unregistered Domain:

  • Enter 'veryfakedomain12345.com' or another Supported TLD that is unequivocally not registered here or anywhere
  • You should see the same error from Test Case 2, this is the current experience and should be unchanged

TEST CASE - Supported Registered Domain:

  • Enter 'google.com' or another supported TLD that is unquestionably registered elsewhere
  • On the next page, ensure the "Transfer [Recommended]" side banner IS shown, as per the current (and unchanged) functionality

@StevenPartridge StevenPartridge requested a review from a team as a code owner December 5, 2024 03:34
@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 5, 2024
@matticbot
Copy link
Contributor

matticbot commented Dec 5, 2024

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

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

  • notifications

To test WordPress.com changes, run install-plugin.sh $pluginSlug nomado-96192/disable-connecting-registrable-domain on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented Dec 5, 2024

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

Sections (~21 bytes added 📈 [gzipped])

name                  parsed_size           gzip_size
domains                     +39 B  (+0.0%)      +21 B  (+0.0%)
update-design-flow          +12 B  (+0.0%)       +5 B  (+0.0%)
link-in-bio-tld-flow        +12 B  (+0.0%)       +5 B  (+0.0%)
copy-site-flow              +12 B  (+0.0%)       +5 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 (~5 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
async-load-signup-steps-domains        +12 B  (+0.0%)       +5 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.

@StevenPartridge StevenPartridge force-pushed the nomado-96192/disable-connecting-registrable-domain branch from 74083ce to 869b9d8 Compare December 10, 2024 21:06
@StevenPartridge StevenPartridge removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 19, 2024
@StevenPartridge StevenPartridge force-pushed the nomado-96192/disable-connecting-registrable-domain branch from 869b9d8 to 7a22bd7 Compare January 14, 2025 23:29
@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 14, 2025
@@ -8,7 +8,7 @@ export function getAvailabilityErrorMessage( { availabilityData, domainName, sel
const { status, mappable, maintenance_end_time, other_site_domain, other_site_domain_only } =
availabilityData;

if ( domainAvailability.AVAILABLE === status ) {
if ( [ status, mappable ].includes( domainAvailability.AVAILABLE ) ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change means that a domain that is unregistered will always lead the user to search for a domain to register:

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I was worried that adding the mappable value here might have unintended side-effects, but I think the only place where mappable can be set to "available" is in the new check added in 170089-ghe-Automattic/wpcom, so it should be fine 🤔

@@ -335,7 +335,7 @@ function ConnectDomainStep( {
return <div className={ baseClassName + '__sidebar-placeholder' }></div>;
}

if ( ! isStepStart ) {
if ( ! isStepStart || ! domainSetupInfo?.data?.is_supported_tld ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to hide this box, on the right, to avoid suggesting an unsupported action

image

Copy link
Contributor

@leonardost leonardost left a comment

Choose a reason for hiding this comment

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

LGTM! Tested this alongside 170089-ghe-Automattic/wpcom and worked as expected, thanks for this improvement!

I've tried all the test cases mentioned in the test plan:

  • Unsupported TLD + unregistered domain, e.g. adsifhjiuwehf.pl
  • Unsupported TLD + registered domain, aniagotuje.pl
  • Supported TLD + unregistered domain, iasudhfiuashdfiu.com
  • Supported TLD + registered domain, google.com

And all worked correctly

@@ -8,7 +8,7 @@ export function getAvailabilityErrorMessage( { availabilityData, domainName, sel
const { status, mappable, maintenance_end_time, other_site_domain, other_site_domain_only } =
availabilityData;

if ( domainAvailability.AVAILABLE === status ) {
if ( [ status, mappable ].includes( domainAvailability.AVAILABLE ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I was worried that adding the mappable value here might have unintended side-effects, but I think the only place where mappable can be set to "available" is in the new check added in 170089-ghe-Automattic/wpcom, so it should be fine 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[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