Improve advanced search UX with the following enhancements:
1. handle mobile virtual keyboard "enter" (🔍)
Hitting "enter" (🔍) on mobile devices should close the mobile virtual keyboard
2. no results fallback
When a search returns no results, provide useful fallback text ("no results / check filters")
3. prioritize exchanges in search results
NOTE: ran into some issues implementing this – descoping into a separate issue #227
Currently, exchanges are not displayed even when searching for an exchange-specific term like "pancakeswap". This is due to the default liquidity:desc sort, since exchange records have null value for liquidity.
NOTE: This seemed to work in initial testing; later it stopped working and returned an error. Try this again and open a bug with Typesense if it is not working correctly.
Consider simplifying / refactoring SortSelect.svelte – the sort options don't require direction; it may work to directly set the sort array value on the <option> tag.
Checklist
[x] handle mobile virtual keyboard "enter"
[x] no results fallback
[x] improve alignment & styling of "clear filters" button
Goal
Improve advanced search UX with the following enhancements:
1. handle mobile virtual keyboard "enter" (🔍)
Hitting "enter" (🔍) on mobile devices should close the mobile virtual keyboard
2. no results fallback
When a search returns no results, provide useful fallback text ("no results / check filters")
3. prioritize exchanges in search resultsCurrently, exchanges are not displayed even when searching for an exchange-specific term like "pancakeswap". This is due to the default
liquidity:desc
sort, sinceexchange
records havenull
value forliquidity
.Typesense has a feature that can likely address this: https://typesense.org/docs/0.23.1/api/search.html#sorting-null-empty-or-missing-values
In
SortSelect.svelte
, update the sort value forâ–Ľ Liquidity
sort option to:Consider simplifying / refactoring
SortSelect.svelte
– the sort options don't requiredirection
; it may work to directly set the sort array value on the<option>
tag.Checklist