Page MenuHomePhabricator

Build a Badges page for Profiles

Authored by chad on Feb 24 2017, 8:57 PM.
Attached Files
Unknown Object (File)
Apr 15 2017, 5:29 PM
Unknown Object (File)
Apr 13 2017, 4:16 PM
Unknown Object (File)
Apr 9 2017, 6:46 PM
Unknown Object (File)
Apr 4 2017, 1:34 AM
Unknown Object (File)
Apr 3 2017, 2:11 PM
Unknown Object (File)
Apr 3 2017, 1:06 PM
Unknown Object (File)
Apr 3 2017, 9:40 AM
Unknown Object (File)
Feb 25 2017, 6:29 AM



Ref T12270. Moves badges into their own page and menu item. Capable of displaying hundreds of useful tokens of appreciation and dedication.

Test Plan

Test blank state, mobile, awards badges.

pasted_file (1×2 px, 411 KB)

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable

Event Timeline

good catto

pat pat pat


This was pre-existing, but this is pretty expensive ("Load every badge the user can view and edit") and won't scale particularly well -- maybe just always show the button? I'd guess users can mostly figure it out.

This revision is now accepted and ready to land.Feb 24 2017, 9:07 PM
This revision was automatically updated to reflect the committed changes.

Maybe add a can_award capability?

I left it in for now, but will make a note to follow up with something better

It's at least now on a separate page vs. every profile.

There's no way to make "does any object exist which the user has X permission" on efficient in the general case. If an install has like 5,000 badges that query is going to take like 30 seconds to run no matter what.

You could do "limit 1" to make it less bad but the way "limit 1" works right now will actually make it way way worse.

Yeah. Not a big deal since it'll be a while before any install has enough badges for it to matter.

Not a big deal since it'll be a while before any install has enough badges for it to matter.