feat(web): /discover scrolls only the results, not the chrome
Restructures the page as a full-height flex column so the persistent chrome (DiscoverTabs, search input, facet tabs, header) stays anchored at the top and only the result grid scrolls. Same treatment for the empty-state SuggestionFeed. Main retains overflow-y-auto for other pages, but with h-full + flex-col + min-h-0 on the inner scroll region this page contains its own overflow and main's scroll never triggers — search field + facet tabs remain visible while you browse results. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -115,9 +115,16 @@
|
||||
];
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Page layout: a full-height flex column so the persistent chrome
|
||||
(DiscoverTabs, search input, facet tabs) stays anchored at the top
|
||||
while only the result grid scrolls. Main has overflow-y-auto, but
|
||||
with h-full + flex-col + min-h-0 on the scroll region, this page
|
||||
contains its own overflow and main's scroll never triggers.
|
||||
-->
|
||||
<div class="flex h-full flex-col gap-4">
|
||||
<DiscoverTabs />
|
||||
|
||||
<div class="space-y-6 pt-6">
|
||||
<input
|
||||
type="search"
|
||||
aria-label="Search Lidarr"
|
||||
@@ -127,7 +134,9 @@
|
||||
/>
|
||||
|
||||
{#if debouncedQ === ''}
|
||||
<div class="min-h-0 flex-1 overflow-y-auto pb-4">
|
||||
<SuggestionFeed />
|
||||
</div>
|
||||
{:else}
|
||||
<header class="space-y-1">
|
||||
<h2 class="font-display text-2xl font-medium text-text-primary">
|
||||
@@ -157,6 +166,7 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="min-h-0 flex-1 overflow-y-auto pb-4">
|
||||
{#if query.isError}
|
||||
<ApiErrorBanner error={query.error} onRetry={query.refetch} />
|
||||
{:else if query.isPending}
|
||||
@@ -177,6 +187,7 @@
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user