Closed Bug 910890 Opened 11 years ago Closed 11 years ago

add badges list to user profile

Categories

(support.mozilla.org :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2013Q3

People

(Reporter: willkg, Assigned: rrosario)

References

Details

(Whiteboard: u=contributor c=badges p=1 s=2013.18)

Bug #896137 adds badge infrastructure to Kitsune.

Users will likely want to know what badges they've been awarded and also display those badges on their profile page.

This bug covers:

1. figuring out what the requirements related to this are
2. implementing them


Things I was just thinking about when writing up this bug:

1. is there a compelling use case for users to want to disable display of awards on their profile?

2. is there a compelling use case for users to want to show only specific badges in their profile?

3. how does display scale to tens of awards? do we show them all in one big list? paginate? show the first 5 and tell the viewer to guess the rest?

4. do we want to pull the badge display from badges.mozilla.org instead? this will show other badges the user has acquired through non-SUMO work.
Blocks: 897057
Priority: -- → P2
Target Milestone: --- → 2013Q3
Blocking out 2pts for this.
Whiteboard: u=contributor c=badges p= s=2013.backlog → u=contributor c=badges p=2 s=2013.18
Assignee: nobody → rrosario
In a pull request:
https://github.com/mozilla/kitsune/pull/1608

This was pretty easy to do with the helper provided by django-badger and being inspired what badges.m.o did. I just added some minimal styles. Adjusting to 1pt.
Whiteboard: u=contributor c=badges p=2 s=2013.18 → u=contributor c=badges p=1 s=2013.18
Ricky: Can you add a screenshot of what it looks like to this bug?
(In reply to Will Kahn-Greene [:willkg] from comment #3)
> Ricky: Can you add a screenshot of what it looks like to this bug?

mobile: http://cl.ly/image/3r0E2t0y0p1C
desktop: http://cl.ly/image/0p3S2b3O0P2N

Clicking on the badge takes you to the award page. There are also alt/title tags that show the badge title.
(In reply to Will Kahn-Greene [:willkg] from comment #0)
> Things I was just thinking about when writing up this bug:
> 
> 1. is there a compelling use case for users to want to disable display of
> awards on their profile?
Out of scope for this bug. I can't think of a reason but we'll see how the community reacts.

> 2. is there a compelling use case for users to want to show only specific
> badges in their profile?

Out of scope for this bug. I can't think of a reason but we'll see how the community reacts.

> 3. how does display scale to tens of awards? do we show them all in one big
> list? paginate? show the first 5 and tell the viewer to guess the rest?

We might need to adjust if/when users end up having 20 badges. I think it will take some time to get there. Then we can make them smaller or whatever.

> 4. do we want to pull the badge display from badges.mozilla.org instead?
> this will show other badges the user has acquired through non-SUMO work.

Nope. We are just showing SUMO badges on SUMO. We aren't an Open Badges Displayer.
One thing I hadn't given any thought to is how to order badges in a profile. Does it order by Award id? Or alphabetically by Badge title? Or something else?

Is there a way to order badges by how much work was required? So at the end of the list are unimportant easy-to-get badges like, "I said hi to Ricky 10 times on IRC!" and at the beginning of the list are the harder ones, "I rewrote Kitsune in Go!"

Just wondering out loud.
I think (In reply to Will Kahn-Greene [:willkg] from comment #6)
> Does it order by Award id? Or alphabetically by Badge title? Or something
> else?

Awards are ordered by `ordering = ['-modified', '-created']`, so basically newest first. I think that is the best we can do without creating a separate badge ordering on our end. Is it good enough? We'll find out I guess.
(In reply to Ricky Rosario [:rrosario, :r1cky] from comment #7)
> I think (In reply to Will Kahn-Greene [:willkg] from comment #6)
> > Does it order by Award id? Or alphabetically by Badge title? Or something
> > else?
> 
> Awards are ordered by `ordering = ['-modified', '-created']`, so basically
> newest first. I think that is the best we can do without creating a separate
> badge ordering on our end. Is it good enough? We'll find out I guess.

+1 to a ordering by modified. thanks! yes we'll find out by doing!
Oh, looks like badges can be tagged. So you could tag them as "gold badge", "silver badge", "bronze badge" (yeah, like stack overflow) and order by that first, then by newest. That would be an option that wouldn't require adding new features to django-badger or ugly hacks on our end.

Anyway, tagging badges might be something we want to look at once we have lots of badges.
Yeah, we should be fine now. Let's see how many badges we are awarding and if we have a lot we can order them by their tagged status.
Forgot to mention: Desktop and mobile look really good, thanks!
Landed on master:
https://github.com/mozilla/kitsune/commit/80eb393588dae3e17c78f21d9c7a5e7820ae9d72

Some ideas that came up during review:
* For users without any badges viewing their own profile, should we show something like "You have no badges. Want to earn one? Check out the document here!". We would need a KB document or similar describing the badges and criteria.
* Should we show the badge title below the image? Or will the images be descriptive enough? We are showing the badge title on hover for now.
Deployed to prod. I haz a badge:
https://support.mozilla.org/en-US/user/179845
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.