Render wiki badges in global search results #13

Closed
opened 2026-07-02 09:48:35 +00:00 by archvillainette · 1 comment
Owner

Active spec: docs/superpowers/specs/2026-07-02-wiki-search-result-badge-design.md
Driven by plugin spec: sow-nodebb-plugin-wiki/docs/superpowers/specs/2026-07-02-wiki-global-search-design.md

Scope:

  • Render an inline wiki badge/icon for search rows with isWikiArticle=true.
  • Rewrite those result links to wikiPath.
  • Cover both the full /search page and the quick-search dropdown.
  • Keep forum search results visually and behaviorally unchanged.
  • Add styles under scss/ using existing Westgate theme patterns; no new dependencies.

Planning decision to resolve first:

  • Prefer a small template override if the pinned NodeBB/Harmony partials isolate the result row cleanly.
  • Fall back to public/client.js decoration only if the stock partials are awkward to override safely.

Acceptance:

  • Wiki search hits show a clear theme-consistent Wiki badge/icon.
  • Wiki search hit links point to /wiki/... from wikiPath.
  • Forum hits remain unchanged.
  • Both quick-search dropdown and /search page are covered.

Dependency:

  • End-to-end verification depends on the wiki plugin emitting isWikiArticle and wikiPath.
Active spec: docs/superpowers/specs/2026-07-02-wiki-search-result-badge-design.md Driven by plugin spec: sow-nodebb-plugin-wiki/docs/superpowers/specs/2026-07-02-wiki-global-search-design.md Scope: - Render an inline wiki badge/icon for search rows with isWikiArticle=true. - Rewrite those result links to wikiPath. - Cover both the full /search page and the quick-search dropdown. - Keep forum search results visually and behaviorally unchanged. - Add styles under scss/ using existing Westgate theme patterns; no new dependencies. Planning decision to resolve first: - Prefer a small template override if the pinned NodeBB/Harmony partials isolate the result row cleanly. - Fall back to public/client.js decoration only if the stock partials are awkward to override safely. Acceptance: - Wiki search hits show a clear theme-consistent Wiki badge/icon. - Wiki search hit links point to /wiki/... from wikiPath. - Forum hits remain unchanged. - Both quick-search dropdown and /search page are covered. Dependency: - End-to-end verification depends on the wiki plugin emitting isWikiArticle and wikiPath.
archvillainette added the
Priority
Critical
1
Kind/Enhancement
labels 2026-07-02 09:50:19 +00:00
Author
Owner

Implemented on main. Wiki search rows carry isWikiArticle/wikiPath from the plugin; the theme renders an inline Wiki badge and rewrites the link to wikiPath in all three partials — partials/search-results.tpl, partials/quick-search-results.tpl, partials/posts_list_item.tpl — styled via scss/westgate/_search.scss (.westgate-wiki-badge), with a contract test at tests/wiki-search-badge-contract.test.js. Forum results are unchanged. Needs only a deploy + dbsearch reindex to show live. Closing as done.

Implemented on `main`. Wiki search rows carry `isWikiArticle`/`wikiPath` from the plugin; the theme renders an inline Wiki badge and rewrites the link to `wikiPath` in all three partials — `partials/search-results.tpl`, `partials/quick-search-results.tpl`, `partials/posts_list_item.tpl` — styled via `scss/westgate/_search.scss` (`.westgate-wiki-badge`), with a contract test at `tests/wiki-search-badge-contract.test.js`. Forum results are unchanged. Needs only a deploy + dbsearch reindex to show live. Closing as done.
Sign in to join this conversation.