Skip to content

fix(#3095): concept/topic/channel page layout — container padding + cap relationship walls - #3106

Merged
jung-thomas merged 2 commits into
DEVfrom
fix-concept-page-layout-3095
Nov 11, 2026
Merged

jung-thomas merged 2 commits into
DEVfrom
fix-concept-page-layout-3095

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Fixes #3095.

Problem

Concept detail pages (and, with the same root cause, /topics/*, /channels/*, and the /channels/ index) render flush against the left browser edge — content has no outer padding, making it hard to read. CAP serves these bodies into the shell's bare <main> with no shared container, so each body's root class must supply its own width/padding — four of them never did.

Separately, concept hub pages dump the entire relationship list: sap-btp-fundamentals renders 235 "Concepts that build on this" tiles with no cap — the likely source of the reporter's "looks not like it is 100% ready" remark.

Fix

  1. Container padding (CSS). One grouped base rule in sap-fundamental.src.css (the git-tracked source — the minified .css is a gitignored build output) gives .concept-page, .topic-detail, .channel-detail, .channels-page the site-standard max-width:1280px; margin:0 auto; padding:1.5rem 2rem 3rem (matching .group-body/.mission-body), plus the matching mobile @media padding:1rem override for sibling parity.
  2. Cap relationship walls (EJS). A new renderCappedGrid helper caps the four KG-relationship sections (teaches / requires / requiredBy / relatedTo) at 24 visible tiles; overflow moves into a no-JS <details> collapse ("Show all N"). Corpus sampling confirmed only requiredBy balloons; external/phase-4 sections (naturally small) are left uncapped.

⚠️ Two-step activation

  • CSS fix (all four flush-left pages): activates on deploy — CSS is served separately, no body re-publish needed.
  • Relationship cap: changes rendered body bytes → needs a concepts re-publish (rebuild-content.yml) after deploy to reach served HANA BLOBs.

Tests

  • test/concept-page-container.test.js — source-string guard for the grouped rule (desktop + mobile) and that the index classes aren't folded in.
  • test/concept-detail-cap.test.js — N-boundary (24/25/235), escaping in the collapsed half, phase-4 untouched.
  • Regression: 63/63 across the existing concept render/publish unit files.

Post-deploy verification (to confirm on DEV)

curl /concepts/sap-btp-fundamentals/, /concepts/cap-golden-path-best-practices/, a /topics/<slug>/, /channels/, and a /channels/<slug>/: confirm container padding on all, and that the hub page shows 24 tiles + a "Show all 235" <details>.

Design: docs/superpowers/specs/2026-11-11-concept-page-layout-design.md · Plan: docs/superpowers/plans/2026-11-11-concept-page-layout.md

@jung-thomas
jung-thomas merged commit c991ee6 into DEV Nov 11, 2026
5 checks passed
@jung-thomas
jung-thomas deleted the fix-concept-page-layout-3095 branch November 11, 2026 19:21
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