A platform for community discussion. Free, open, simple.
DEV: adds plugin outlets around topic tag lists (#44867)
Steven Chang5bc8afb76977
diff --git a/frontend/discourse/app/components/bookmark-list.gjs b/frontend/discourse/app/components/bookmark-list.gjsindex deeb09a5b68..306fc64776f 100644--- a/frontend/discourse/app/components/bookmark-list.gjs+++ b/frontend/discourse/app/components/bookmark-list.gjs@@ -336,11 +336,20 @@ export default class BookmarkList extends Component {{{#if bookmark.bookmarkableTopicAlike}}<div class="link-bottom-line">{{dCategoryLink bookmark.category}}- {{dDiscourseTags- bookmark- mode="list"- tagsForUser=@tagsForUser- }}+ <PluginOutlet+ @name="bookmark-list-tags-wrapper"+ @outletArgs={{lazyHash+ bookmark=bookmark+ tags=bookmark.visibleListTags+ tagsForUser=@tagsForUser+ }}+ >+ {{dDiscourseTags+ bookmark+ mode="list"+ tagsForUser=@tagsForUser+ }}+ </PluginOutlet></div>{{/if}}{{#ifdiff --git a/frontend/discourse/app/components/header/topic/info.gjs b/frontend/discourse/app/components/header/topic/info.gjsindex 7a910158b18..601f6d544f8 100644--- a/frontend/discourse/app/components/header/topic/info.gjs+++ b/frontend/discourse/app/components/header/topic/info.gjs@@ -178,7 +178,12 @@ export default class Info extends Component {{{/if}}<div class="topic-header-extra">- {{trustHTML this.tags}}+ <PluginOutlet+ @name="header-tags-wrapper"+ @outletArgs={{lazyHash topic=@topicInfo [email protected]}}+ >+ {{trustHTML this.tags}}+ </PluginOutlet>{{#if this.showPM}}<div class="topic-header-participants">{{#each this.participants as |participant|}}diff --git a/frontend/discourse/app/components/reviewable-tags.gjs b/frontend/discourse/app/components/reviewable-tags.gjsindex 7efbbb7296d..c3571957ab5 100644--- a/frontend/discourse/app/components/reviewable-tags.gjs+++ b/frontend/discourse/app/components/reviewable-tags.gjs@@ -1,9 +1,16 @@+import PluginOutlet from "discourse/components/plugin-outlet";+import lazyHash from "discourse/helpers/lazy-hash";import dDiscourseTags from "discourse/ui-kit/helpers/d-discourse-tags";const ReviewableTags = <template>{{#if @tags}}<div class="list-tags">- {{dDiscourseTags @topic tags=@tags}}+ <PluginOutlet+ @name="reviewable-tags-wrapper"+ @outletArgs={{lazyHash topic=@topic tags=@tags}}+ >+ {{dDiscourseTags @topic tags=@tags}}+ </PluginOutlet></div>{{/if}}</template>;diff --git a/frontend/discourse/app/components/search-menu/results/type/topic.gjs b/frontend/discourse/app/components/search-menu/results/type/topic.gjsindex 1cf626341bc..bbb184a6c4d 100644--- a/frontend/discourse/app/components/search-menu/results/type/topic.gjs+++ b/frontend/discourse/app/components/search-menu/results/type/topic.gjs@@ -62,7 +62,12 @@ export default class Results extends Component {link=(if @withTopicUrl true false)}}{{#if this.siteSettings.tagging_enabled}}- {{dDiscourseTags @result.topic tagName="span"}}+ <PluginOutlet+ @name="search-menu-results-topic-tags-wrapper"+ @outletArgs={{lazyHash [email protected] [email protected]}}+ >+ {{dDiscourseTags @result.topic tagName="span"}}+ </PluginOutlet>{{/if}}</span></span>diff --git a/frontend/discourse/app/components/search-result-entry.gjs b/frontend/discourse/app/components/search-result-entry.gjsindex 20ab559015c..2a58d367b72 100644--- a/frontend/discourse/app/components/search-result-entry.gjs+++ b/frontend/discourse/app/components/search-result-entry.gjs@@ -116,7 +116,16 @@ export default class SearchResultEntry extends Component {{{/if}}{{dCategoryLink @post.topic.category hideParent=true}}{{#if @post.topic}}- {{dDiscourseTags @post.topic}}+ <PluginOutlet+ @name="search-result-entry-tags-wrapper"+ @outletArgs={{lazyHash+ post=@post+ }}+ >+ {{dDiscourseTags @post.topic}}+ </PluginOutlet>{{/if}}<span><PluginOutletdiff --git a/frontend/discourse/app/components/topic-category.gjs b/frontend/discourse/app/components/topic-category.gjsindex c3a1e0d3696..b775660469d 100644--- a/frontend/discourse/app/components/topic-category.gjs+++ b/frontend/discourse/app/components/topic-category.gjs@@ -26,7 +26,16 @@ export default class TopicCategory extends Component {<div class="topic-header-extra">{{#if this.siteSettings.tagging_enabled}}<div class="list-tags">- {{dDiscourseTags @topic mode="list" [email protected]}}+ <PluginOutlet+ @name="topic-category-tags-wrapper"+ @outletArgs={{lazyHash+ topic=@topic+ }}+ >+ {{dDiscourseTags @topic mode="list" [email protected]}}+ </PluginOutlet></div>{{/if}}{{#if this.siteSettings.topic_featured_link_enabled}}diff --git a/frontend/discourse/app/components/topic-list/item.gjs b/frontend/discourse/app/components/topic-list/item.gjsindex 1c1747192b5..a591689f0fd 100644--- a/frontend/discourse/app/components/topic-list/item.gjs+++ b/frontend/discourse/app/components/topic-list/item.gjs@@ -457,7 +457,15 @@ export default class Item extends Component {/>{{~! no whitespace ~}}{{/unless}}{{~! no whitespace ~}}- {{dDiscourseTags @topic mode="list"}}+ <PluginOutlet+ @name="topic-list-tags-wrapper"+ @outletArgs={{lazyHash+ topic=@topic+ }}+ >+ {{~dDiscourseTags @topic mode="list"~}}+ </PluginOutlet></span><div class="num activity last">diff --git a/frontend/discourse/app/components/topic-list/item/topic-cell.gjs b/frontend/discourse/app/components/topic-list/item/topic-cell.gjsindex c684b648f5e..dfca2d8f63b 100644--- a/frontend/discourse/app/components/topic-list/item/topic-cell.gjs+++ b/frontend/discourse/app/components/topic-list/item/topic-cell.gjs@@ -112,7 +112,16 @@ export default class TopicCell extends Component {@outletArgs={{lazyHash topic=@topic}}/>- {{dDiscourseTags @topic mode="list" tagsForUser=@tagsForUser}}+ <PluginOutlet+ @name="topic-list-tags-wrapper"+ @outletArgs={{lazyHash+ topic=@topic+ tagsForUser=@tagsForUser+ }}+ >+ {{dDiscourseTags @topic mode="list" tagsForUser=@tagsForUser}}+ </PluginOutlet>{{#if this.participantGroups}}<ParticipantGroups @groups={{this.participantGroups}} />diff --git a/frontend/discourse/app/components/topic-list/latest-topic-list-item.gjs b/frontend/discourse/app/components/topic-list/latest-topic-list-item.gjsindex 43c8fa6c853..883e306ac0f 100644--- a/frontend/discourse/app/components/topic-list/latest-topic-list-item.gjs+++ b/frontend/discourse/app/components/topic-list/latest-topic-list-item.gjs@@ -104,7 +104,12 @@ export default class LatestTopicListItem extends Component {@outletArgs={{lazyHash topic=@topic}}>{{dCategoryLink @topic.category~}}- {{~dDiscourseTags @topic mode="list"}}+ <PluginOutlet+ @name="latest-topic-list-item-tags-wrapper"+ @outletArgs={{lazyHash topic=@topic [email protected]}}+ >+ {{~dDiscourseTags @topic mode="list"~}}+ </PluginOutlet></PluginOutlet></div></div>diff --git a/frontend/discourse/app/components/topic-timeline/container.gjs b/frontend/discourse/app/components/topic-timeline/container.gjsindex 71413dc2f6d..8e4c938ee2f 100644--- a/frontend/discourse/app/components/topic-timeline/container.gjs+++ b/frontend/discourse/app/components/topic-timeline/container.gjs@@ -535,7 +535,15 @@ export default class TopicTimelineScrollArea extends Component {<div class="topic-header-extra">{{#if this.showTags}}<div class="list-tags">- {{dDiscourseTags @model mode="list" [email protected]}}+ <PluginOutlet+ @name="timeline-tags-wrapper"+ @outletArgs={{lazyHash+ topic=@model+ }}+ >+ {{dDiscourseTags @model mode="list" [email protected]}}+ </PluginOutlet></div>{{/if}}{{#if this.siteSettings.topic_featured_link_enabled}}