Skip to content

fix(navigator): render curated Featured cards non-blank (#1941) - #1945

Merged
jung-thomas merged 1 commit into
DEVfrom
worktree-fix-1941-featured-blank
Aug 20, 2026
Merged

jung-thomas merged 1 commit into
DEVfrom
worktree-fix-1941-featured-blank

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Fixes #1941 — Featured Missions cards render blank (no title/description/link) on the Tutorial Navigator page.

Root cause

Commit 0d202e3f changed browse/_partials/card-{mission,group,tutorial}.html to expect a { item, categories } dict and updated the /browse/ callers — but hugo/layouts/tutorial-navigator/list.html kept passing the bare card object. So inside the partial .item was nil and every field (href, title, description, level, time, tag) rendered empty.

Because /build/featured returns [] on both DEV and PROD, featured-rail.js fail-silently keeps the SSR markup — so users saw empty MISSION cards. Verified live on developers.sap.com/tutorial-navigator/ (cards had empty href/title/desc, "0 min.").

Fix

  • Build a $categoriesMap (slug→label) from browse.categories, mirroring browse/list.html.
  • Wrap both partial-call sites (SSR preview grid + Featured rail) in (dict "item" $item "categories" $categoriesMap).

Test

Added a render assertion to test/unit/hugo-homepage-partials.test.ts that builds the navigator page and asserts the Featured rail card shows a non-blank title + description (scoped to the rail section so it can't false-positive on the inlined browse-data JSON). Confirmed red before the fix, green after.

Note (out of scope)

hugo/layouts/partials/homepage/tutorials-teaser.html has the same latent bare-$item bug, but it is not included by any layout (dead partial), so it is left untouched here.

The browse/_partials/card-{mission,group,tutorial}.html partials were
changed in 0d202e3 to expect a { item, categories } dict, and the browse
callers were updated — but tutorial-navigator/list.html kept passing the
bare card object. That left .item nil, so every field (href, title,
description, level, time, tag) rendered blank in the SSR 'Featured' rail.

Because /build/featured returns [] on DEV+PROD, featured-rail.js keeps the
SSR markup, so users saw empty MISSION cards on the Tutorial Navigator page.

Wrap both the SSR preview grid and the Featured rail partial calls in the
{ item, categories } dict (mirroring browse/list.html), and build the
category slug->label map from browse.categories.

Adds a render assertion to hugo-homepage-partials.test.ts that fails on the
blank-card regression (scoped to the rail section to avoid matching the
inlined browse-data JSON).
@jung-thomas
jung-thomas force-pushed the worktree-fix-1941-featured-blank branch from 90a37cb to 8abe6b6 Compare August 20, 2026 14:52
@jung-thomas
jung-thomas merged commit f34fad0 into DEV Aug 20, 2026
4 checks passed
@jung-thomas
jung-thomas deleted the worktree-fix-1941-featured-blank branch August 20, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant