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

Provide "diff-1up" and "diff-2up" classes and tweak some styles

Summary: Ref T2009. Remove forced min-width of 780px in 1-up mode, and tweak a few other things to look better.

Test Plan: Looks better on mobile.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T2009

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

+41 -9
+3 -3
resources/celerity/map.php
··· 10 10 'core.pkg.css' => '1a530a25', 11 11 'core.pkg.js' => 'a77025a1', 12 12 'darkconsole.pkg.js' => '8ab24e01', 13 - 'differential.pkg.css' => '4c3242f8', 13 + 'differential.pkg.css' => 'd8866ed8', 14 14 'differential.pkg.js' => '7b5a4aa4', 15 15 'diffusion.pkg.css' => '591664fa', 16 16 'diffusion.pkg.js' => 'bfc0737b', ··· 55 55 'rsrc/css/application/dashboard/dashboard.css' => '17937d22', 56 56 'rsrc/css/application/diff/inline-comment-summary.css' => 'eb5f8e8c', 57 57 'rsrc/css/application/differential/add-comment.css' => 'c478bcaa', 58 - 'rsrc/css/application/differential/changeset-view.css' => 'a7781046', 58 + 'rsrc/css/application/differential/changeset-view.css' => 'b600950c', 59 59 'rsrc/css/application/differential/core.css' => '7ac3cabc', 60 60 'rsrc/css/application/differential/results-table.css' => '181aa9d9', 61 61 'rsrc/css/application/differential/revision-comment.css' => '48186045', ··· 519 519 'conpherence-notification-css' => '04a6e10a', 520 520 'conpherence-update-css' => '1099a660', 521 521 'conpherence-widget-pane-css' => '3d575438', 522 - 'differential-changeset-view-css' => 'a7781046', 522 + 'differential-changeset-view-css' => 'b600950c', 523 523 'differential-core-view-css' => '7ac3cabc', 524 524 'differential-inline-comment-editor' => 'f2441746', 525 525 'differential-results-table-css' => '181aa9d9',
+9 -1
src/applications/differential/render/DifferentialChangesetHTMLRenderer.php
··· 3 3 abstract class DifferentialChangesetHTMLRenderer 4 4 extends DifferentialChangesetRenderer { 5 5 6 + abstract protected function getRendererTableClass(); 7 + 6 8 protected function renderChangeTypeHeader($force) { 7 9 $changeset = $this->getChangeset(); 8 10 ··· 392 394 return null; 393 395 } 394 396 397 + $classes = array(); 398 + $classes[] = 'differential-diff'; 399 + $classes[] = 'remarkup-code'; 400 + $classes[] = 'PhabricatorMonospaced'; 401 + $classes[] = $this->getRendererTableClass(); 402 + 395 403 return javelin_tag( 396 404 'table', 397 405 array( 398 - 'class' => 'differential-diff remarkup-code PhabricatorMonospaced', 406 + 'class' => implode(' ', $classes), 399 407 'sigil' => 'differential-diff', 400 408 ), 401 409 array(
+4
src/applications/differential/render/DifferentialChangesetOneUpRenderer.php
··· 7 7 return true; 8 8 } 9 9 10 + protected function getRendererTableClass() { 11 + return 'diff-1up'; 12 + } 13 + 10 14 protected function renderColgroup() { 11 15 return phutil_tag('colgroup', array(), array( 12 16 phutil_tag('col', array('class' => 'num')),
+4
src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
··· 7 7 return false; 8 8 } 9 9 10 + protected function getRendererTableClass() { 11 + return 'diff-2up'; 12 + } 13 + 10 14 protected function renderColgroup() { 11 15 return phutil_tag('colgroup', array(), array( 12 16 phutil_tag('col', array('class' => 'num')),
+21 -5
webroot/rsrc/css/application/differential/changeset-view.css
··· 17 17 .differential-diff { 18 18 background: #fff; 19 19 width: 100%; 20 - min-width: 780px; 21 20 border-top: 1px solid {$lightblueborder}; 22 21 border-bottom: 1px solid {$lightblueborder}; 23 22 table-layout: fixed; 23 + } 24 + 25 + .differential-diff.diff-2up { 26 + min-width: 780px; 24 27 } 25 28 26 29 .differential-diff col.num { 27 30 width: 45px; 28 31 } 29 32 30 - .differential-diff col.left, 31 - .differential-diff col.right { 33 + .device .differential-diff.diff-1up col.num { 34 + width: 32px; 35 + } 36 + 37 + .differential-diff.diff-2up col.left, 38 + .differential-diff.diff-2up col.right { 32 39 width: 49.25%; 33 40 } 34 41 ··· 46 53 word-wrap: break-word; 47 54 padding: 0 8px 1px; 48 55 line-height: 16px; 56 + } 57 + 58 + .device .differential-diff td { 59 + padding: 0 4px 1px; 49 60 } 50 61 51 62 .differential-diff td .zwsp { ··· 163 174 background: #f3f6ff; 164 175 } 165 176 166 - 167 - 168 177 .differential-diff td.show-more, 169 178 .differential-diff th.show-context-line, 170 179 .differential-diff td.show-context, ··· 173 182 padding: 12px 0; 174 183 border-top: 1px solid {$thinblueborder}; 175 184 border-bottom: 1px solid {$thinblueborder}; 185 + } 186 + 187 + .device .differential-diff td.show-more, 188 + .device .differential-diff th.show-context-line, 189 + .device .differential-diff td.show-context, 190 + .device .differential-diff td.differential-shield { 191 + padding: 6px 0; 176 192 } 177 193 178 194 .differential-diff td.show-more,