SetUpComponent not being called for topic list tags plugin outlet

If I add a plugin outlet in list item,
ie <plugin name>/assests/javascripts/discourse/templates/list/connectors/topic-list-tags/<unique name>.raw.hbs

Where should I add the js.es6 file for this outlet?

I tried it in following location, but it didnt work

ie <plugin name>/assests/javascripts/discourse/list/connectors/topic-list-tags/<unique-name>.js.es6

export default {
  setupComponent(args, component) {
....
  }
}

The topic-list-tags plugin outlet has been removed in

https://github.com/discourse/discourse/commit/f918951d42234790938da442a768c2bf80f87069

I believe you can add tags to the list via the plugin-api

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/plugin-api.js.es6#L394-L410

3 Likes

Thanks for your reply. I see there is another plugin outlet “topic-list-after-title”.
I added the raw.hbs file in the “topic-list-after-title” folder. I added some test text in the raw.hbs file, and I was able to view the same in the discourse site.

But as mentioned here , if we add corresponding js.es6 file and

export default {
  setupComponent(args, component) {
    component.set('today', new Date());
  }
}

the setUpComponent will be called before rending the hbs connector file.

But in my case, I am able to view the text, but the above function is not called.

raw.hbs file location : my-plugin/javascripts/discourse/templates/connectors/topic-list-after-title/test-topic-list-after-title.raw.hbs

js.es6 file location : my-plugin/javascripts/discourse/connectors/topic-list-after-title/test-topic-list-after-title.js.es6

2 Likes

I have the same issue. Did you find a solution?
EDIT: in case someone searching for a way to add computed properties to this outlets raw hbs: What is the difference between raw.hbs handlerbar files and only .hbs handlerbar files?

2 Likes