Fix /more silently hiding spillover categories/tracked items with no articles yet

Sections were only rendered when their preview fetch returned at least
one article, so a freshly-marked-spillover tracked item with nothing
published yet looked like it wasn't there at all. Now every spillover
section always renders its name/link, with a "No stories here yet."
placeholder — matching the empty state InfiniteFeed already uses on the
home and category feeds.
This commit is contained in:
Claude
2026-07-26 19:48:25 +00:00
parent fee0814fa3
commit a949a6a684
+23 -14
View File
@@ -12,28 +12,32 @@
<div class="sections">
{#each data.categorySections as section (section.category.id)}
{#if section.articles.length > 0}
<section class="cat-section">
<a class="cat-name" href={`/category/${slugify(section.category.name)}`}>{section.category.name}</a>
<div class="list">
<section class="cat-section">
<a class="cat-name" href={`/category/${slugify(section.category.name)}`}>{section.category.name}</a>
<div class="list">
{#if section.articles.length > 0}
{#each section.articles as article (article.id)}
<ArticleListRow {article} />
{/each}
</div>
</section>
{/if}
{:else}
<div class="empty">No stories here yet.</div>
{/if}
</div>
</section>
{/each}
{#each data.eventSections as section (section.event.id)}
{#if section.articles.length > 0}
<section class="cat-section">
<a class="cat-name" href={`/event/${section.event.id}`}>{section.event.name}</a>
<div class="list">
<section class="cat-section">
<a class="cat-name" href={`/event/${section.event.id}`}>{section.event.name}</a>
<div class="list">
{#if section.articles.length > 0}
{#each section.articles as article (article.id)}
<ArticleListRow {article} />
{/each}
</div>
</section>
{/if}
{:else}
<div class="empty">No stories here yet.</div>
{/if}
</div>
</section>
{/each}
</div>
@@ -69,4 +73,9 @@
.list {
max-width: 720px;
}
.empty {
font-size: 12px;
color: var(--text-muted);
padding: 4px 0;
}
</style>