-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix how the TLD list is loaded and checked in the gravatar flow #96641
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~121 bytes added 📈 [gzipped])
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 (~121 bytes added 📈 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this and works great, thanks for this fix!
As we discussed today, maybe we could hardcode the TLDs instead of making a call to get them. It's another place to update when we add new TLDs, but I think the user experience will be better since we save one network call.
This reverts commit 9fe9e91.
…it for the available TLD endpoint to render stuff
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.Proposed Changes
callback
parameter to thegetAvailableTlds
method so that we can call thecheckDomainAvailability
after the TLDs were loaded and set in the statecheckDomainAvailability
method always clear the error message if in the gravatar flowWhy are these changes being made?
Testing Instructions
/start/domain-for-gravatar/domain-only?search=yes&new=test20241121.link
and verify that you won't get the error/start/domain-for-gravatar/domain-only?search=yes&new=test20241121.net
and verify that you see the error/start/domain-for-gravatar/domain-only?search=yes&new=test20241121.link
and verify that you won't get the errorUnfortunately 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