From 9708f68e585aad713a7d7aed869fcc5026c85e37 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 31 May 2015 08:37:18 -0700 Subject: [PATCH] Increase CSS specificity on Inline Comment Summary Summary: Fixes T8354. Adds a class to each `th` and `td` for specificity. Test Plan: Write a large table as an inline comment, see it wraps property on smaller screens. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8354 Differential Revision: https://secure.phabricator.com/D13076 --- resources/celerity/map.php | 6 +++--- .../diff/view/PhabricatorInlineSummaryView.php | 11 ++++++++--- .../css/application/diff/inline-comment-summary.css | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index ef1f97f1c7..89e31085c5 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -10,7 +10,7 @@ return array( 'core.pkg.css' => 'e2460e8f', 'core.pkg.js' => '3bbe23c6', 'darkconsole.pkg.js' => 'e7393ebb', - 'differential.pkg.css' => '30602b8c', + 'differential.pkg.css' => '02273347', 'differential.pkg.js' => 'ebef29b1', 'diffusion.pkg.css' => '591664fa', 'diffusion.pkg.js' => '0115b37c', @@ -56,7 +56,7 @@ return array( 'rsrc/css/application/contentsource/content-source-view.css' => '4b8b05d4', 'rsrc/css/application/countdown/timer.css' => '86b7b0a0', 'rsrc/css/application/dashboard/dashboard.css' => '17937d22', - 'rsrc/css/application/diff/inline-comment-summary.css' => 'eb5f8e8c', + 'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a', 'rsrc/css/application/differential/add-comment.css' => 'c47f8c40', 'rsrc/css/application/differential/changeset-view.css' => 'e19cfd6e', 'rsrc/css/application/differential/core.css' => '7ac3cabc', @@ -530,7 +530,7 @@ return array( 'herald-rule-editor' => '271ffdd7', 'herald-test-css' => '778b008e', 'homepage-panel-css' => 'e34bf140', - 'inline-comment-summary-css' => 'eb5f8e8c', + 'inline-comment-summary-css' => '51efda3a', 'javelin-aphlict' => '5359e785', 'javelin-behavior' => '61cbc29a', 'javelin-behavior-aphlict-dropdown' => '995ad707', diff --git a/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php b/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php index 0d39eb62c6..41071a69dd 100644 --- a/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php +++ b/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php @@ -36,6 +36,7 @@ final class PhabricatorInlineSummaryView extends AphrontView { 'th', array( 'colspan' => 3, + 'class' => 'inline-comment-summary-table-header', ), array( $icon, @@ -87,14 +88,18 @@ final class PhabricatorInlineSummaryView extends AphrontView { 'tr', array(), array( - phutil_tag('td', array('class' => 'inline-line-number'), $lines), + phutil_tag('td', + array('class' => 'inline-line-number inline-table-dolumn'), + $lines), ($has_where - ? phutil_tag('td', array('class' => 'inline-which-diff'), $where) + ? phutil_tag('td', + array('class' => 'inline-which-diff inline-table-dolumn'), + $where) : null), phutil_tag( 'td', array( - 'class' => 'inline-summary-content', + 'class' => 'inline-summary-content inline-table-dolumn', 'colspan' => $colspan, ), phutil_tag_div('phabricator-remarkup', $item['content'])), diff --git a/webroot/rsrc/css/application/diff/inline-comment-summary.css b/webroot/rsrc/css/application/diff/inline-comment-summary.css index 3b50147240..a40a49b15e 100644 --- a/webroot/rsrc/css/application/diff/inline-comment-summary.css +++ b/webroot/rsrc/css/application/diff/inline-comment-summary.css @@ -13,7 +13,7 @@ margin-top: -16px; } -.phabricator-inline-summary-table th { +.phabricator-inline-summary-table .inline-comment-summary-table-header { font-weight: bold; padding: 16px 1px 8px; background: #fff; @@ -21,7 +21,7 @@ border-bottom: 1px solid {$thinblueborder}; } -.phabricator-inline-summary-table td { +.phabricator-inline-summary-table .inline-table-dolumn { padding: 4px 8px; white-space: nowrap; color: {$darkbluetext};