I've been thinking a lot about how categories should work over the past few days:
- As a base level, we obviously would have a single level of categories. A discussion can belong to one. This is what's currently implemented on demo.flarum.org.
- Subcategories. Is two levels enough, or should we allow unlimited levels? Good UX for subcategories is hard, especially if using the grid/tile layout that we currently are (which I'm quite fond of)
- Should we have an option to allow a discussion to belong to multiple categories? As an example, on a dev forum, there could be a category for "bugs", and a category for "design" or "ux". Logically a discussion could belong to both of these. It'd be kind of like pre-defined tags, or GitHub's issue tracker labels.
- What about user-defined tagging? Would that be in addition to defined categories? Would that be a separate extension or integrated with the categories extension?
These are hard problems when you consider a variety of use-cases. Obviously anything will be possible by ditching the default Categories extension and writing a custom one. But my thinking is about the default extension, and how to make it simple, intuitive, and adequate for most communities. Instead of looking at the traditional forum structure and trying to adapt it to Flarum, I've tried to think ground-up ("these are some example communities, how could their discussions best be organised").
The Proposal
(Don't mind the horrific design/colors, these are very rough mockups to get the idea across 🙂 I've based my example on the GateWorld Forum categories.)
My proposal is basically to think of everything as a tag. Tags can optionally have a color and can optionally be pinned to the top of the tag list. They can also be nested. In this way, tags can behave like categories.
Here's how it would work in practice...
First, the modal dialog when choosing taxonomy for a new discussion:
[attachment:554f34933c6cd]
There is a list of all top-level tags, some of them are pinned to the top (i.e. categories).
Clicking on one adds it to the text box up the top, and you get a list of nested tags (i.e. sub-categories):
[attachment:554f34a539822]
You can add additional top-level tags if desired:
[attachment:554f34ba26712]
Clicking on a nested tag adds it to the text box, and would show sub-sub-tags if there are any. But you don't have to, selecting a single top-level tag is enough.
[attachment:554f34d56e521]
You can also type in the text box to filter all levels of tags and find the one you're looking for. If enabled and you have permission, you can create a new tag that doesn't already exist.
[attachment:554f34e41438e]
So in summary, we get the best of both worlds (categories and tags) in a very simple way. i.e. the hierarchy/taxonomy has the potential to be extremely powerful and complex (if that's what the community wants), but it doesn't have to be — you can just leave it at a single level of a few pre-defined tags and disallow custom tags, which is exactly the same as demo.flarum.org's current category structure.
Would love to get some feedback on this. If reception is positive, I'll do some mockups of what browsing through discussions would look like.