Knowledge Base Theme Component

Thanks for the feedback @tobiaseigen! I have some other work on my plate this week, but I’ll be sure to dig into a few of these items next week.

7 Likes

Another item - this theme component makes no sense alongside the popular tags theme component, and for some reason the exclude category setting for that theme component does not seem to work for me despite multiple browser refreshes. I don’t know if you can accommodate this issue in this theme component… so we can still use the popular tags in other views and not show them here.

I’m not too proud to expose how I am using discourse as my personal knowledge base - in the screenshot below you can see how the tags appear on both sides, even with the howto category set to be excluded in the popular tags theme component.

2 Likes

First of all, you should be proud. That’s some expert Discourse use there! Discourse is perfect for that kind of stuff! :smiley:

I’ll take a look with the other items next week sometime.

5 Likes

Thanks, Justin!

I just installed this on the global legal empowerment network forum. We have a kb category, and sub-categories within kb. Each sub-category has its own individual group access permissions.

It’s pretty cool to see that enabling this theme component in the kb category and subcategories works! In fact it works very well. :rocket:

Two additional things I noticed:

  • the tags menu does not appear to work correctly in the kb category. Items appearing in the list of topics from subcategory clearly have tags but the tags menu is empty, because there are no topics in the kb category.
  • it would be very helpful to see a sub-categories list on the menu. I don’t know if this is technically feasible. If so, perhaps it could be listed directly above the tags menu?
4 Likes

This is exciting. Can someone please create a post with a link to a theme with KB installed, showing exactly what KB offers versus just regular categories and topics?

3 Likes

You can see it in action on our theme creator site: Discourse Theme Creator

5 Likes

This has been fixed in this commit:


@TowerBR did you end up figuring out what was wrong by chance? If not, send me a PM and maybe we can take a look.

3 Likes

This was a component naming conflict which I’ve resolved.

I wasn’t able to reproduce this with the steps. Try updating and let me know if you still have this behavior.

This is expected for now as in the theme version we’re just appending the KB UI to the existing topic list.

I think this is a fair suggestion and I’ve removed both the link and the hash.

This is eventually going to be in the advanced version that’s a plugin.

The popular tags hid properly for me when I added an exception.

I’m not quite following exactly what the issue is here. Does the kb category have subcategories, but no actual topics in the kb parent category?

If that’s the case, that’s semi-out of the scope of the theme component - we really just wanted to make a particular category filterable. Same with the subcategory filter. Some of these items will be possible in the advanced release.

5 Likes

Unfortunately no, the behavior persists. The KB button seems to do nothing. I’ll send you a PM.

With a little help from @justindirose, now everything is working.

I had not enabled tagging_enabled and show_filter_by_tag on the instance I use to test.

Thanks!

2 Likes

Cool! Lots of great stuff here. Thanks for your hard work on getting this theme component working so well. You mention an advanced version that is a plugin - Is there a roadmap somewhere for all this so I can set my expectations and give feedback? We also have Knowledge Base Plugin by @angus which has some overlapping functionality and it will be good to know which horse I should be betting on. I like aspects of both.

I will do some testing and get back to you.

No unfortunately not. But I can tell you the plugin I’m working on is in a much different vein – think the theme component on steroids. I think both the plugin and @angus’ knowledge base plugin will have helpful use cases.

5 Likes

I’ve made a neat change – the kb categories setting now autopopulates with categories. This was available in our theme API the whole time, but I didn’t know about it! @tshenry cued me in.

One caveat – if you’ve set this up already, you’ll need to add your categories again once you update.

7 Likes

Nice! That works well… you will get fewer support requests now. :slight_smile:

A niggle, but I noticed the kb categories setting searches for names of categories, but not the short name (slug).

Ah yes - you won’t have to worry about the slug. The theme component handles that now. I may have forgotten to change some text though…

Edit: yeah I did. Committed a change to fix that.

2 Likes

I’m enjoying this theme component alot! Thanks again for creating it. I am really looking forward to the plugin because this is such a valuable bit of functionality that will get my team using discourse more. I can’t be positive, but I think as long as wiki topics look like forum posts people are intimidated and less likely to edit to improve it as a shared resource.

A few things I am grappling with:

  1. tags menu shows up on one of my sites, but not on another. Have been unable to pinpoint the conflict. Likely an unofficial plugin. Any suggestions where to look?
  2. there is no + NEW TOPIC button at the top of kb category view as there is for Latest. It would be helpful to have one to add a new wiki topic in the category. Right now you have to click across to Latest to start a topic in the category.
  3. not a big problem but feels buggy - replicable on both of my sites and at theme creator:
    • go to kb view
    • select tag to filter by it
    • switch to TOP on top menu
    • switch back to KB on top menu
    • tag filter is still in place
  4. on the same site where tags menu doesn’t show up, I have another weird problem I can’t replicate on my other site or on theme creator. When I go to a kb category via the categories pulldown, I am taken to Latest even though it should be defaulting to kb. Selecting kb on the menu has no effect… but when I hard refresh in the web browser I am taken to kb.
4 Likes

Thanks, Justin. That’s a super useful component - it makes KB categories much more organized.
I added it to a fresh installation yesterday, but have two issues:

  1. Tags don’t show in the sidebar
  2. When I select the category KB view doesn’t show by default (although I’ve checked Selected categories automatically show KB view by default)

I disabled all other components and have both tagging_enabled and show_filter_by_tag enabled, but still have those issues.

Are you seeing any errors in the browser console? And also did you refresh after enabling those two settings?

1 Like

Do you mean refresh the page - sure I did?

I don’t see any errors, just these alerts:

Is this on a public forum? I have some suspicions but it would be best if there was a way to have a look.

EDIT: For sure number 2 is caused by our recent category routing changes. I’m working on a fix but there are complexities I need to navigate around yet.

Number 1 I can’t get to reproduce. More than likely it’s because you’re seeing topics from subcategories in the list. Since those topics aren’t in the category you have selected, the tags will not show in the sidebar.