From f8a68029c19e9ed431cbfe6073a737b2cef0b13c Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Thu, 19 Nov 2026 12:56:29 -0500 Subject: [PATCH] feat(web): move playlist search to the top right Co-Authored-By: Claude Opus 5.5 --- apps/web/app/(app)/playlist/[id]/loading.tsx | 2 +- .../app/(app)/playlist/favorites/loading.tsx | 2 +- apps/web/components/library-skeletons.tsx | 16 +++++++-- apps/web/components/playlist-view.tsx | 36 +++++++++---------- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/apps/web/app/(app)/playlist/[id]/loading.tsx b/apps/web/app/(app)/playlist/[id]/loading.tsx index 9be4aad..419e3a3 100644 --- a/apps/web/app/(app)/playlist/[id]/loading.tsx +++ b/apps/web/app/(app)/playlist/[id]/loading.tsx @@ -1,5 +1,5 @@ import { CollectionDetailSkeleton } from "@/components/library-skeletons" export default function Loading() { - return + return } diff --git a/apps/web/app/(app)/playlist/favorites/loading.tsx b/apps/web/app/(app)/playlist/favorites/loading.tsx index 9be4aad..419e3a3 100644 --- a/apps/web/app/(app)/playlist/favorites/loading.tsx +++ b/apps/web/app/(app)/playlist/favorites/loading.tsx @@ -1,5 +1,5 @@ import { CollectionDetailSkeleton } from "@/components/library-skeletons" export default function Loading() { - return + return } diff --git a/apps/web/components/library-skeletons.tsx b/apps/web/components/library-skeletons.tsx index 9e2a93d..f6595fb 100644 --- a/apps/web/components/library-skeletons.tsx +++ b/apps/web/components/library-skeletons.tsx @@ -148,11 +148,23 @@ export function SongListSkeleton() { ) } -/** Matches the header + track list layout of album and playlist pages. */ -export function CollectionDetailSkeleton() { +/** + * Matches the header + track list layout of album and playlist pages. + * Pass `search` on playlist pages to reserve the "Find in Playlist" toolbar row. + */ +export function CollectionDetailSkeleton({ + search = false, +}: { + search?: boolean +}) { return ( + {search ? ( +
+ +
+ ) : null}
diff --git a/apps/web/components/playlist-view.tsx b/apps/web/components/playlist-view.tsx index a4a8a42..0630d7a 100644 --- a/apps/web/components/playlist-view.tsx +++ b/apps/web/components/playlist-view.tsx @@ -342,6 +342,24 @@ export function PlaylistView({ playlist }: { playlist: BrowsePlaylistDetail }) { return (
+
+
+ + { + setSearchQuery(event.target.value) + clearSelection() + setActiveTrackId("") + setDragIndex(null) + }} + className="h-9 w-full min-w-0 rounded-full border border-input bg-input/30 pr-3 pl-9 text-sm text-foreground transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50" + /> +
+
@@ -478,24 +496,6 @@ export function PlaylistView({ playlist }: { playlist: BrowsePlaylistDetail }) {
-
-
- - { - setSearchQuery(event.target.value) - clearSelection() - setActiveTrackId("") - setDragIndex(null) - }} - className="h-10 w-full min-w-0 rounded-full border border-input bg-input/30 pr-3 pl-9 text-sm text-foreground transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50" - /> -
-
{filteredSongs.length > 0 ? (