DEV: add plugin outlet to desktop & mobile Topic List Item after badges (#31998)

There is no current plugin outlet on the Topic List which allows one to
attach additional UI after the title without messing up the badge
display.

We can’t use `topic-list-after-title` because that will render before
the badge which looks untidy:



![](b29d5add40.png)

... and we can’t use`topic-list-before-category` because that’s not
always rendered when we drill into a Category.

The solution is a new plugin outlet located after the badge is rendered.
This needs to be on both the desktop and mobile flavours.

See discussion here:
https://meta.discourse.org/t/locations-plugin/69742/1144?u=merefield
This commit is contained in:
Robert
2025-03-25 16:45:36 +00:00
committed by GitHub
parent 37e72e9ad7
commit 94ee3554da
2 changed files with 8 additions and 0 deletions

View File

@ -344,6 +344,10 @@ export default class Item extends Component {
class="badge-notification new-topic"
></span></span>
{{~/if~}}
<PluginOutlet
@name="topic-list-after-badges"
@outletArgs={{hash topic=@topic}}
/>
{{~#if this.expandPinned~}}
<TopicExcerpt @topic={{@topic}} />
{{~/if~}}

View File

@ -93,6 +93,10 @@ export default class TopicCell extends Component {
@url={{@topic.lastUnreadUrl}}
/>
{{~/if~}}
<PluginOutlet
@name="topic-list-after-badges"
@outletArgs={{hash topic=@topic}}
/>
</PluginOutlet>
</span>