Skip to content

Improve search UX#60

Merged
ScriptRaccoon merged 5 commits intomainfrom
improve-search-UX
Apr 12, 2026
Merged

Improve search UX#60
ScriptRaccoon merged 5 commits intomainfrom
improve-search-UX

Conversation

@ScriptRaccoon
Copy link
Copy Markdown
Owner

@ScriptRaccoon ScriptRaccoon commented Apr 12, 2026

Prerendering

The category search page (/category-search) had a UX issue: Loading the category properties took some time (around 200ms) because the database is hosted remotely. Even when a user is already on CatDat and navigates to the search page without entering anything yet, this delay is annoying. But the category properties are known already at build time (and do not change afterwards). So there is no point in loading them at this step, and we should just prerender the (initial) search page to avoid that. This has been done in this PR.

Separate Search Results Page

But the search results cannot be prerendered. Hence, I have created a separate page for them. (This separation has already been done for the comparison page before.)

search results

This means this PR introduces breaking URL changes. The category search result page is now located at

/category-search/results?satisfied... instead of /category-search?satisfied...

UX Improvements

Also, the UX has been improved by writing "Searching..." on the search button while the search is being done. The same is done on the comparison page where it now says "Comparing..." on the button while the comparison is done in the backend. This fixes more or less #44.

Functors

All updates to the category search page have also been applied to the functor search page. I will address the massive code duplication (introduced in #12) in a separate PR. For now, I have already unified the backend code for the search by writing a search handler that works with both entities. But this is more of a POC since the final solution will definitely look different.

Other Updates

  • invalid properties in the URL are reported
  • some previous code smells connected to reload issues could be removed because of the separation between the search page and the search result page (indicating that this is the right approach)

Follow-Up

When the user wants to do another search, they can click "Start new search" which navigates pack to the initial search page. But (a) this creates some friction, (b) the current selection is lost. Maybe it is better to either keep the selection or allow the user to do another search also on the search result page. I have tried both, didn't like it. But this can be improved in a future PR. Maybe it's also no big issue. I will check the feedback.

@ScriptRaccoon ScriptRaccoon merged commit fd67da1 into main Apr 12, 2026
@ScriptRaccoon ScriptRaccoon deleted the improve-search-UX branch April 12, 2026 14:10
@ScriptRaccoon ScriptRaccoon mentioned this pull request Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant