-
Notifications
You must be signed in to change notification settings - Fork 2k
Domain Search Rewrite: Fetch available TLDs from the backend in the Filter component #105547
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
Domain Search Rewrite: Fetch available TLDs from the backend in the Filter component #105547
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
d3de978
to
996daea
Compare
996daea
to
3f8f7fd
Compare
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.
Looking good so far!
- Can we disable the filter button while we're fetching the TLDs?
- Can we hide the filter button if there are no available TLDs?
@zaguiini yep! I've updated the PR with those. |
Awesome @leonardost. The last step is to pass the |
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 |
@zaguiini now the filter is being used in the domain suggestions query, let me know if it looks good to you 🙂 |
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.
Awesome 🚀 🚀 🔥
|
||
const { data: suggestion } = useQuery( { | ||
...queries.domainSuggestions( query ), | ||
...queries.domainSuggestions( query, { | ||
tlds: filter.tlds, |
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.
What happens if filter.tlds
is an empty array? Can we only add it to the query if there's a value, and undefined
otherwise?
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.
The qs library configuration we're using to generate query strings doesn't allow empty arrays to be sent as parameters, so it should be fine.
Part of DOMAINS-1620
Proposed Changes
This PR:
Filter
component used in domain search to fetch the available TLDs from the backend andScreenshot
Demo
Screen.Recording.2025-09-04.at.19.44.41.mov
Why are these changes being made?
This is part of the Domain Search Rewrite project, which aims to rewrite domain search components in a provider-agnostic way.
Testing Instructions
/setup/onboarding/domains?flags=domain-search-rewrite
Pre-merge Checklist