From 1e1a0182cac110ab5a1d07b28577b52c7618cad4 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 10 Jan 2017 14:45:58 -0800 Subject: [PATCH] Add basic diff coloring to CelerityDefaultProcessor Summary: Moves basic colors into the processor. Test Plan: Review a diff in sandbox with and without change. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17173 --- resources/celerity/map.php | 12 ++++++------ .../CelerityDefaultPostprocessor.php | 8 ++++++++ .../application/differential/changeset-view.css | 16 ++++++++-------- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 0c29ea1053..3835e4b2d6 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -12,7 +12,7 @@ return array( 'core.pkg.css' => '9c725fa0', 'core.pkg.js' => 'a2ead3fe', 'darkconsole.pkg.js' => 'e7393ebb', - 'differential.pkg.css' => 'e0517745', + 'differential.pkg.css' => '9535a7e6', 'differential.pkg.js' => '40b18f35', 'diffusion.pkg.css' => '91c5d3a6', 'diffusion.pkg.js' => '84c8f8fd', @@ -59,7 +59,7 @@ return array( 'rsrc/css/application/dashboard/dashboard.css' => 'bc6f2127', 'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a', 'rsrc/css/application/differential/add-comment.css' => 'c47f8c40', - 'rsrc/css/application/differential/changeset-view.css' => 'a5a96310', + 'rsrc/css/application/differential/changeset-view.css' => 'e1621fd5', 'rsrc/css/application/differential/core.css' => '5b7b8ff4', 'rsrc/css/application/differential/phui-inline-comment.css' => '5953c28e', 'rsrc/css/application/differential/revision-comment.css' => '14b8565a', @@ -574,7 +574,7 @@ return array( 'conpherence-thread-manager' => 'c8b5ee6f', 'conpherence-transaction-css' => '85129c68', 'd3' => 'a11a5ff2', - 'differential-changeset-view-css' => 'a5a96310', + 'differential-changeset-view-css' => 'e1621fd5', 'differential-core-view-css' => '5b7b8ff4', 'differential-inline-comment-editor' => '2e3f9738', 'differential-revision-add-comment-css' => 'c47f8c40', @@ -1756,9 +1756,6 @@ return array( 'javelin-uri', 'phabricator-notification', ), - 'a5a96310' => array( - 'phui-inline-comment-view-css', - ), 'a5c57c24' => array( 'javelin-behavior', 'javelin-stratcom', @@ -2094,6 +2091,9 @@ return array( 'javelin-dom', 'phabricator-prefab', ), + 'e1621fd5' => array( + 'phui-inline-comment-view-css', + ), 'e1d25dfb' => array( 'javelin-behavior', 'javelin-stratcom', diff --git a/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php b/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php index 7b2fed7686..be5bfc14c2 100644 --- a/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php +++ b/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php @@ -192,6 +192,14 @@ final class CelerityDefaultPostprocessor 'sh-disabledtext' => '#a6a6a6', 'sh-disabledbackground' => '#f3f3f3', + // Diffs + 'new-background' => '#eaffea', + 'new-bright' => '#a6f3a6', + 'old-background' => '#ffecec', + 'old-bright' => '#f8cbcb', + 'move-background' => '#fdf5d4', + 'copy-background' => '#f1c40f', + // Background color for "most" themes. 'page.background' => '#f8f8fb', 'page.sidenav' => '#f0f0f2', diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css index 60885d2366..1bd7d48635 100644 --- a/webroot/rsrc/css/application/differential/changeset-view.css +++ b/webroot/rsrc/css/application/differential/changeset-view.css @@ -122,19 +122,19 @@ } .differential-diff th.old { - border-right-color: #f8cbcb; + border-right-color: {$old-bright}; } .differential-diff th.new { - border-right-color: #a6f3a6; + border-right-color: {$new-bright}; } .differential-diff td.old { - background: #ffecec; + background: {$old-background}; } .differential-diff td.new { - background: #eaffea; + background: {$new-background}; } .differential-diff td.old-rebase { @@ -148,13 +148,13 @@ .differential-diff td.old span.bright, .differential-diff td.old-full, .prose-diff span.old { - background: #f8cbcb; + background: {$old-bright}; } .differential-diff td.new span.bright, .differential-diff td.new-full, .prose-diff span.new { - background: #a6f3a6; + background: {$new-bright}; } .differential-diff td.copy { @@ -165,12 +165,12 @@ .differential-diff td.new-copy, .differential-diff td.new-copy span.bright { - background: {$lightyellow}; + background: {$copy-background}; } .differential-diff td.new-move, .differential-diff td.new-move span.bright { - background: {$yellow}; + background: {$move-background}; } .differential-diff td.comment {