about groups: Groups to show on the about page, groups with 0 members are automatically hidden.
show initial members: Number of members to show on initial load for each group, others will be hidden behind a “show more” button.
capitalize names: Capitalize the names of the groups on the about page.
order additional groups: Alphabetically (default), by order of creation, or by order of the about groups setting — does not impact the order of existing admin and moderator groups
show group description: Shows the description of the group under the group’s heading (from the group settings)
It would be possible to add a new setting to use the group full name? It would be nice to show unicode characters in it, but I don’t want to enable the unicode_usernames site setting.
I have a group called group-challenges-cmt which has a Full Name of Challenges Committee but they’re displayed on the /about page as group-challenges-cmt, which doesn’t look very nice
For reference, ticking the Capitalize the names of the groups on the about page option changes it from group-challenges-cmt to Group-Challenges-Cmt - is that right? Or should that checkbox only capitalise the first letter of the group name?
Strangely though, if I add group trust_level_4 to the about page, that shows up in the front end as Trust Level 4
This is great though, thank you so much Kirs @awesomerobot, I can now get rid of the JS code from all those years ago
I don’t know how far you want to go with this theme @awesomerobot, are you taking feature requests?
A way of ordering the groups would be great. I tried adding them in different orders in case it was database-id ordered, but it didn’t change anything so I assume it’s ordering them alphabetically.
Would it be possible to fix the alignment of the group members too?
You’ll the see the admins at the top of the page are three columns wide, yet the additional groups are all two columns wide?
This looks great! Thanks, Kris. I find it to be a really sweet way to let people discover how the site is organized. Many groups on the site groups page don’t mean much and it is a cluttered place, vs the about page which can be a more curated destination.
I do wonder if we want to move this feature to core at some point. Collecting some feedback:
Feature has limitations as a theme component:
config UI not in /admin/config/about but in the theme component
does not respect about page hidden groups to exclude groups that should not be shown on the about page (ref)
styling (eg number of columns) of included groups is different from admin and moderator lists and would need to be updated every time we make a change to the the about page styling
There is some feedback shared already:
display group name not slug
auto capitalization doesn’t look right in some cases
add ability to order groups
I also think it would be helpful to provide a snapshot of more group metadata here, perhaps hidden behind an info button next to the group name?
This requested happened faster then I expected but I should have known.
The reason I didn’t do it initially is because I wanted to avoid an additional request… but I guess it’s unavoidable.
The way the theme component works, is that it matches the corresponding group ID from the theme setting to the site service (this.site.groups) — this contains the ID and the name, but not the full name…
Then the name gets plugged into the /g/${name}/members endpoint… which has the group members, but also does not have the full name…
So to get the full name, I need to make another request to /g/${name}.
The checkbox enables some simple CSS, text-transform: capitalize which capitalizes the first letter of each word.
Though I completely forgot about ::first-letter which I can use instead, so I’ve switched to that… this should be more consistent with our default capitalization now.
If anyone’s wondering, the reason to include this bit about capitalization is because automatic groups, like Trust Level groups, don’t have a full_name field and are always lowercase. What a tangled web we’ve weaved
I removed underscores in the component, but not dashes… this update will do both (but only for name, not full_name)
I’ve added a setting with the options:
alphabetical
order of creation
order of theme setting
Note this concerns the order of the additional groups, and won’t impact admins/moderators — which will always be shown first
Ah yes, there’s some CSS in Discourse that only applies to the moderator and admin groups, I’ve added a fix
Adding the description and link to group page are simple changes, I’ve added those (description disabled by default, but available in a setting).
Group owner is possible, but at the moment I reuse a core component AboutPageUsers — and that would need to be modified to be able to display the owner flair on the user avatar (which I think it probably the best place for it).
This component is growing in complexity fairly quickly, so I’m going to hold off on other requests until someone has a specific need for them.
Sure, I can see that. Trust level names and descriptions can’t be edited, though, so I’d suggest to those people that they create another group and include tl4 folks in it, and give it a nice name, flair and description that suits the community.
I did notice something weird about trust level groups on the about page - not every time I looked at it, but the group memberships were not showing up correctly. Sometimes I as admin am in tl0 even though I am in tl2 nominally. It’s also a bit weird that I show up there at all because I am admin so trust level is irrelevant. But that’s a idiosyncracy with discourse trust levels and how they work.
I set up this for TL3. I’ve created a new group and with Discourse Automation I synced the Regular badge with the New TL3 group.
Yeah I noticed this too. First I hide admins with CSS but that break the layout a little bit so I removed the Regular badge instead as automation sync it for me. I am not sure if it’s will be added automatically later. Hopefully not. Yeah it automatically added again so CSS works now.
I’ve noticed also the group members order by descending in json. It would be nice to randomize it or set to by activity maybe ?order=last_posted_at or ?order=last_seen_at.
I also found that trust level 4 was being displayed as Trust level 4 when ticked in the settings.
My OCD wasn’t happy about this because all the other groups had a capital letter at the start of each word I added another line of css to change Trust level 4 to Trust Level 4.
good question, looks like it’s actually ordered by username in reverse alphabetical order… which doesn’t make much sense, I’m going to add a little update that switches to alphabetical (which is the same as the member listing on the full group pages)