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

Diviner CSS tweaks

Summary: Update Diviner table layouts, make it purty.

Test Plan: test many diviner pages

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

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

+142 -72
+47 -47
src/__celerity_resource_map__.php
··· 1149 1149 ), 1150 1150 'diviner-shared-css' => 1151 1151 array( 1152 - 'uri' => '/res/c4527a99/rsrc/css/diviner/diviner-shared.css', 1152 + 'uri' => '/res/582ff299/rsrc/css/diviner/diviner-shared.css', 1153 1153 'type' => 'css', 1154 1154 'requires' => 1155 1155 array( ··· 3182 3182 ), 3183 3183 'phabricator-header-view-css' => 3184 3184 array( 3185 - 'uri' => '/res/822a9fc1/rsrc/css/layout/phabricator-header-view.css', 3185 + 'uri' => '/res/016b9d83/rsrc/css/layout/phabricator-header-view.css', 3186 3186 'type' => 'css', 3187 3187 'requires' => 3188 3188 array( ··· 3385 3385 ), 3386 3386 'phabricator-property-list-view-css' => 3387 3387 array( 3388 - 'uri' => '/res/34213162/rsrc/css/layout/phabricator-property-list-view.css', 3388 + 'uri' => '/res/145d1f9a/rsrc/css/layout/phabricator-property-list-view.css', 3389 3389 'type' => 'css', 3390 3390 'requires' => 3391 3391 array( ··· 3774 3774 ), 3775 3775 'phui-document-view-css' => 3776 3776 array( 3777 - 'uri' => '/res/0c895688/rsrc/css/phui/phui-document.css', 3777 + 'uri' => '/res/dd1ef24b/rsrc/css/phui/phui-document.css', 3778 3778 'type' => 'css', 3779 3779 'requires' => 3780 3780 array( ··· 4171 4171 ), array( 4172 4172 'packages' => 4173 4173 array( 4174 - 'd773a346' => 4174 + '5e2ee206' => 4175 4175 array( 4176 4176 'name' => 'core.pkg.css', 4177 4177 'symbols' => ··· 4218 4218 39 => 'phabricator-property-list-view-css', 4219 4219 40 => 'phabricator-tag-view-css', 4220 4220 ), 4221 - 'uri' => '/res/pkg/d773a346/core.pkg.css', 4221 + 'uri' => '/res/pkg/5e2ee206/core.pkg.css', 4222 4222 'type' => 'css', 4223 4223 ), 4224 4224 '8977e356' => ··· 4409 4409 ), 4410 4410 'reverse' => 4411 4411 array( 4412 - 'aphront-dialog-view-css' => 'd773a346', 4413 - 'aphront-error-view-css' => 'd773a346', 4414 - 'aphront-list-filter-view-css' => 'd773a346', 4415 - 'aphront-pager-view-css' => 'd773a346', 4416 - 'aphront-panel-view-css' => 'd773a346', 4417 - 'aphront-table-view-css' => 'd773a346', 4418 - 'aphront-tokenizer-control-css' => 'd773a346', 4419 - 'aphront-tooltip-css' => 'd773a346', 4420 - 'aphront-typeahead-control-css' => 'd773a346', 4412 + 'aphront-dialog-view-css' => '5e2ee206', 4413 + 'aphront-error-view-css' => '5e2ee206', 4414 + 'aphront-list-filter-view-css' => '5e2ee206', 4415 + 'aphront-pager-view-css' => '5e2ee206', 4416 + 'aphront-panel-view-css' => '5e2ee206', 4417 + 'aphront-table-view-css' => '5e2ee206', 4418 + 'aphront-tokenizer-control-css' => '5e2ee206', 4419 + 'aphront-tooltip-css' => '5e2ee206', 4420 + 'aphront-typeahead-control-css' => '5e2ee206', 4421 4421 'differential-changeset-view-css' => '44bfe40c', 4422 4422 'differential-core-view-css' => '44bfe40c', 4423 4423 'differential-inline-comment-editor' => 'd07a3bc2', ··· 4431 4431 'differential-table-of-contents-css' => '44bfe40c', 4432 4432 'diffusion-commit-view-css' => 'c8ce2d88', 4433 4433 'diffusion-icons-css' => 'c8ce2d88', 4434 - 'global-drag-and-drop-css' => 'd773a346', 4434 + 'global-drag-and-drop-css' => '5e2ee206', 4435 4435 'inline-comment-summary-css' => '44bfe40c', 4436 4436 'javelin-aphlict' => '8977e356', 4437 4437 'javelin-behavior' => '2dbbb7d1', ··· 4504 4504 'javelin-util' => '2dbbb7d1', 4505 4505 'javelin-vector' => '2dbbb7d1', 4506 4506 'javelin-workflow' => '2dbbb7d1', 4507 - 'lightbox-attachment-css' => 'd773a346', 4507 + 'lightbox-attachment-css' => '5e2ee206', 4508 4508 'maniphest-task-summary-css' => '0a9e494f', 4509 4509 'maniphest-transaction-detail-css' => '0a9e494f', 4510 - 'phabricator-action-list-view-css' => 'd773a346', 4511 - 'phabricator-application-launch-view-css' => 'd773a346', 4510 + 'phabricator-action-list-view-css' => '5e2ee206', 4511 + 'phabricator-application-launch-view-css' => '5e2ee206', 4512 4512 'phabricator-busy' => '8977e356', 4513 4513 'phabricator-content-source-view-css' => '44bfe40c', 4514 - 'phabricator-core-css' => 'd773a346', 4515 - 'phabricator-crumbs-view-css' => 'd773a346', 4514 + 'phabricator-core-css' => '5e2ee206', 4515 + 'phabricator-crumbs-view-css' => '5e2ee206', 4516 4516 'phabricator-drag-and-drop-file-upload' => 'd07a3bc2', 4517 4517 'phabricator-dropdown-menu' => '8977e356', 4518 4518 'phabricator-file-upload' => '8977e356', 4519 - 'phabricator-filetree-view-css' => 'd773a346', 4520 - 'phabricator-flag-css' => 'd773a346', 4521 - 'phabricator-header-view-css' => 'd773a346', 4519 + 'phabricator-filetree-view-css' => '5e2ee206', 4520 + 'phabricator-flag-css' => '5e2ee206', 4521 + 'phabricator-header-view-css' => '5e2ee206', 4522 4522 'phabricator-hovercard' => '8977e356', 4523 - 'phabricator-jump-nav' => 'd773a346', 4523 + 'phabricator-jump-nav' => '5e2ee206', 4524 4524 'phabricator-keyboard-shortcut' => '8977e356', 4525 4525 'phabricator-keyboard-shortcut-manager' => '8977e356', 4526 - 'phabricator-main-menu-view' => 'd773a346', 4526 + 'phabricator-main-menu-view' => '5e2ee206', 4527 4527 'phabricator-menu-item' => '8977e356', 4528 - 'phabricator-nav-view-css' => 'd773a346', 4528 + 'phabricator-nav-view-css' => '5e2ee206', 4529 4529 'phabricator-notification' => '8977e356', 4530 - 'phabricator-notification-css' => 'd773a346', 4531 - 'phabricator-notification-menu-css' => 'd773a346', 4532 - 'phabricator-object-item-list-view-css' => 'd773a346', 4530 + 'phabricator-notification-css' => '5e2ee206', 4531 + 'phabricator-notification-menu-css' => '5e2ee206', 4532 + 'phabricator-object-item-list-view-css' => '5e2ee206', 4533 4533 'phabricator-object-selector-css' => '44bfe40c', 4534 4534 'phabricator-phtize' => '8977e356', 4535 4535 'phabricator-prefab' => '8977e356', 4536 4536 'phabricator-project-tag-css' => '0a9e494f', 4537 - 'phabricator-property-list-view-css' => 'd773a346', 4538 - 'phabricator-remarkup-css' => 'd773a346', 4537 + 'phabricator-property-list-view-css' => '5e2ee206', 4538 + 'phabricator-remarkup-css' => '5e2ee206', 4539 4539 'phabricator-shaped-request' => 'd07a3bc2', 4540 - 'phabricator-side-menu-view-css' => 'd773a346', 4541 - 'phabricator-standard-page-view' => 'd773a346', 4542 - 'phabricator-tag-view-css' => 'd773a346', 4540 + 'phabricator-side-menu-view-css' => '5e2ee206', 4541 + 'phabricator-standard-page-view' => '5e2ee206', 4542 + 'phabricator-tag-view-css' => '5e2ee206', 4543 4543 'phabricator-textareautils' => '8977e356', 4544 4544 'phabricator-tooltip' => '8977e356', 4545 - 'phabricator-transaction-view-css' => 'd773a346', 4546 - 'phabricator-zindex-css' => 'd773a346', 4547 - 'phui-button-css' => 'd773a346', 4548 - 'phui-form-css' => 'd773a346', 4549 - 'phui-form-view-css' => 'd773a346', 4550 - 'phui-icon-view-css' => 'd773a346', 4551 - 'phui-spacing-css' => 'd773a346', 4552 - 'sprite-apps-large-css' => 'd773a346', 4553 - 'sprite-gradient-css' => 'd773a346', 4554 - 'sprite-icons-css' => 'd773a346', 4555 - 'sprite-menu-css' => 'd773a346', 4556 - 'syntax-highlighting-css' => 'd773a346', 4545 + 'phabricator-transaction-view-css' => '5e2ee206', 4546 + 'phabricator-zindex-css' => '5e2ee206', 4547 + 'phui-button-css' => '5e2ee206', 4548 + 'phui-form-css' => '5e2ee206', 4549 + 'phui-form-view-css' => '5e2ee206', 4550 + 'phui-icon-view-css' => '5e2ee206', 4551 + 'phui-spacing-css' => '5e2ee206', 4552 + 'sprite-apps-large-css' => '5e2ee206', 4553 + 'sprite-gradient-css' => '5e2ee206', 4554 + 'sprite-icons-css' => '5e2ee206', 4555 + 'sprite-menu-css' => '5e2ee206', 4556 + 'syntax-highlighting-css' => '5e2ee206', 4557 4557 ), 4558 4558 ));
+4 -6
src/applications/diviner/controller/DivinerAtomController.php
··· 490 490 } 491 491 } 492 492 493 - if ($parameters !== null) { 494 - $out[] = id(new PhabricatorHeaderView()) 495 - ->setHeader(pht('Parameters')); 493 + if (nonempty($parameters)) { 496 494 $out[] = id(new DivinerParameterTableView()) 495 + ->setHeader(pht('Parameters')) 497 496 ->setParameters($parameters); 498 497 } 499 498 ··· 509 508 } 510 509 } 511 510 512 - if ($return !== null) { 513 - $out[] = id(new PhabricatorHeaderView()) 514 - ->setHeader(pht('Return')); 511 + if (nonempty($return)) { 515 512 $out[] = id(new DivinerReturnTableView()) 513 + ->setHeader(pht('Return')) 516 514 ->setReturn($collected_return); 517 515 } 518 516
+22 -3
src/applications/diviner/view/DivinerParameterTableView.php
··· 3 3 final class DivinerParameterTableView extends AphrontTagView { 4 4 5 5 private $parameters; 6 + private $header; 6 7 7 8 public function setParameters(array $parameters) { 8 9 $this->parameters = $parameters; 9 10 return $this; 10 11 } 11 12 13 + public function setHeader($text) { 14 + $this->header = $text; 15 + return $this; 16 + } 17 + 12 18 public function getTagName() { 13 - return 'table'; 19 + return 'div'; 14 20 } 15 21 16 22 public function getTagAttributes() { 17 23 return array( 18 - 'class' => 'diviner-parameter-table-view', 24 + 'class' => 'diviner-table-view', 19 25 ); 20 26 } 21 27 ··· 58 64 $rows[] = phutil_tag('tr', array(), $cells); 59 65 } 60 66 61 - return $rows; 67 + $table = phutil_tag( 68 + 'table', 69 + array( 70 + 'class' => 'diviner-parameter-table-view'), 71 + $rows); 72 + 73 + $header = phutil_tag( 74 + 'span', 75 + array( 76 + 'class' => 'diviner-table-header' 77 + ), 78 + $this->header); 79 + 80 + return array($header, $table); 62 81 } 63 82 64 83 }
+27 -3
src/applications/diviner/view/DivinerReturnTableView.php
··· 3 3 final class DivinerReturnTableView extends AphrontTagView { 4 4 5 5 private $return; 6 + private $header; 6 7 7 8 public function setReturn(array $return) { 8 9 $this->return = $return; 9 10 return $this; 10 11 } 11 12 13 + public function setHeader($text) { 14 + $this->header = $text; 15 + return $this; 16 + } 17 + 12 18 public function getTagName() { 13 - return 'table'; 19 + return 'div'; 14 20 } 15 21 16 22 public function getTagAttributes() { 17 23 return array( 18 - 'class' => 'diviner-return-table-view', 24 + 'class' => 'diviner-table-view', 19 25 ); 20 26 } 21 27 ··· 47 53 ), 48 54 $docs); 49 55 50 - return phutil_tag('tr', array(), $cells); 56 + $rows = phutil_tag( 57 + 'tr', 58 + array(), 59 + $cells); 60 + 61 + $table = phutil_tag( 62 + 'table', 63 + array( 64 + 'class' => 'diviner-return-table-view'), 65 + $rows); 66 + 67 + $header = phutil_tag( 68 + 'span', 69 + array( 70 + 'class' => 'diviner-table-header' 71 + ), 72 + $this->header); 73 + 74 + return array($header, $table); 51 75 } 52 76 53 77 }
+28 -8
webroot/rsrc/css/diviner/diviner-shared.css
··· 7 7 font-size: 13px; 8 8 } 9 9 10 + .diviner-table-view { 11 + margin: 0 16px 24px; 12 + } 13 + 14 + .device-phone .diviner-table-view { 15 + margin: 0 8px 16px; 16 + } 17 + 18 + .diviner-table-header { 19 + padding: 4px 16px; 20 + background-color: {$greybackground}; 21 + border-left: 1px solid {$lightblueborder}; 22 + border-right: 1px solid {$lightblueborder}; 23 + border-top: 1px solid {$lightblueborder}; 24 + display: inline-block; 25 + border-top-left-radius: 3px; 26 + border-top-right-radius: 3px; 27 + font-weight: bold; 28 + color: {$bluetext}; 29 + } 30 + 10 31 .diviner-return-table-view, 11 32 .diviner-parameter-table-view { 12 33 width: 100%; 13 - margin: 0 0 16px; 14 - background: #f6f6f6; 15 - border-bottom: 1px solid #c0c5d1; 16 - width: 100%; 34 + background: {$lightgreybackground}; 35 + border: 1px solid {$lightblueborder}; 17 36 } 18 37 19 38 .diviner-return-table-type, 20 39 .diviner-parameter-table-type { 21 - padding: 4px 8px 4px 12px; 40 + padding: 6px 8px 6px 12px; 22 41 white-space: nowrap; 23 42 text-align: right; 24 - color: {$greytext}; 43 + color: {$bluetext}; 25 44 width: 20%; 26 45 } 27 46 28 47 .diviner-parameter-table-name { 29 - padding: 4px 8px; 48 + padding: 6px 8px; 30 49 white-space: nowrap; 31 50 font-weight: bold; 32 51 } 33 52 34 53 .diviner-return-table-docs, 35 54 .diviner-parameter-table-docs { 36 - padding: 4px 12px 4px 8px; 55 + padding: 6px 12px 6px 8px; 37 56 width: 80%; 57 + background-color: #fff; 38 58 }
+5 -1
webroot/rsrc/css/layout/phabricator-header-view.css
··· 20 20 color: {$darkbluetext}; 21 21 } 22 22 23 + body.device-phone .phabricator-header-view { 24 + padding: 12px 8px; 25 + } 26 + 23 27 .device-desktop .phabricator-header-view { 24 28 width: 66%; 25 29 } ··· 44 48 } 45 49 46 50 .phabricator-header-subheader { 47 - color: {$darkgreytext}; 51 + color: {$lightbluetext}; 48 52 font-weight: normal; 49 53 font-size: 13px; 50 54 margin-top: 4px;
+4 -3
webroot/rsrc/css/layout/phabricator-property-list-view.css
··· 34 34 } 35 35 36 36 .phabricator-property-list-key { 37 - color: {$darkbluetext}; 37 + color: {$bluetext}; 38 38 font-weight: bold; 39 39 overflow: hidden; 40 40 white-space: nowrap; ··· 50 50 } 51 51 52 52 .device .phabricator-property-list-key { 53 - padding-left: 16px; 53 + padding-left: 8px; 54 54 } 55 55 56 56 .phabricator-property-list-value { 57 57 color: {$darkgreytext}; 58 58 overflow: hidden; 59 + line-height: 17px; 59 60 } 60 61 61 62 .device-desktop .phabricator-property-list-value { 62 63 width: 50%; 63 64 margin-left: 1%; 64 65 float: left; 65 - margin-bottom: .5em; 66 + margin-bottom: 4px; 66 67 } 67 68 68 69 .device .phabricator-property-list-value {
+5 -1
webroot/rsrc/css/phui/phui-document.css
··· 50 50 border-bottom: 1px solid #BFCFDA; 51 51 } 52 52 53 + .device-phone .phui-document-bookname { 54 + padding: 8px; 55 + } 56 + 53 57 .phui-document-bookname .bookname { 54 58 float: left; 55 59 } ··· 70 74 } 71 75 72 76 .phui-document-content .phabricator-property-list-container { 73 - border-color: #BFCFDA; 77 + border-color: #dde8ef; 74 78 } 75 79 76 80 .phui-document-content .phabricator-property-list-view {