Template:UI/recent activity feed
"What's new" / recent activity feed across a configurable set of categories. Designed to be placed on a main page or any landing that wants a Discourse-style "latest changes" panel.
Renders, top to bottom:
- Optional
<h2>heading - One row per recently-modified page from the curated category set,
via Template:UI/recent_activity_feed/row (page title + description + editor + last-activity in the body)
- Optional "See all <thing> →" footer link
Known gap (tracked): the right-side type-color chip — present in the
initial design — is currently dropped. Projecting
?Categories#-=Category alongside
format=template + Modification-date sort returned zero
rows on the labki-platform SMW stack, even when the bare
format=count on the same disjunction returned positive.
Removed the projection so rows render at all; chip will come back
once we figure out a working per-row category projection (likely via
per-row #show against a fixed candidate list, same idiom
Workshop_itinerary/session-row uses for its type chip).
Category set: passed via the six cat1..cat6
positional params, joined by explicit OR between
clauses in the query. Default covers the
Miniscope-shaped set: Guide, Release, Workshop, Document, FAQ,
Training. To override one (e.g. swap "FAQ" for "Tutorial"):
{{UI/recent_activity_feed | cat5=Tutorial}}.
Why six explicit slots instead of one comma- or pipe-separated list:
empirical. The previous design used
[[Category:{{{categories|Guide||Release||...}}}]]
— SMW disjunction inside a triple-brace default. On the
labki-platform MW stack, a triple-brace expansion whose default
contains || silently drops some matching pages from
the resulting SMW query (specifically: main-namespace pages, when
non-main pages are also in the result set). Hardcoding the same
disjunction as a literal worked; only the triple-brace path was
broken. Refactoring to six single-value triple-braces with no
|| in any default sidesteps the bug entirely. The cost
is a hard cap of six categories — wikis that genuinely need more
fork the template.
Params:
heading— section heading text (default: "What's new").
Set to empty string to suppress.
cat1..cat6— category names (no
Category: prefix). Defaults: Guide, Release, Workshop,
Document, FAQ, Training. To effectively "disable" a slot, override
it to a category name that doesn't exist (the corresponding clause
just matches nothing — harmless).
limit— max rows (default: 6). When main-namespace
filtering is on (default), the visible count may dip below limit by however many non-main pages land in the fetched set. The typical case (most curated content is in main namespace) leaves the count untouched.
include_non_main— set to any truthy value to disable
the default main-namespace filter and surface pages from User: / Template: / Help: / etc. as well. Empty/missing (default) keeps the feed scoped to main namespace, since the typical homepage surface doesn't want User-page edits and Template revisions bubbling up. SMW doesn't expose a clean pre-query main-namespace condition (Namespace:+works for named namespaces only), so the filtering happens row-side via— see Template:UI/recent_activity_feed/row for the implementation.
see_all— page title to link from the "See all →"
footer. If empty, the footer is suppressed.
see_all_label— footer link text (default:
"See all updates →").
Co-design with Template:UI/recent_discussions_feed: the two
templates share visual idiom (card-row list with chip, mid-dot meta
separators) but live in separate styles to avoid coupling. Place them
side-by-side inside a flex container on a main page for the
two-column layout in the mockup; the activity-feed styles.css
provides .wiki-feed-columns as a convenience wrapper.