Template:UI/publications library

From Miniscope
Jump to: navigation, search

Curated Publications library page. Drop

Publications

Peer-reviewed articles, preprints, and other scholarly works from the community.

173
Publications
126
Distinct journals

into a content page (e.g.

the wiki's Publications page) to render a searchable, filterable view of every page in Category:Publication.

Renders, top to bottom:

  • Header — h1 title + lead paragraph + a stat strip showing
 total publication count and distinct journal count.
  • Filtered publications list — an SRF format=filtered
 ask that pairs the Template:UI/publications_library/entry row
 partial with client-side filter controls for Publication year,
 Publication type, Paper type, Keyword, and Project. The filter
 sidebar renders next to the list and updates the visible rows live
 (no page reload, no Special:SearchByProperty round-trip).
 Keyword (Has keyword, Text, multi-valued) and Project
 (Has project, Page-typed, multi-valued) are surfaced
 as sidebar facets via +filter=value alongside the
 other tag-like facets. SRF builds the chip list from the distinct
 values seen across the loaded result set, so the controlling knob
 for facet coverage is the limit parameter — a value
 outside the loaded window won't appear as a chip. Both printouts
 sit at the end of the printout list so existing positional args
 in Template:UI/publications_library/entry don't shift; the
 row partial currently ignores them (sidebar-only surfacing).

Why format=filtered instead of chips + Special:SearchByProperty

The earlier cut of this template surfaced facets as a chip strip linking to Special:SearchByProperty — a deliberately no-JavaScript choice that kept it working when SRF wasn't installed, at the cost of bouncing the user off the page on every filter click. With SRF available on the deployment we now target, the filtered list gives a single-page faceted browse without that round-trip, so the chip strip was removed to avoid duplicating the same affordance in two UIs.

If a future deployment ships without SRF (or wants explicit no-JS fallback), re-add the chip strip by composing format=list + Special:SearchByProperty as the previous version did — the Template:UI/publications_library/facet_chip partial used by that version stays in the repo for that reuse.

Why the filtered-list entry partial takes positional args

SRF's filtered-list view, when list view named args=yes is set, prefixes every param name with a literal ? (see '?' . $printrequest->getLabel() in SRF's ListView.php). A template trying to read sees nothing, because the param is actually called ?title. Two ways out: use the awkward syntax in the row template, or drop list view named args=yes and use positional {{{1}}}..{{{N}}}. We do the latter — SRF guarantees the positional order matches the declared printout order (no shuffling of filtered columns to the front), so positional is robust here.

The printout aliases (=Year, =Type, =Paper type) are still set because SRF uses them as the filter sidebar labels. Pretty labels for filters; positional args for rendering.

Parameters (all optional)

  • heading — page heading (default: "Publications").
 Empty string suppresses the <h1>.
  • lead — short intro paragraph below the heading
 (default: "Peer-reviewed articles, preprints, and other scholarly
 works from the community.").
  • limit — how many publications to load into the
 filtered list (default: 200). Set higher than the earlier
 format=template list because filtering happens client-side over the
 loaded result set: too low a limit hides matching publications
 from the filter UI. Set lower on very large libraries where the
 payload size of one page is the binding constraint.

Cross-template dependencies

 filtered list.
 partial to render the author byline.
  • Template:UI/kpi_card — used for the stat strip.
  • Semantic Result Formats with the filtered format enabled
 ($srfgFormats includes filtered). The
 filtered-format JS/CSS resources must be loaded; without them the
 list will render but the filter sidebar will be inert.