Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Fix how the TLD list is loaded and checked in the gravatar flow #96641

Open hambai opened 9 hours ago

hambai commented 9 hours ago

The way we check the TLDs in the registration flow for Gravatar domains was assuming that the available TLDs list is already loaded. However the coded didn't work like that and if you go to the flow with a new query param that contains an FQDN it would show you "The domain extension you are looking for is currently not supported. Additional domain extensions may become available for a fee in the future." error message even though the TLD is a supported one.

Screenshot 2024-11-21 at 19 44 23

Here's how it looks

Proposed Changes

Why are these changes being made?

Testing Instructions

Unfortunately because of how the signup works the message is shown quckly if the previous search had it. This is how the signup works. Fixing that would require a bigger refactoring and I'm not even sure where to start.

Pre-merge Checklist

github-actions[bot] commented 9 hours ago
Calypso Live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:commit-9fe9e91f25a516c97f3e0a2bbf2d4f781931ba61
Jetpack Cloud live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:commit-9fe9e91f25a516c97f3e0a2bbf2d4f781931ba61&env=jetpack
Automattic for Agencies live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:commit-9fe9e91f25a516c97f3e0a2bbf2d4f781931ba61&env=a8c-for-agencies
matticbot commented 9 hours ago

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

Sections (~51 bytes added 📈 [gzipped])

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

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