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

Remove weird "Differential Results Table" view

Summary: Ref T8095. This weird grey table has no remaining callsites and can be removed.

Test Plan: Grepped for symbols.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8095

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

-236
-1
resources/celerity/packages.php
··· 145 145 'differential.pkg.css' => array( 146 146 'differential-core-view-css', 147 147 'differential-changeset-view-css', 148 - 'differential-results-table-css', 149 148 'differential-revision-history-css', 150 149 'differential-revision-list-css', 151 150 'differential-table-of-contents-css',
-2
src/__phutil_library_map__.php
··· 416 416 'DifferentialRepositoryField' => 'applications/differential/customfield/DifferentialRepositoryField.php', 417 417 'DifferentialRepositoryLookup' => 'applications/differential/query/DifferentialRepositoryLookup.php', 418 418 'DifferentialRequiredSignaturesField' => 'applications/differential/customfield/DifferentialRequiredSignaturesField.php', 419 - 'DifferentialResultsTableView' => 'applications/differential/view/DifferentialResultsTableView.php', 420 419 'DifferentialRevertPlanField' => 'applications/differential/customfield/DifferentialRevertPlanField.php', 421 420 'DifferentialReviewedByField' => 'applications/differential/customfield/DifferentialReviewedByField.php', 422 421 'DifferentialReviewer' => 'applications/differential/storage/DifferentialReviewer.php', ··· 3786 3785 'DifferentialRepositoryField' => 'DifferentialCoreCustomField', 3787 3786 'DifferentialRepositoryLookup' => 'Phobject', 3788 3787 'DifferentialRequiredSignaturesField' => 'DifferentialCoreCustomField', 3789 - 'DifferentialResultsTableView' => 'AphrontView', 3790 3788 'DifferentialRevertPlanField' => 'DifferentialStoredCustomField', 3791 3789 'DifferentialReviewedByField' => 'DifferentialCoreCustomField', 3792 3790 'DifferentialReviewer' => 'Phobject',
-115
src/applications/differential/view/DifferentialResultsTableView.php
··· 1 - <?php 2 - 3 - final class DifferentialResultsTableView extends AphrontView { 4 - 5 - private $rows; 6 - private $showMoreString; 7 - 8 - public function setRows(array $rows) { 9 - $this->rows = $rows; 10 - return $this; 11 - } 12 - 13 - public function setShowMoreString($show_more_string) { 14 - $this->showMoreString = $show_more_string; 15 - return $this; 16 - } 17 - 18 - public function render() { 19 - 20 - $rows = array(); 21 - 22 - $any_hidden = false; 23 - foreach ($this->rows as $row) { 24 - 25 - $style = idx($row, 'style'); 26 - switch ($style) { 27 - case 'section': 28 - $cells = phutil_tag( 29 - 'th', 30 - array( 31 - 'colspan' => 2, 32 - ), 33 - idx($row, 'name')); 34 - break; 35 - default: 36 - $name = phutil_tag( 37 - 'th', 38 - array( 39 - ), 40 - idx($row, 'name')); 41 - $value = phutil_tag( 42 - 'td', 43 - array( 44 - ), 45 - idx($row, 'value')); 46 - $cells = array($name, $value); 47 - break; 48 - } 49 - 50 - $show = idx($row, 'show'); 51 - 52 - $rows[] = javelin_tag( 53 - 'tr', 54 - array( 55 - 'style' => $show ? null : 'display: none', 56 - 'sigil' => $show ? null : 'differential-results-row-toggle', 57 - 'class' => 'differential-results-row-'.$style, 58 - ), 59 - $cells); 60 - 61 - if (!$show) { 62 - $any_hidden = true; 63 - } 64 - } 65 - 66 - if ($any_hidden) { 67 - $show_more = javelin_tag( 68 - 'a', 69 - array( 70 - 'href' => '#', 71 - 'mustcapture' => true, 72 - ), 73 - $this->showMoreString); 74 - 75 - $hide_more = javelin_tag( 76 - 'a', 77 - array( 78 - 'href' => '#', 79 - 'mustcapture' => true, 80 - ), 81 - pht('Hide')); 82 - 83 - $rows[] = javelin_tag( 84 - 'tr', 85 - array( 86 - 'class' => 'differential-results-row-show', 87 - 'sigil' => 'differential-results-row-show', 88 - ), 89 - phutil_tag('th', array('colspan' => 2), $show_more)); 90 - 91 - $rows[] = javelin_tag( 92 - 'tr', 93 - array( 94 - 'class' => 'differential-results-row-show', 95 - 'sigil' => 'differential-results-row-hide', 96 - 'style' => 'display: none', 97 - ), 98 - phutil_tag('th', array('colspan' => 2), $hide_more)); 99 - 100 - $this->initBehavior('differential-show-field-details'); 101 - } 102 - 103 - $this->requireResource('differential-results-table-css'); 104 - 105 - return javelin_tag( 106 - 'table', 107 - array( 108 - 'class' => 'differential-results-table', 109 - 'sigil' => 'differential-results-table', 110 - ), 111 - $rows); 112 - } 113 - 114 - 115 - }
-78
webroot/rsrc/css/application/differential/results-table.css
··· 1 - /** 2 - * @provides differential-results-table-css 3 - */ 4 - 5 - table.differential-results-table { 6 - border-collapse: separate; 7 - width: 96%; 8 - font-size: 11px; 9 - } 10 - 11 - .differential-results-table th { 12 - text-align: center; 13 - white-space: nowrap; 14 - vertical-align: middle; 15 - padding: 2px 4px; 16 - width: 50px; 17 - border-right: 1px solid #fff; 18 - background: #f7f7f7; 19 - } 20 - 21 - .device .differential-results-table th { 22 - white-space: normal; 23 - } 24 - 25 - .differential-results-table td { 26 - padding: 0 8px; 27 - margin: 0; 28 - vertical-align: middle; 29 - background: #f7f7f7; 30 - } 31 - 32 - .differential-results-table tr.differential-results-row-star th, 33 - .differential-results-table tr.differential-results-row-star td { 34 - background: {$greybackground}; 35 - } 36 - 37 - .differential-results-table tr.differential-results-row-section th { 38 - padding-top: 4px; 39 - text-align: left; 40 - } 41 - 42 - .differential-results-table tr.differential-results-row-excuse th { 43 - background: #3399ff; 44 - } 45 - 46 - .differential-results-table tr.differential-results-row-excuse td { 47 - padding-top: 8px; 48 - padding-right: 8px; 49 - padding-bottom: 8px; 50 - } 51 - 52 - .differential-results-table tr.differential-results-row-red th { 53 - background: #ff4422; 54 - } 55 - 56 - .differential-results-table tr.differential-results-row-yellow th { 57 - background: #ffdd66; 58 - } 59 - 60 - .differential-results-table tr.differential-results-row-green th { 61 - background: #22dd44; 62 - } 63 - 64 - .differential-results-table tr.differential-results-row-blue th { 65 - background: #88bbff; 66 - } 67 - 68 - .differential-results-table tr.differential-results-row-details td { 69 - color: {$lightgreytext}; 70 - } 71 - 72 - .differential-results-table tr.differential-results-row-show th { 73 - border-top: 1px solid #fff; 74 - border-right: none; 75 - padding: 2px; 76 - color: {$bluetext}; 77 - background: {$greybackground}; 78 - }
-40
webroot/rsrc/js/application/differential/behavior-show-field-details.js
··· 1 - /** 2 - * @provides javelin-behavior-differential-show-field-details 3 - * @requires javelin-behavior 4 - * javelin-stratcom 5 - * javelin-dom 6 - */ 7 - 8 - JX.behavior('differential-show-field-details', function() { 9 - 10 - JX.Stratcom.listen( 11 - 'click', 12 - ['differential-results-row-show', 'tag:a'], 13 - function(e) { 14 - toggle(e, true); 15 - }); 16 - 17 - JX.Stratcom.listen( 18 - 'click', 19 - ['differential-results-row-hide', 'tag:a'], 20 - function(e) { 21 - toggle(e, false); 22 - }); 23 - 24 - function toggle(e, show) { 25 - e.kill(); 26 - 27 - var f = show ? JX.DOM.show : JX.DOM.hide; 28 - var g = show ? JX.DOM.hide : JX.DOM.show; 29 - 30 - var table = e.getNode('differential-results-table'); 31 - var rows = JX.DOM.scry(table, 'tr', 'differential-results-row-toggle'); 32 - for (var ii = 0; ii < rows.length; ii++) { 33 - f(rows[ii]); 34 - } 35 - 36 - g(JX.DOM.find(table, 'tr', 'differential-results-row-show')); 37 - f(JX.DOM.find(table, 'tr', 'differential-results-row-hide')); 38 - } 39 - 40 - });