Page MenuHomePhabricator

Modular Transactions for Badges
ClosedPublic

Authored by chad on Feb 23 2017, 7:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 12:59 AM
Unknown Object (File)
Wed, Dec 18, 2:19 PM
Unknown Object (File)
Wed, Dec 18, 2:19 PM
Unknown Object (File)
Wed, Dec 18, 2:19 PM
Unknown Object (File)
Wed, Dec 18, 2:19 PM
Unknown Object (File)
Tue, Dec 17, 8:52 AM
Unknown Object (File)
Mon, Dec 9, 2:00 AM
Unknown Object (File)
Mon, Dec 9, 2:00 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
Branch
badges-modular-transactions (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 15744
Build 20806: Run Core Tests
Build 20805: arc lint + arc unit

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.