A platform for community discussion. Free, open, simple.
DEV: Add missing outlet args to glimmer topic list components (#27838)
Jarek Radosz8fa61410aa7d
diff --git a/app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjs b/app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjsindex aa7ecf772c9..3f9875433b2 100644--- a/app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjs@@ -1,4 +1,5 @@import Component from "@glimmer/component";+import { hash } from "@ember/helper";import { service } from "@ember/service";import { htmlSafe } from "@ember/template";import PluginOutlet from "discourse/components/plugin-outlet";@@ -29,6 +30,7 @@ export default class ActivityColumn extends Component {>{{! no whitespace}}<PluginOutlet@name="topic-list-before-relative-date"+ @outletArgs={{hash topic=@topic}}/>{{~formatDate @topic.bumpedAt format="tiny" noTitle="true"~}}</a>diff --git a/app/assets/javascripts/discourse/app/components/topic-list/posts-count-column.gjs b/app/assets/javascripts/discourse/app/components/topic-list/posts-count-column.gjsindex 70fa158f208..699a072416d 100644--- a/app/assets/javascripts/discourse/app/components/topic-list/posts-count-column.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-list/posts-count-column.gjs@@ -1,4 +1,5 @@import Component from "@glimmer/component";+import { hash } from "@ember/helper";import { service } from "@ember/service";import PluginOutlet from "discourse/components/plugin-outlet";import TopicEntrance from "discourse/components/topic-list/topic-entrance";@@ -59,7 +60,10 @@ export default class PostsCountColumn extends Component {@title={{this.title}}@triggerClass="btn-link posts-map badge-posts {{this.likesHeat}}">- <PluginOutlet @name="topic-list-before-reply-count" />+ <PluginOutlet+ @name="topic-list-before-reply-count"+ @outletArgs={{hash topic=@topic}}+ />{{number @topic.replyCount noTitle="true"}}</TopicEntrance></this.wrapperElement>diff --git a/app/assets/javascripts/discourse/app/components/topic-list/topic-list-item.gjs b/app/assets/javascripts/discourse/app/components/topic-list/topic-list-item.gjsindex 464f6a3a436..d4cdbf8e8d6 100644--- a/app/assets/javascripts/discourse/app/components/topic-list/topic-list-item.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-list/topic-list-item.gjs@@ -284,7 +284,7 @@ export default class TopicListItem extends Component {@outletArgs={{hash topic=@topic}}/>{{#if this.site.desktopView}}- <PluginOutlet @name="topic-list-before-columns" />+ {{! TODO: column DAG "topic-list-before-columns" }}{{#if @bulkSelectEnabled}}<td class="bulk-select topic-list-data">@@ -301,11 +301,17 @@ export default class TopicListItem extends Component {{{/if}}<td class="main-link clearfix topic-list-data" colspan="1">- <PluginOutlet @name="topic-list-before-link" />+ <PluginOutlet+ @name="topic-list-before-link"+ @outletArgs={{hash topic=@topic}}+ /><span class="link-top-line">{{~! no whitespace ~}}- <PluginOutlet @name="topic-list-before-status" />+ <PluginOutlet+ @name="topic-list-before-status"+ @outletArgs={{hash topic=@topic}}+ />{{~! no whitespace ~}}<TopicStatus @topic={{@topic}} />{{~! no whitespace ~}}@@ -319,7 +325,10 @@ export default class TopicListItem extends Component { {{~topicFeaturedLink @topic}}{{~/if~}}- <PluginOutlet @name="topic-list-after-title" />+ <PluginOutlet+ @name="topic-list-after-title"+ @outletArgs={{hash topic=@topic}}+ />{{~! no whitespace ~}}<UnreadIndicator@includeUnreadIndicator={{this.includeUnreadIndicator}}@@ -339,7 +348,10 @@ export default class TopicListItem extends Component {<div class="link-bottom-line">{{#unless @hideCategory}}{{#unless @topic.isPinnedUncategorized}}- <PluginOutlet @name="topic-list-before-category" />+ <PluginOutlet+ @name="topic-list-before-category"+ @outletArgs={{hash topic=@topic}}+ />{{categoryLink @topic.category}}{{/unless}}{{/unless}}@@ -362,10 +374,16 @@ export default class TopicListItem extends Component {<TopicExcerpt @topic={{@topic}} />{{/if}}- <PluginOutlet @name="topic-list-main-link-bottom" />+ <PluginOutlet+ @name="topic-list-main-link-bottom"+ @outletArgs={{hash topic=@topic}}+ /></td>- <PluginOutlet @name="topic-list-after-main-link" />+ <PluginOutlet+ @name="topic-list-after-main-link"+ @outletArgs={{hash topic=@topic}}+ />{{#if @showPosters}}<PostersColumn @posters={{@topic.featuredUsers}} />@@ -396,16 +414,19 @@ export default class TopicListItem extends Component {{{/if}}<td class={{concatClass "num views topic-list-data" @topic.viewsHeat}}>- <PluginOutlet @name="topic-list-before-view-count" />+ <PluginOutlet+ @name="topic-list-before-view-count"+ @outletArgs={{hash topic=@topic}}+ />{{number @topic.views numberKey="views_long"}}</td><ActivityColumn @topic={{@topic}} class="num topic-list-data" />- <PluginOutlet @name="topic-list-after-columns" />+ {{! TODO: column DAG "topic-list-after-columns" }}{{else}}<td class="topic-list-data">- <PluginOutlet @name="topic-list-before-columns" />+ {{! TODO: column DAG "topic-list-before-columns" }}<div class="pull-left">{{#if @bulkSelectEnabled}}@@ -430,11 +451,17 @@ export default class TopicListItem extends Component {<div class="topic-item-metadata right">{{~! no whitespace ~}}- <PluginOutlet @name="topic-list-before-link" />+ <PluginOutlet+ @name="topic-list-before-link"+ @outletArgs={{hash topic=@topic}}+ /><div class="main-link">{{~! no whitespace ~}}- <PluginOutlet @name="topic-list-before-status" />+ <PluginOutlet+ @name="topic-list-before-status"+ @outletArgs={{hash topic=@topic}}+ />{{~! no whitespace ~}}<TopicStatus @topic={{@topic}} />{{~! no whitespace ~}}@@ -448,7 +475,10 @@ export default class TopicListItem extends Component { {{~topicFeaturedLink @topic}}{{~/if~}}- <PluginOutlet @name="topic-list-after-title" />+ <PluginOutlet+ @name="topic-list-after-title"+ @outletArgs={{hash topic=@topic}}+ />{{~#if @topic.unseen~}}<span class="topic-post-badges"> <spanclass="badge-notification new-topic"@@ -457,10 +487,16 @@ export default class TopicListItem extends Component {{{~#if this.expandPinned~}}<TopicExcerpt @topic={{@topic}} />{{~/if~}}- <PluginOutlet @name="topic-list-main-link-bottom" />+ <PluginOutlet+ @name="topic-list-main-link-bottom"+ @outletArgs={{hash topic=@topic}}+ /></div>{{~! no whitespace ~}}- <PluginOutlet @name="topic-list-after-main-link" />+ <PluginOutlet+ @name="topic-list-after-main-link"+ @outletArgs={{hash topic=@topic}}+ /><div class="pull-right"><PostCountOrBadges@@ -472,7 +508,10 @@ export default class TopicListItem extends Component {<div class="topic-item-stats clearfix"><span class="topic-item-stats__category-tags">{{#unless @hideCategory}}- <PluginOutlet @name="topic-list-before-category" />+ <PluginOutlet+ @name="topic-list-before-category"+ @outletArgs={{hash topic=@topic}}+ />{{categoryLink @topic.category}}{{/unless}}