Page MenuHomePhabricator

Modular Transactions for Badges
ClosedPublic

Authored by chad on Feb 23 2017, 7:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 19, 6:00 PM
Unknown Object (File)
Tue, Mar 19, 6:00 PM
Unknown Object (File)
Tue, Mar 19, 6:00 PM
Unknown Object (File)
Tue, Mar 19, 5:59 PM
Unknown Object (File)
Fri, Mar 1, 3:28 PM
Unknown Object (File)
Feb 21 2024, 6:04 AM
Unknown Object (File)
Feb 21 2024, 5:27 AM
Unknown Object (File)
Feb 20 2024, 6:02 AM
Subscribers
Tokens
"Hungry Hippo" token, awarded by epriestley.

Details

Summary

Ref T12270. This converts Badges to modular transactions for editing and awarding.

Test Plan

Add Badge, edit badge, award and revoke... Still going to test this some more but feel free to comment on anything obviously wrong?

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Nice!

src/applications/badges/xaction/PhabricatorBadgesBadgeFlavorTransaction.php
17–23

I think you can get rid of this completely now since Badges are on EditEngine, should be handled automatically now.

src/applications/badges/xaction/PhabricatorBadgesBadgeIconTransaction.php
17–23

As above, likely obsolete.

src/applications/badges/xaction/PhabricatorBadgesBadgeQualityTransaction.php
17–23

As above, likely obsolete.

32–45

These should maaaaaybe use renderValue(...) to pick up the italic style? ModularTransactions generally uses renderValue() for titles, etc. Not sure if we want to count this sort of text as user-provided text or not.

src/applications/badges/xaction/PhabricatorBadgesBadgeStatusTransaction.php
28

Does this need a feed title?

src/applications/badges/xaction/PhabricatorBadgesBadgeTransactionType.php
7–9

Get rid of this, specific to Calendar.

This revision is now accepted and ready to land.Feb 23 2017, 8:10 PM

A lot of stuff just worked, so I'm going to re-test everything again because... it seemed too easy?

chad marked 4 inline comments as done.
  • per comments
src/applications/badges/xaction/PhabricatorBadgesBadgeQualityTransaction.php
32–45

I couldn't get that to work? The value is a number.

src/applications/badges/xaction/PhabricatorBadgesBadgeQualityTransaction.php
32–45

Oh, sorry, I mean like this? Or did that not work either?

$new = $this->getNewValue(); // Raw number, like 3.
$new = $this->getQualityLabel($new); // Now a string, like "Rare".
$new = $this->renderValue($new); // Now a fancy string, like //Rare//.
This revision was automatically updated to reflect the committed changes.