-
Notifications
You must be signed in to change notification settings - Fork 2k
Retain the existing site list data when you start searching #105325
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
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
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 |
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.
Nice 👍
@arthur791004 I just uploaded a video of what happens when you actually are looking for a hidden site. It's not the best. I still think we should merge it because it feels a lot better. But I wonder if we need to have another spinner for the site list @lucasmendes-design when we're fetching stuff, but it is happening in the background. Like one of those indeterminate progress bars that snakes across the top of the card maybe. Or maybe it could just be static text. I remember reading somewhere that originally Google Docs didn't have any saving indication because they felt one of their advantages was that "you never have to save on the cloud". But they got lots of user complaints because they didn't know where the save button was. So they ended up putting some static "loading" text in whenever a fetch was happening. |
I guess we can simply pass |
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 if we also preload the "?site_visibility=all
fetch" here
wp-calypso/client/dashboard/app/router/sites.tsx
Lines 43 to 45 in 0cfdd7e
loader: async () => { | |
// Preload the default sites list response without blocking. | |
queryClient.ensureQueryData( sitesQuery() ); |
Good idea. I've updated the PR and updated the video in the description to show what it does now when the search doesn't match any of the visible sites. This feels much better. I still think the idea of a "fetching is happening in the background" indicator would be good too, because now if your search matches some of your visible sites, but you are actually looking for your hidden site, you have no indication that you need to just wait a couple of seconds before it will pop up.
It seems kinda heavy to do two requests IMO. A lot of the time I just land on the site list because it is the default view, I'm not looking to load gobs of data when I just wanna navigate somewhere else. If we did want to have all that data client side then it would be better to just query |
Proposed Changes
The site list search box doesn't just search visible sites, it also searches sites which have been hidden. That is the site list empties when you start searching: it changes from a
?site_visibility=visible
fetch, to a?site_visibility=all
fetch.This PR changes the site list component so that retains the old data in the dataview when the new fetch is initiated. It is much less disruptive for most users who probably aren't looking for a hidden site.
Before
CleanShot.2025-08-22.at.17.02.01.mp4
After
CleanShot.2025-08-22.at.17.02.35.mp4
When you do have a hidden site
CleanShot.2025-08-22.at.19.53.08.mp4
Why are these changes being made?
Related to some product feedback pc4f5j-5KC-p2#comment-4989
While we can't improve the list performance until we've switched to elastic search, we can still improve the perceived performance.
Testing Instructions
Pre-merge Checklist