Skip to content

Commit 59bac0b

Browse files
committed
Mark recommended tag search artists with star badges
- Add a star badge to recommended tag results in artist cards - Update tag search helper text to explain the recommended indicator
1 parent 3482a64 commit 59bac0b

2 files changed

Lines changed: 34 additions & 3 deletions

File tree

frontend/src/components/SearchArtistResults.jsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Library,
88
Loader2,
99
MoreVertical,
10+
Star,
1011
ThumbsDown,
1112
ThumbsUp,
1213
} from "lucide-react";
@@ -235,6 +236,8 @@ function SearchArtistResults({
235236
<div className="grid grid-cols-2 gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6">
236237
{artists.map((artist, index) => {
237238
const artistId = getArtistId(artist);
239+
const isRecommendedTagResult =
240+
type === "tag" && artist.tagResultSource === "recommended";
238241
const artistTypeLabel = normalizeArtistType(artist);
239242
const lifeSpan = formatLifeSpan(artist);
240243
const area = normalizeArea(artist);
@@ -290,6 +293,23 @@ function SearchArtistResults({
290293
showLoading={false}
291294
enableBackendFallback={false}
292295
/>
296+
{isRecommendedTagResult && (
297+
<div className="pointer-events-none absolute right-2 top-2">
298+
<div
299+
className="flex h-5 w-5 items-center justify-center rounded-full"
300+
style={{
301+
backgroundColor: "rgba(20, 19, 24, 0.72)",
302+
boxShadow: "0 3px 10px rgba(0, 0, 0, 0.22)",
303+
backdropFilter: "blur(6px)",
304+
}}
305+
>
306+
<Star
307+
className="h-3 w-3"
308+
style={{ color: "#f4c430", fill: "#f4c430" }}
309+
/>
310+
</div>
311+
</div>
312+
)}
293313
</div>
294314

295315
<div className="flex min-w-0 items-start gap-2">

frontend/src/pages/SearchResultsPage.jsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
FileMusic,
1010
Loader,
1111
Music,
12+
Star,
1213
} from "lucide-react";
1314
import {
1415
addArtistToLibrary,
@@ -859,9 +860,19 @@ function SearchResultsPage() {
859860
<p style={{ color: "#c1c1c3" }}>Trending artists right now</p>
860861
)}
861862
{isTagSearch && trimmedQuery && (
862-
<p style={{ color: "#c1c1c3" }}>
863-
{`Artists for tag "${trimmedQuery.replace(/^#/, "")}"`}
864-
</p>
863+
<div
864+
className="flex flex-wrap items-center gap-x-3 gap-y-2"
865+
style={{ color: "#c1c1c3" }}
866+
>
867+
<p>{`Artists for tag "${trimmedQuery.replace(/^#/, "")}"`}</p>
868+
<div className="ml-auto flex items-center gap-1.5 text-sm">
869+
<Star
870+
className="h-3.5 w-3.5"
871+
style={{ color: "#f4c430", fill: "#f4c430" }}
872+
/>
873+
<span>= recommended</span>
874+
</div>
875+
</div>
865876
)}
866877
{isAlbumSearch && trimmedQuery && (
867878
<div className="space-y-3">

0 commit comments

Comments
 (0)