用户定义偏好,在类别中主题上方显示子类别列表

tl;dr – Our Discourse user base would like a individual user level toggle to hide the static content when the “Show subcategory list above topics in this category” checkbox at /c/[categoryname]/edit/settings is checked and the Subcategory List Style is “Boxes”.


Initial Context

Our Discourse forum currently has 25 public groups that users can join and many of them join 10+ groups. Based on the way we have our top-level Groups category configured to display subcategories for each group, there’s a lot of static content above where the dynamic Topic list starts.

Some users grow tired of scrolling past all the group subcategory boxes until they get to the dynamic Latest style view for the category, especially on mobile. In other words, they just want to see all the subcategory content mixed together right away and don’t want to see the pretty boxes displayed.

Proposal: User-Level Preference to Hide Subcategory List Style: Boxes

I created this quick Loom video to explain my preferred solution for a new user-level preference to handle the combination of options at /c/[categoryname]/edit/settings > Appearance > Show subcategory list above topics in this category > Subcategory List Style.

In general, I’m all for letting users temporarily or permanently toggle on/off static content on a page.

2 个赞

I agree @codinghorror / @awesomerobot that this is somewhat annoying, we allow users to pick home page, seems reasonable to allow users to remove the boxes.

Even when there are only 2 boxes this can be quite annoying.

3 个赞

employee of the month ups GIF

Should it be a category-level setting tied to the subcategory list stuff (default on)? Lots of themes customize the section and might not want to hide it.

Screen Shot 2021-05-04 at 10.54.34 PM

Pairing that with user preference would be easy and not need any new UI, but that’s hard to discover… and then because it’s a category-level thing… sometimes it doesn’t work? Including that in the setting would help explain it, but kind of :poop: :

Hide subcategory lists on category pages, when allowed by admin

Instead maybe they’re collapsible in an obvious way? we’d have to work out a default collapse/expand UI that works for all the styles… or maybe kind of like a dense layout toggle?

4 个赞

I love this, especially if we store your preference in localstorage for your browser.

I think this is “somewhat” annoying, but not so annoying that I can not be bothered clicking something once on every browser.

Plus then users don’t need to discover another magic option .

4 个赞

It’s a good question and I don’t feel like I need to weigh in on it. You’re seeing things in a more holistic way than me so I’ll probably be good with whatever solution you might implement that meets my core need of making the toggle also available at the individual user level.

Some people want the subcategory boxes. It’s just that a lot of people also don’t. :slight_smile:

关于此问题是否有任何进展/进一步的想法?这对我们的论坛将非常有用,论坛需要为新用户明确显示子类别,但可以隐藏那些熟悉论坛的用户。

我非常喜欢这个设置,但似乎 Discourse 不再支持“允许用户隐藏子类别列表”。我有什么遗漏的吗?

它从未被添加,这只是关于可能将其添加为一项新功能的讨论。

如果能添加此功能,那就太好了。我写了一些代码来实现相同的效果,添加了“折叠”和“展开”按钮,如下所示👇,但这显然不如您的代码美观或简洁。

2 个赞

请分享那段代码!