From 848caadb352e6dfd91490d98768e31941952fb0a Mon Sep 17 00:00:00 2001 From: vickydotbat Date: Sun, 5 Jul 2026 09:11:16 +0000 Subject: [PATCH] Drop the every-main-post book icon from search/profile post lists (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements Fix 4 of the wiki-links-and-search-followup spec (plugin repo). Removes the {{{ if ./isMainPost }}} fa-book fallback branch from templates/partials/posts_list_item.tpl — it put a book icon on every global-search result title. Only the isWikiArticle badge remains. Deliberate blast radius: the partial also serves the seven account/profile post lists, which lose the marker too (restores pre-PR-#14 appearance). search-results.tpl untouched; its badge lights up once the companion plugin PR (fix/wiki-links-search-followup) delivers the flags. Contract test extended to pin the removal; passing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://git.westgate.pw/ShadowsOverWestgate/sow-nodebb-theme/pulls/15 Co-authored-by: vickydotbat Co-committed-by: vickydotbat --- templates/partials/posts_list_item.tpl | 2 +- tests/wiki-search-badge-contract.test.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/partials/posts_list_item.tpl b/templates/partials/posts_list_item.tpl index 9637d78..e8a6fcb 100644 --- a/templates/partials/posts_list_item.tpl +++ b/templates/partials/posts_list_item.tpl @@ -1,7 +1,7 @@

  • - {{{ if ./isWikiArticle }}} [[westgate:wiki-badge]] {{{ else }}}{{{ if ./isMainPost }}} {{{ end }}}{{{ end }}}{./topic.title} + {{{ if ./isWikiArticle }}} [[westgate:wiki-badge]] {{{ end }}}{./topic.title}
    diff --git a/tests/wiki-search-badge-contract.test.js b/tests/wiki-search-badge-contract.test.js index c998292..98b3537 100644 --- a/tests/wiki-search-badge-contract.test.js +++ b/tests/wiki-search-badge-contract.test.js @@ -39,4 +39,10 @@ assertIncludes(read('scss/westgate/_search.scss'), '.westgate-wiki-badge', 'sear const languageKeys = JSON.parse(read('languages/en-GB/westgate.json')); assert(languageKeys['wiki-badge'], 'westgate language file should define the wiki-badge label'); +const postsListItem = read('templates/partials/posts_list_item.tpl'); +assert( + !postsListItem.includes('./isMainPost }}}