@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.

Tweak the visual style of the ">>" / "<<" depth change indicators slightly

Summary:
Ref T13249.

- When a line has only increased in indent depth, don't red-fill highlight the left side of the diff. Since reading a diff //mostly// involves focusing on the right side, indent depth changes are generally visible enough without this extra hint. The extra hint can become distracting in cases where there is a large block of indent depth changes.
- Move the markers slightly to the left, to align them with the gutter.
- Make them slightly opaque so they're a little less prominent.

Test Plan: See screenshots.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13249

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

+27 -14
+6 -6
resources/celerity/map.php
··· 11 11 'conpherence.pkg.js' => '020aebcf', 12 12 'core.pkg.css' => '34ce1741', 13 13 'core.pkg.js' => '2cda17a4', 14 - 'differential.pkg.css' => 'ab23bd75', 14 + 'differential.pkg.css' => '1755a478', 15 15 'differential.pkg.js' => '67e02996', 16 16 'diffusion.pkg.css' => '42c75c37', 17 17 'diffusion.pkg.js' => '91192d85', ··· 61 61 'rsrc/css/application/dashboard/dashboard.css' => '4267d6c6', 62 62 'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d', 63 63 'rsrc/css/application/differential/add-comment.css' => '7e5900d9', 64 - 'rsrc/css/application/differential/changeset-view.css' => 'd92bed0d', 64 + 'rsrc/css/application/differential/changeset-view.css' => '4193eeff', 65 65 'rsrc/css/application/differential/core.css' => '7300a73e', 66 66 'rsrc/css/application/differential/phui-inline-comment.css' => '48acce5b', 67 67 'rsrc/css/application/differential/revision-comment.css' => '7dbc8d1d', ··· 540 540 'conpherence-thread-manager' => 'aec8e38c', 541 541 'conpherence-transaction-css' => '3a3f5e7e', 542 542 'd3' => 'd67475f5', 543 - 'differential-changeset-view-css' => 'd92bed0d', 543 + 'differential-changeset-view-css' => '4193eeff', 544 544 'differential-core-view-css' => '7300a73e', 545 545 'differential-revision-add-comment-css' => '7e5900d9', 546 546 'differential-revision-comment-css' => '7dbc8d1d', ··· 1220 1220 'javelin-behavior', 1221 1221 'javelin-uri', 1222 1222 ), 1223 + '4193eeff' => array( 1224 + 'phui-inline-comment-view-css', 1225 + ), 1223 1226 '4234f572' => array( 1224 1227 'syntax-default-css', 1225 1228 ), ··· 1996 1999 'javelin-dom', 1997 2000 'javelin-util', 1998 2001 'phabricator-shaped-request', 1999 - ), 2000 - 'd92bed0d' => array( 2001 - 'phui-inline-comment-view-css', 2002 2002 ), 2003 2003 'da15d3dc' => array( 2004 2004 'phui-oi-list-view-css',
+18 -8
src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
··· 162 162 } else if (empty($new_lines[$ii])) { 163 163 $o_class = 'old old-full'; 164 164 } else { 165 - $o_class = 'old'; 165 + if (isset($depth_only[$ii])) { 166 + if ($depth_only[$ii] == '>') { 167 + // When a line has depth-only change, we only highlight the 168 + // left side of the diff if the depth is decreasing. When the 169 + // depth is increasing, the ">>" marker on the right hand side 170 + // of the diff generally provides enough visibility on its own. 171 + 172 + $o_class = ''; 173 + } else { 174 + $o_class = 'old'; 175 + } 176 + } else { 177 + $o_class = 'old'; 178 + } 166 179 } 167 180 $o_classes = $o_class; 168 181 } ··· 200 213 } else if (empty($old_lines[$ii])) { 201 214 $n_class = 'new new-full'; 202 215 } else { 203 - 204 - // NOTE: At least for the moment, I'm intentionally clearing the 205 - // line highlighting only on the right side of the diff when a 206 - // line has only depth changes. When a block depth is decreased, 207 - // this gives us a large color block on the left (to make it easy 208 - // to see the depth change) but a clean diff on the right (to make 209 - // it easy to pick out actual code changes). 216 + // When a line has a depth-only change, never highlight it on 217 + // the right side. The ">>" marker generally provides enough 218 + // visibility on its own for indent depth increases, and the left 219 + // side is still highlighted for indent depth decreases. 210 220 211 221 if (isset($depth_only[$ii])) { 212 222 $n_class = '';
+3
webroot/rsrc/css/application/differential/changeset-view.css
··· 126 126 background-size: 12px 12px; 127 127 background-repeat: no-repeat; 128 128 background-position: left center; 129 + position: relative; 130 + left: -8px; 131 + opacity: 0.5; 129 132 } 130 133 131 134 .differential-diff td span.depth-out {