Skip to content

feat(property-search): improve empty state for search results - #1292

Merged
nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
snowrugar-beep:feat/issue-1212-improve-empty-state
Oct 15, 2026
Merged

nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
snowrugar-beep:feat/issue-1212-improve-empty-state

Conversation

@snowrugar-beep

Copy link
Copy Markdown
Contributor

Summary

Improves the empty state for the PropertySearch autocomplete dropdown. When a search term returns no properties or locations, the dropdown now shows a clear "No results found" message that echoes the term instead of rendering an empty container.

Problem

The dropdown in PropertySearch had branches for search history, for the loading spinner and for a populated suggestion list, but no branch for the case where a query had completed and returned nothing. In that case the listbox rendered as an empty

- a blank panel of dead space that looked like the search had silently failed, with no explanation and nothing for the user to act on.

Changes Made

  • Imported the existing SearchEmptyState helper from src/components/ui/EmptyState.tsx.
  • Added a dropdown branch in src/components/PropertySearch.tsx that renders SearchEmptyState when the debounced query is at least two characters long and the suggestion list is empty.

Implementation Details

The branch is ordered after the loading and history checks so it only appears once a request has settled and the history dropdown is not the intended content. The two-character gate matches the threshold at which usePropertyAutocompleteQuery actually issues a request, so the message only appears for queries that were genuinely searched. The debounced value is passed to SearchEmptyState, which renders the standard "No results for ..." copy used elsewhere in the app, keeping the empty state consistent across the search experience.

Closes #1214

Closes #1213

Closes #1212

Closes #1211

@drips-wave

drips-wave Bot commented Oct 15, 2026

Copy link
Copy Markdown

@snowrugar-beep Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit nanaf6203-bit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nanaf6203-bit
nanaf6203-bit merged commit 3cd6216 into MettaChain:main Oct 15, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants