A platform for community discussion. Free, open, simple.
DEV: Add a `context` arg to after-topic-status outlet (#30940)
Jarek Radosz474bfb575718
diff --git a/app/assets/javascripts/discourse/app/components/header/topic/info.gjs b/app/assets/javascripts/discourse/app/components/header/topic/info.gjsindex cb7a60a0aa9..c44845d0919 100644--- a/app/assets/javascripts/discourse/app/components/header/topic/info.gjs+++ b/app/assets/javascripts/discourse/app/components/header/topic/info.gjs@@ -108,6 +108,7 @@ export default class Info extends Component {<TopicStatus@topic={{@topicInfo}}@disableActions={{@disableActions}}+ @context="header"/><adiff --git a/app/assets/javascripts/discourse/app/components/search-menu/results/type/topic.hbs b/app/assets/javascripts/discourse/app/components/search-menu/results/type/topic.hbsindex cb7a4336dc6..f5c9e681cdd 100644--- a/app/assets/javascripts/discourse/app/components/search-menu/results/type/topic.hbs+++ b/app/assets/javascripts/discourse/app/components/search-menu/results/type/topic.hbs@@ -1,6 +1,10 @@<span class="topic"><span class="first-line">- <TopicStatus @topic={{@result.topic}} @disableActions={{true}} />+ <TopicStatus+ @topic={{@result.topic}}+ @disableActions={{true}}+ @context="topic-view-title"+ /><span class="topic-title" data-topic-id={{@result.topic.id}}>{{#if(anddiff --git a/app/assets/javascripts/discourse/app/components/topic-list/featured-topic.gjs b/app/assets/javascripts/discourse/app/components/topic-list/featured-topic.gjsindex d11fce1be2d..2977809a17a 100644--- a/app/assets/javascripts/discourse/app/components/topic-list/featured-topic.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-list/featured-topic.gjs@@ -17,7 +17,7 @@ const onTimestampClick = function (event) {const FeaturedTopic = <template><div data-topic-id={{@topic.id}} class="featured-topic --glimmer">- <TopicStatus @topic={{@topic}} />+ <TopicStatus @topic={{@topic}} @context="topic-list" /><a href={{@topic.lastUnreadUrl}} class="title">{{htmlSafe@topic.fancyTitlediff --git a/app/assets/javascripts/discourse/app/components/topic-list/item.gjs b/app/assets/javascripts/discourse/app/components/topic-list/item.gjsindex eb86153b83f..52113e435b9 100644--- a/app/assets/javascripts/discourse/app/components/topic-list/item.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-list/item.gjs@@ -283,7 +283,7 @@ export default class Item extends Component {@outletArgs={{hash topic=@topic}}/>{{~! no whitespace ~}}- <TopicStatus @topic={{@topic}} />+ <TopicStatus @topic={{@topic}} @context="topic-list" />{{~! no whitespace ~}}<TopicLink{{on "focus" this.onTitleFocus}}diff --git a/app/assets/javascripts/discourse/app/components/topic-list/item/topic-cell.gjs b/app/assets/javascripts/discourse/app/components/topic-list/item/topic-cell.gjsindex 6d32ec4172e..c1c66ae91b3 100644--- a/app/assets/javascripts/discourse/app/components/topic-list/item/topic-cell.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-list/item/topic-cell.gjs@@ -67,7 +67,7 @@ export default class TopicCell extends Component {@outletArgs={{hash topic=@topic tagsForUser=@tagsForUser}}>{{~! no whitespace ~}}- <TopicStatus @topic={{@topic}} />+ <TopicStatus @topic={{@topic}} @context="topic-list" />{{~! no whitespace ~}}<TopicLink{{on "focus" this.onTitleFocus}}diff --git a/app/assets/javascripts/discourse/app/components/topic-list/latest-topic-list-item.gjs b/app/assets/javascripts/discourse/app/components/topic-list/latest-topic-list-item.gjsindex a519ae90e18..fa45c301f3e 100644--- a/app/assets/javascripts/discourse/app/components/topic-list/latest-topic-list-item.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-list/latest-topic-list-item.gjs@@ -62,7 +62,7 @@ export default class LatestTopicListItem extends Component {<div class="main-link"><div class="top-row">- <TopicStatus @topic={{@topic}} />+ <TopicStatus @topic={{@topic}} @context="topic-list" />{{topicLink @topic}}{{~#if @topic.featured_link}}diff --git a/app/assets/javascripts/discourse/app/components/topic-status.gjs b/app/assets/javascripts/discourse/app/components/topic-status.gjsindex ff7623aceae..2869aa5f749 100644--- a/app/assets/javascripts/discourse/app/components/topic-status.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-status.gjs@@ -112,7 +112,7 @@ export default class TopicStatus extends Component {{{~#if this.site.useGlimmerTopicList~}}<PluginOutlet@name="after-topic-status"- @outletArgs={{hash topic=@topic}}+ @outletArgs={{hash topic=@topic context=@context}}/>{{~else~}}{{~#each TopicStatusIcons.entries as |entry|~}}