Discourse Category Headers theme component

I’m also seeing this warning :

deprecated.js:54 Deprecation notice: PluginOutlet arguments should now be passed using @outletArgs=instead of@args= (outlet: category-box-below-each-category) [deprecation id: discourse.plugin-outlet-args]

Is this from the component or discourse core?

1 Like

Thank you. I’ve merged those changes into the master. Has this resolved the issue now?

2 Likes

@Rhidian Sorry, there was an overlook in the previous PR. The .discourse-compatibility file is misplaced. I made a PR to fix it.

Not in this component.

1 Like

Thanks. I’ve merged that change in.

2 Likes

thank you @Rhidian this component is much better than category-banners and should be the new default! :slight_smile:

1 Like

I’ve done this PR to add compatibility with alternative lock icons (from Category Icons):

Totally agree!

2 Likes

Thanks Nathan :+1:. I’ve merged that in. Please test.

3 Likes

All good so far, although in hindsight I should have put the settings the other way around!

Will do a super minor PR for that shortly.

5 Likes

Thanks Nathan. Let me know when that’s done and I’ll merge in. :+1:

2 Likes

Already done!

2 Likes

Updated thanks Nathan :+1:

2 Likes

I know this component is getting a bit old, but I really like it and would love to see a tiny improvement that would also help with some of the original requests as well.

Showing just the first paragraph is fine, but I would love to have a “Read more…” link which is linked to the category description. A very elegant solution to have a lengthy description without cluttering up the category’s page. I can add this link manually, but then it shows on the Categories page which isn’t very clean.

4 Likes

I think that this is a brilliant idea! I’ve often thought that the remainder of the description topic was unnecessarily buried in the UI once it had been unpinned. And before it is unpinned, the first paragraph is total duplication. This is (in my mind) a much better approach.

I can see where the code would need to be inserted - and had a crack at it. However, my skills are simply too meagre for me to work out how to get the topic_id of the category description topic.

@Rhidian - can you help?

Yup, it would be wonderful to have this updated to the current structure. Hey, I’d love it to be made official as it is super helpful.

3 Likes

FYI Nathan, I’ve forked this, and with the help of AI I have the idea working! Since I really don’t know what I’m doing I’m not sure if a PR is appropriate, but I’ll let other decide…

3 Likes

Nice!! You had more luck (or skill) with the AI help than I did.

This whole theme component is a little bit hacky (part of its charm :wink:), so your changes will fit right in. Definitely do a PR I reckon!

It would be nice to have a setting for it though, so as not to force a change on sites who are already using the component and who might not want that.

2 Likes

Thanks Nathan, I used Claude 3.5 Sonnet FYI.

Here goes nothing, my first PR! :sweat_smile:

3 Likes

Thanks David. Impressive!

I’ve merged they in. Please test.

4 Likes

Seems to be working well! :tada:

3 Likes

Looks great - it reveals that I’ve done a lot of very short category descriptions due to the limitation it addresses! Nice work.

4 Likes