Discourse Indented Subcategories

Install this theme component

:information_source: Overview

This simple theme component automatically indents all subcategories in the sidebar - works in desktop, tablet and mobile viewport sizes.

There is one setting to change the indent size - the default is 1em, minimum 0.5em and maximum 3em.

Settings:

Screenshot of example result in sidebar:


:bulb: Notes

This theme component is only intended for single level subcategories. If your forum has sub-subcategories enabled, this component will probably break, or at least not look very good in your sidebar.

This component replaces the now deprecated Indented / Nested Sidebar Categories or Subcategories.


Check out my other Discourse stuff
21 Likes

nice job! It will be wonderful if it can fold or unfold for the parent categories. Is it possible?

1 Like

no - sorry, but i have no plans to add more options to this component.

1 Like

Nice work Lilly - delightfully simple and effective. A marked improvement!!

Also, I love the clear admin notice about it.

2 Likes

It would be useful to have the option to indent on mobile too

I agree - and hadn’t noticed that it doesn’t until you pointed it out just now!

@Lilly, did the old TC indent on mobile?

2 Likes

i refactored this component and it should work for you on mobile now. let me know if there are issues. edited OP.

6 Likes

What was the thought/reason for deprecating a more full featured component (Nested categories) in favor of this one with less control?
Can I keep using the old one even though it’s deprecated or is it going to eventually break?

1 Like

Works great - thanks so much Lilly! I can remove my CSS workaround now :slight_smile:

1 Like

Ahah - it indents fine in portrait, but not in landscape (using an iPad)

works on my ipad :woman_shrugging:

let me guess, it’s doing that two-column sidebar view?

Ahah - sorry, forgot to mention my custom CSS forces it to single column on mobile. It works fine in portrait (indented like desktop) but is a plain-flat list in landscape

this is what i see on my iPad in both landscape and portrait views:

i think firefox view was sometimes weird on tablet with 2-columns. i pushed a fix that should force it to use single column all the time.

1 Like

Ah -it’s working for me now too, sorry! It seems to go “flat” when you rotate the device - but fixes itself if you refresh. Thanks for checking!!

1 Like