codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
385 stars 68 forks source link

Who are the users who have this ability? #1360

Open cellio opened 3 months ago

cellio commented 3 months ago

Users can earn abilities (or have them granted by moderators), but this information is not visible in the aggregate:

I'd like us to have a place in the UI where you can, for each ability, see all the users who have it. I'd also like to be able to highlight recent awards somehow -- a "new" badge next to the user or listing them by date earned or something. Higher abilities, in particular, are rare and it would be nice if we could announce them somehow. Think of it as a small bit of public thanks and acknowledgement for users who've contributed a lot.

This is a broad request that needs to have a lot of design details worked out.

cellio commented 1 week ago

I propose to add a "users with this ability" section to the pages describing individual abilities. (Entry point is app/views/abilities/show.html.erb.) This would involve a controller change that I think would be similar to the one done for https://github.com/codidact/qpixel/pull/1409, where we start from a user and get the list of all community profiles for that user. Here, we start from an ability and query users looking for that ability. (Unless someone knows a better way to do it?)

Because that query could get expensive at scale, we should wait for https://github.com/codidact/qpixel/issues/1411 and then do something similar to cache users on abilities.

This doesn't address identifying and somehow highlighting new abilities.