Wiki badge and /wiki links in global search results #14

Merged
archvillainette merged 2 commits from feature/wiki-global-search into main 2026-07-03 07:10:47 +00:00
Owner

Theme half of the cross-repo wiki global search work (plugin half: sow-nodebb-plugin-wiki#12).

Search results tagged by the wiki plugin (isWikiArticle + wikiPath) now render with a gold "Wiki" badge and link to /wiki/... instead of /post/...:

  • templates/partials/quick-search-results.tpl — navbar quick-search dropdown
  • templates/partials/search-results.tpl/search page, topics view
  • templates/partials/posts_list_item.tpl/search page, posts view (default). Shared with account/group post lists, where the wiki flags are never set and the conditional no-ops.
  • scss/westgate/_search.scss — badge styling from existing --wg-gold / ledger-border tokens; imported from theme.scss
  • languages/en-GB/westgate.json[[westgate:wiki-badge]] label
  • Spec updated with the resolved approach (template override, not client-side decoration)

Untagged forum results render byte-identical to Harmony stock.

Verification: all three overrides compiled and rendered against benchpressjs with mixed wiki/forum fixture rows (wiki row gets /wiki/... href + exactly one badge; forum rows keep stock /post/... links, RE: prefix and main-post icon preserved). New contract test in tests/wiki-search-badge-contract.test.js; suite passes except the pre-existing global-footer-contract.test.js failure (stale join-the-team link assertion from #10, also failing on main — not touched here).

End-to-end visual check (badge in the live dropdown + /search) still needs the dev stack with plugin PR #12 merged.

🤖 Generated with Claude Code

Theme half of the cross-repo wiki global search work (plugin half: sow-nodebb-plugin-wiki#12). Search results tagged by the wiki plugin (`isWikiArticle` + `wikiPath`) now render with a gold "Wiki" badge and link to `/wiki/...` instead of `/post/...`: - `templates/partials/quick-search-results.tpl` — navbar quick-search dropdown - `templates/partials/search-results.tpl` — `/search` page, topics view - `templates/partials/posts_list_item.tpl` — `/search` page, posts view (default). Shared with account/group post lists, where the wiki flags are never set and the conditional no-ops. - `scss/westgate/_search.scss` — badge styling from existing `--wg-gold` / ledger-border tokens; imported from `theme.scss` - `languages/en-GB/westgate.json` — `[[westgate:wiki-badge]]` label - Spec updated with the resolved approach (template override, not client-side decoration) Untagged forum results render byte-identical to Harmony stock. Verification: all three overrides compiled and rendered against benchpressjs with mixed wiki/forum fixture rows (wiki row gets `/wiki/...` href + exactly one badge; forum rows keep stock `/post/...` links, `RE:` prefix and main-post icon preserved). New contract test in `tests/wiki-search-badge-contract.test.js`; suite passes except the pre-existing `global-footer-contract.test.js` failure (stale `join-the-team` link assertion from #10, also failing on main — not touched here). End-to-end visual check (badge in the live dropdown + /search) still needs the dev stack with plugin PR #12 merged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
archvillainette added 2 commits 2026-07-03 06:59:50 +00:00
Theme-only slice: render wiki-tagged search results with a wiki badge and
link to /wiki, in the quick-search dropdown and /search page. Depends on
the wiki plugin tagging results with isWikiArticle + wikiPath.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Override Harmony's search partials so results tagged by the wiki plugin
(isWikiArticle + wikiPath) show a gold Wiki badge and link to /wiki/...
instead of /post/..., in the quick-search dropdown and both /search views.
Forum results render unchanged; posts_list_item is shared with account and
group pages, where the flags are never set and the conditional no-ops.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
archvillainette scheduled this pull request to auto merge when all checks succeed 2026-07-03 07:07:17 +00:00
xtul approved these changes 2026-07-03 07:10:46 +00:00
archvillainette merged commit 96f83868b1 into main 2026-07-03 07:10:47 +00:00
archvillainette deleted branch feature/wiki-global-search 2026-07-03 07:10:48 +00:00
Sign in to join this conversation.