Typeahead: search descriptions + show highlighted body snippet (fixes empty mmt dropdown)
The suggest endpoint only matched role/city/tags/facility, so a term that lives only in the ad body (e.g. mmt) returned nothing and the dropdown never opened — even though /Search found it. Now each type also ILIKEs the description, and the dropdown's sub-line is a snippet windowed around the match (client highlights it). Title is bold; body wraps to 2 lines. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -294,9 +294,10 @@ mark { background: #fff3bf; color: inherit; padding: 0 2px; border-radius: 3px;
|
||||
.nav-search-results a:hover { background: var(--primary-soft); }
|
||||
.nav-search-results .ns-type { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--primary-dark);
|
||||
background: var(--primary-soft); border-radius: 6px; padding: 2px 7px; }
|
||||
.nav-search-results .ns-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
|
||||
.nav-search-results .ns-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.nav-search-results .ns-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.nav-search-results .ns-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
||||
.nav-search-results .ns-label { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.nav-search-results .ns-sub { font-size: 11.5px; color: var(--muted); line-height: 1.5;
|
||||
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
||||
/* ES-style matched snippet shown under a search-result card */
|
||||
.search-snippet { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 4px 0 2px;
|
||||
background: var(--bg); border-inline-start: 3px solid var(--primary-soft); padding: 5px 9px; border-radius: 6px; }
|
||||
|
||||
Reference in New Issue
Block a user