mirror of
https://github.com/discourse/discourse.git
synced 2025-06-20 16:01:31 +08:00
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:

... 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:
@ -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~}}
|
||||
|
@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user