Badges feedback


(Sebastien Miquerolle) #12
  1. I don’t need other types. Maybe I’ll need “categories” (badge related to post, badge related to popularity, etc…) in addition of the type (Gold/Silver/Bronze). But maybe not for the V0.
  2. In my mind, I see something like that:

I prefer to store the image and the color in the database, because we should be able to export them in the future. Maybe that someone make a bunch of funny badges and want to share them with other users, and it’s more easy to export the color if it’s in the database, rather than it’s in the css stylesheets.


(Sam Saffron) #13

@radq

Since I merged latest badge stuff I would like to reboot priorities, please work through this list from top top bottom.

Where we are at:

We display badges on user cards:

We have a UI to display badges in the system:

We have an admin UI and API to assign/revoke badges:


Priorities

  1. Get rid of TODO from front end UI, that is bad.
  2. Add a user-badge helper for rendering badges (always call it user-badge as badge is overloaded internally)
  3. We need a public /badges route that lists the badges in the system with grant counts
  4. We need the the user badges “clickable”, clicking on a badge will display the list of users that have the badge… eg: /badges/22/king-of-script to display all the users that have king of script. Ordered by grant date descending. url format is /badges/{id}/dont-care-what-this-is-but-redirect-if-not-the-right-slug
  5. When hovering over a badge we should display the badge description
  6. We need to display badges on user page.
  7. If a user has 1 or more silver or gold badges they should be able to pick one of them to be used as their title.
  8. BadgeGranter needs to notify users when they are granted a new badge, standard blue notification with link to badge page will do.

Work through this list in this order. Let me know if you need to change the order.


To give us some meaty data on meta I ran this script: https://github.com/discourse/discourse/blob/master/script/git_badge_grant.rb … A pile of people now have badges, for example:

@velesin has the “great contributor” badge and @lightyear has the “contributor” badge and so on. It’s more of proof of concept thingy, I imagine it will grow into quite an interesting plugin when I am done.


(Sam Saffron) #14

@radq is making awesome progress here, we are mostly done with my list, here is a revised list with new priorities (work in this order):

  1. URGENT get rid of N+1 query from /user_badges

  1. If a user has 1 or more silver or gold badges they should be able to pick one of them to be used as their title.

  2. Badges page should display username and granted at date next to the avatars

  3. Badges page to display 100 badges on first render and load more as needed using infinite scrolling

  4. Notification needs more copy “you were granted […badge name…]”

  5. Bugfix, when I click on my notification it stays in “blue” it should be marked read.

  6. If you have 0 badges it should not display the “Badges” filter.

  7. Implement our first set of badges: “basic user” (bronze) “regular user” (silver) “leader” (gold) “elder” (platinum). These badges are automatically granted when trust level changes.
    a. You retain all badges up to your level when you climb up rungs.
    b. If you move down the rungs your trust level badges disappear.
    c. This must be backfilled in a migration. (notifications can be skipped for backfill)


(Erlend Sogge Heggen) #15

Is showing badges somewhere in user profile (not just hover box) part of the v0 scope?


(Sam Saffron) #16

                        :arrow_down_small:

click on :arrow_forward: @eviltrout’s :arrow_backward: link

                        :arrow_up_small:


(Erlend Sogge Heggen) #17

Cool. But in the case of lightyear’s profile that’s been assigned an identifying badge, shouldn’t that badge show up on his main profile page as well? Some gorgeous mockups for ya:


(Sam Saffron) #18

Probably. But let’s get some badges under our belt first


(Michael Downey) #19

When badges are rendered on a page it’s not clear how they are sorted. It doesn’t seem to be either by color/category, or by name.

From https://talk.openmrs.org/badges:


(Régis Hanol) #20

Also, it keeps loading when a badge hasn’t been awarded yet


(Dan Porter) #21

I feel we’re missing a few tricks here. None of the following is in the priority list, which I’d quite like to see:

  • Select custom images for badges (not everything is level based)
  • Apply badges to groups (so inheritance can work)
  • Configurable view underneath usernames on posts (Possibly “Always, User (default), No” - I’d like badges to replace user titles on our community forum)

I nearly feel badges could be a duplication of effort over groups. I understand the difference clearly, but it would save maintenance hell if groups can inherit badges too.


(Michael Downey) #22

I don’t know, I kind of like that it shows what’s available even if no one’s achieved it yet. It shows what someone can aspire to achieve. YMMV I suppose.


(Jeff Atwood) #23

No. He means the loading indicator shows incorrectly, as in the screenshot.


(Lee_Ars) #24

What’s the current URL to grant and revoke badges? I’ve found /badges and /admin/badges, but I don’t see where to actually stick 'em on people.


(Sam Saffron) #25

See:

/admin/users/USERNAME

there is a button called “Edit Badges” there.


(Lee_Ars) #28

@Sam, I figured that’d be the right place, but I’m not seeing it. This is with an update from just now (showing version 8abf652):


(Sam Saffron) #29

ahhh … do you have the enable badges site setting enabled :wink:


(Lee_Ars) #30

I’m gonna feel really dumb if I don’t.

edit 30 seconds later - …okay, yeah, it’s there now. :blush:


(Sam Saffron) #31

Revised priority list for @radq

  • User Badges page to display 100 badges on first render and load more as needed using infinite scrolling (currently truncated)

  • Bugfix, not displaying description I have typed in:

  • Bugfix, when I click on my notification it stays in “blue” it should be marked read.

  • Feature, we need a quick way to assign badges and see counts of people with badges from admin badges page. (automatic badges should suppress this)

  • Badges page is in shambles: Discourse Meta , have some sort of sane ordering here.

  • When defining badges you should be able to select if they are “single award” badges or “multi award badges” - backend handles them differently.

  • Amend user_badges to add the optional column post_id, a badge can be assigned to a user because of a post.

  • Add 4 badges (better names can come later):

    • Welcome: Single award, bronze, first time a post of yours is liked
    • Nice Post: Multi award, bronze, awarded if you get 10 likes on a post
    • Good Post: Multi award, silver, awarded if you get 25 likes or more (can not be used as title - will require changes to models)
    • Great Post: Multi award, gold, awarded if you get 100 likes or more (can not be used as title)

Done tasks

  1. If a user has 1 or more silver or gold badges (that are marked as titleable) they should be able to pick one of them to be used as their title.

  2. Implement our first set of badges: “basic user” (bronze) “regular user” (silver) “leader” (gold) “elder” (platinum). These badges are automatically granted when trust level changes.
    a. You retain all badges up to your level when you climb up rungs.
    b. If you move down the rungs your trust level badges disappear.
    c. This must be backfilled in a migration. (notifications can be skipped for backfill)


(Sam Saffron) #32

@radq FYI I updated the list above ^^^


(Sam Saffron) #33

@codinghorror the goal of the trust level badges it to teach people about … hmm… trust levels:

This fails quite horribly.

What should the copy be on each badge description? Where should it link to (if it has any embedded links)?