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

Domains: Hide domain suggestion error notice if TLD is supported in Gravatar flow #96644

Closed leonardost closed 7 hours ago

leonardost commented 9 hours ago

Proposed Changes

This PR cleans the suggestion error message in the Gravatar domain flow if the TLD of the domain being searched is supported.

Why are these changes being made?

If you visit the Gravatar flow with a domain with an unsupported TLD (e.g. /start/domain-for-gravatar/domain-only?search=yes&new=test202411212.net), an error notice should be shown. If you visit the Gravatar flow again with a domain with a supported TLD (e.g. /start/domain-for-gravatar/domain-only?search=yes&new=test202411212.link), the error message will still be showing. This PR fixes that problem.

Testing Instructions

Pre-merge Checklist

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

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

Sections (~12 bytes added 📈 [gzipped])

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

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

matticbot commented 8 hours ago

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 install-plugin.sh $pluginSlug fix/hide-domain-suggestion-error-if-tld-is-supported-in-gravatar-flow on your sandbox.

leonardost commented 7 hours ago

This doesn't work when the TLDs aren't loaded in the global state (you can add the flags=force-sympathy URL parameter to clear the state). Abandoning this in favor of #96641 or #96648.