From 3a756dd06feeb68ed8a847891b5e22aa1bcbdc06 Mon Sep 17 00:00:00 2001 From: kuekhaoyang Date: Wed, 19 Nov 2025 12:22:20 +0800 Subject: [PATCH] feat: Enhance search history dropdown with absolute positioning and empty state styling; improve video player autoplay functionality --- app/globals.css | 16 +- app/page.tsx | 14 +- components/history/WatchHistorySidebar.tsx | 8 +- components/player/DesktopVideoPlayer.tsx | 6 + components/player/MobileVideoPlayer.tsx | 12 +- components/search/SearchForm.tsx | 23 ++- components/search/SearchHistoryDropdown.tsx | 173 +++++++++----------- components/search/VideoGrid.tsx | 81 ++++----- components/ui/LatencyBadge.tsx | 4 +- lib/hooks/useSearchHistory.ts | 9 +- 10 files changed, 187 insertions(+), 159 deletions(-) diff --git a/app/globals.css b/app/globals.css index 38fae51..4196f58 100644 --- a/app/globals.css +++ b/app/globals.css @@ -585,10 +585,10 @@ nav { SEARCH HISTORY DROPDOWN - LIQUID GLASS =========================================== */ -/* Search History Dropdown - Fixed positioning, Liquid Glass effect */ +/* Search History Dropdown - Absolute positioning under search bar, Liquid Glass effect */ .search-history-dropdown { - position: fixed; - z-index: 9999; + /* Removed position: fixed - now using absolute from component */ + max-height: 400px; overflow-y: auto; /* Liquid Glass effect - Core aesthetic */ @@ -749,6 +749,16 @@ nav { background: color-mix(in srgb, var(--accent-color) 50%, transparent); } +/* Empty state styling */ +.search-history-empty { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 2rem 1rem; + text-align: center; +} + /* Accessibility - Focus visible states */ .search-history-item:focus-visible { outline: 2px solid var(--accent-color); diff --git a/app/page.tsx b/app/page.tsx index 24a144f..b03135f 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -105,9 +105,14 @@ function HomePage() { return (
{/* Glass Navbar */} -