Template:UI/recent discussions feed

From Miniscope
Jump to: navigation, search

"Recent discussions" feed — cross-forum activity panel for a main page or other landing. Designed to sit alongside Template:UI/recent_activity_feed in the two-column layout from the mockup, but renders fine on its own too.

Scoped to one forum subtree via the root_forum param. The query walks the Has forum.Has parent forum::{{{root_forum}}} chain — every post page whose containing forum has the named root as its parent surfaces here. This mirrors the hub-mode query used by Template:Category/Forum when the page itself is the hub, just externalised so a non-forum landing can drive it.

Why one subtree rather than site-wide +: keeps private workshop forums (which sit in their own Lockdown'd namespaces with parents like Forum:Workshop2026Paris) from leaking onto a public main page. Wikis that genuinely want site-wide activity can pass a dummy "all-forums root" or build a companion template — out of scope here.

Renders, top to bottom:

  • Optional <h2> heading
  • Card-row list of recent posts via
 Template:Category/Forum/post_row_regular — same row template as
 the forum hub-mode feed, so each row carries the sub-forum
 color-chip and the rows visually match what users already see on a
 forum landing. We deliberately do not project
 ?Is announcement=Pinned here, so post_row_regular's
 announcement-suppression #switch falls to default and renders every
 row; announcements appear in this feed just like any other recent
 post (the main-page surface is "what's happening", not a
 prioritised forum landing).
  • Optional "See all discussions →" footer link, typically pointing
 at the root forum page itself.

Cross-namespace dep note: this UI/* template depends on Template:Category/Forum/post_row_regular (and its styles) — an intentional shortcut so the homepage's discussion rows match the forum landing's row layout pixel-for-pixel. The alternative would be duplicating the row HTML under UI/recent_discussions_feed/row, which buys decoupling at the cost of two row templates drifting apart over time. Revisit if the styles need to diverge for a homepage context (e.g. hide the meta line on small viewports).

Params:

  • root_forum — full title of the root forum
 (e.g. Forum:Home). Required; with an empty value the
 chained query matches nothing and the empty-state renders.
  • heading — section heading text (default: "Recent
 discussions"). Empty string suppresses the h2.
  • limit — max rows (default: 6).
  • see_all — page title for the footer link. Defaults to
 the root forum itself.
  • see_all_label — footer link text (default: "See all
 discussions →").