New Leaderboard/User Directory Features 🎉

The users directory has gotten a tune-up :hammer_and_wrench: and is now much more aligned with the leaderboard functionality that people have been asking for. Here is a quick overview, and then I’ll break down each change more below:

  • Directory columns can be disabled/enabled and reordered
  • Users can be filtered by group
  • Public user fields can now be enabled as columns in the directory
  • Plugins can add directory columns. Discourse-solved adds solutions count to the directory.

Directory columns can be disabled/enabled and reordered

Click the wrench

And a modal will appear to enable/disable and reorder the columns


Users can be filtered by group

By default, the value of the dropdown is “all groups”, but that can be changed to only show users that are a part of a specific group. This means you can now create leaderboards for specific groups.


Public user fields can now be enabled as columns in the directory

Admin-created user fields can be enabled as columns in the directory, if the user field is shown on user profile or user card. Below, I have 3 user fields and only “Favorite Color” is visible on user card and profile. Now in the “Edit Directory Columns” modal, “Favorite Color” is an option to show in the directory. This means you can now create searchable user directories.


Plugins can add directory columns

The only example of this currently is in the discourse-solved plugin. The plugin now adds a column to the directory which is the number of solutions a user has posted.

In the plugin.rb file, a directory column is added with a query that will be executed to calculate the value for the column. Then the “Edit Directory Columns” modal has the new column default disabled. You can see this here on meta - Discourse Meta

37 Likes

This is awesome news! Leaderboards are such a powerful tool when it comes to motivating members to participate. I also love that this can be used as a searchable members directory. Nice work @markvanlan

12 Likes

You’ve made a lot of people happy, @markvanlan :clap:

10 Likes

I love It. Next release?

I’m confused. Are you asking when it is available? It’s already available if you update to the latest version of Discourse.

4 Likes

Improvement proposal: Make the header of the table fixed, so that it stays visible while scrolling.

If the header disappears while scrolling, it is hard to know which column represents what:

11 Likes

How do I download a spreadsheet which was earlier possible?

2 Likes

@awesomerobot any reason we can’t put it back?

3 Likes