1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Improve color use in "[+++- ]" element for colorblind users

Summary:
Ref T13127. Users with red/green colorblindness may have difficulty using this element in its current incarnation.

We could give it different behavior if the "Accessibility" option is set for red/green colorblind users, but try a one-size-fits-all approach since the red/green aren't wholly clear anwyay.

Test Plan: {F5530050}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13127

Differential Revision: https://secure.phabricator.com/D19385
This commit is contained in:
epriestley 2018-04-19 11:28:24 -07:00
parent 70d67a3908
commit 19403fdb8e
3 changed files with 22 additions and 10 deletions

View file

@ -9,7 +9,7 @@ return array(
'names' => array(
'conpherence.pkg.css' => 'e68cf1fa',
'conpherence.pkg.js' => '15191c65',
'core.pkg.css' => 'c30f6eaa',
'core.pkg.css' => 'cb8ae4dc',
'core.pkg.js' => 'e1f0f7bd',
'differential.pkg.css' => '06dc617c',
'differential.pkg.js' => 'c2ca903a',
@ -131,7 +131,7 @@ return array(
'rsrc/css/phui/object-item/phui-oi-color.css' => 'cd2b9b77',
'rsrc/css/phui/object-item/phui-oi-drag-ui.css' => '08f4ccc3',
'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '9d9685d6',
'rsrc/css/phui/object-item/phui-oi-list-view.css' => 'ae1404ba',
'rsrc/css/phui/object-item/phui-oi-list-view.css' => '7c5c1291',
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea',
'rsrc/css/phui/phui-action-list.css' => '0bcd9a45',
'rsrc/css/phui/phui-action-panel.css' => 'b4798122',
@ -838,7 +838,7 @@ return array(
'phui-oi-color-css' => 'cd2b9b77',
'phui-oi-drag-ui-css' => '08f4ccc3',
'phui-oi-flush-ui-css' => '9d9685d6',
'phui-oi-list-view-css' => 'ae1404ba',
'phui-oi-list-view-css' => '7c5c1291',
'phui-oi-simple-ui-css' => 'a8beebea',
'phui-pager-css' => 'edcbc226',
'phui-pinboard-view-css' => '2495140e',

View file

@ -229,22 +229,30 @@ final class DifferentialRevisionListView extends AphrontView {
$classes = array();
$classes[] = 'differential-revision-size';
$tip = array();
$tip[] = pht('%s Lines', new PhutilNumber($n));
if ($plus_count <= 1) {
$classes[] = 'differential-revision-small';
$tip[] = pht('Smaller Change');
}
if ($plus_count >= 4) {
$classes[] = 'differential-revision-large';
$tip[] = pht('Larger Change');
}
$tip = phutil_implode_html(" \xC2\xB7 ", $tip);
return javelin_tag(
'span',
array(
'class' => implode(' ', $classes),
'sigil' => 'has-tooltip',
'meta' => array(
'tip' => pht('%s Lines', new PhutilNumber($n)),
'tip' => $tip,
'align' => 'E',
'size' => 400,
),
),
$size);

View file

@ -697,22 +697,26 @@ ul.phui-oi-list-view .phui-oi-selectable
.differential-revision-size .phui-icon-view {
margin: 0 1px 0 1px;
font-size: smaller;
color: {$blueborder};
font-size: 7px;
position: relative;
top: -2px;
color: {$lightbluetext};
}
.differential-revision-large {
background: {$sh-redbackground};
background: {$sh-orangebackground};
}
/* NOTE: These are intentionally using nonstandard colors, see T13127. */
.differential-revision-large .phui-icon-view {
color: {$red};
color: #e5ae7e;
}
.differential-revision-small {
background: {$sh-greenbackground};
background: #f2f7ff;
}
.differential-revision-small .phui-icon-view {
color: {$green};
color: #6699ba;
}