@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Audit - tweak colors

Summary: See github issue 413. This diff adds color to the commit view as the user expects *AND* adds green to both audit and commit views. I looked in the history (D6184) and I can't tell how expected green was, but it feels nice to me given differential color coding.

Test Plan: looked at lists of audits and commits with pretty colors.

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7900

+27 -1
+19
src/applications/audit/constants/PhabricatorAuditCommitStatusConstants.php
··· 31 31 ); 32 32 } 33 33 34 + public static function getStatusColor($code) { 35 + switch ($code) { 36 + case self::CONCERN_RAISED: 37 + $color = 'red'; 38 + break; 39 + case self::NEEDS_AUDIT: 40 + case self::PARTIALLY_AUDITED: 41 + $color = 'orange'; 42 + break; 43 + case self::FULLY_AUDITED: 44 + $color = 'green'; 45 + break; 46 + default: 47 + $color = null; 48 + break; 49 + } 50 + return $color; 51 + } 52 + 34 53 }
+3
src/applications/audit/constants/PhabricatorAuditStatusConstants.php
··· 40 40 case self::AUDIT_REQUIRED: 41 41 $color = 'orange'; 42 42 break; 43 + case self::ACCEPTED: 44 + $color = 'green'; 45 + break; 43 46 default: 44 47 $color = null; 45 48 break;
+5 -1
src/applications/audit/view/PhabricatorAuditCommitListView.php
··· 88 88 $auditors = phutil_implode_html(', ', $auditors); 89 89 } 90 90 $committed = phabricator_datetime($commit->getEpoch(), $this->user); 91 + $audit_status = $commit->getAuditStatus(); 91 92 $commit_status = PhabricatorAuditCommitStatusConstants::getStatusName( 92 - $commit->getAuditStatus()); 93 + $audit_status); 94 + $status_color = PhabricatorAuditCommitStatusConstants::getStatusColor( 95 + $audit_status); 93 96 94 97 $item = id(new PHUIObjectItemView()) 98 + ->setBarColor($status_color) 95 99 ->setObjectName($commit_name) 96 100 ->setHeader($commit_desc) 97 101 ->setHref($commit_link)