1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-11 07:11:04 +01:00

Use more consistent diff coloration in unified diffs

Summary:
Ref T13151. See PHI701. Unified diffs are currently missing the logic to apply the "old-full" and "new-full" classes, which results in a too-light coloration for fully added or removed lines.

Make this logic consistent with the two-up renderer so we use the same colors in both.

Test Plan: Viewed diffs and swapped between 1-up and 2-up renderers, now saw the same coloration.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13151

Differential Revision: https://secure.phabricator.com/D19482
This commit is contained in:
epriestley 2018-06-08 07:59:28 -07:00
parent 4e84d4d458
commit f375427177

View file

@ -68,7 +68,11 @@ final class DifferentialChangesetOneUpRenderer
$cells = array();
if ($is_old) {
if ($p['htype']) {
$class = 'left old';
if (empty($p['oline'])) {
$class = 'left old old-full';
} else {
$class = 'left old';
}
$aural = $aural_minus;
} else {
$class = 'left';
@ -106,7 +110,11 @@ final class DifferentialChangesetOneUpRenderer
$cells[] = $no_coverage;
} else {
if ($p['htype']) {
$class = 'right new';
if (empty($p['oline'])) {
$class = 'right new new-full';
} else {
$class = 'right new';
}
$cells[] = phutil_tag('th', array('class' => $class));
$aural = $aural_plus;
} else {