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

Simplify Diffusion Browse Table

Summary: Cleans up colors, removes commit hash and links the text instead. Also unsure how valuable "lint" column is here, but left it. I'd maybe like to understand that workflow since it just seems like clutter overall. Also Fixes T12905

Test Plan:
Review Phabricator, hg, and a few other test repositories locally. Holler if anything here seems bad, but this feels easier to read and use to me.

{F5038425}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12905

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

+55 -35
+8 -8
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'ff161f2d', 11 11 'conpherence.pkg.js' => 'b5b51108', 12 - 'core.pkg.css' => '37dd219b', 12 + 'core.pkg.css' => '7ae9e755', 13 13 'core.pkg.js' => '5d80e0db', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '4ec4a37a', 16 16 'differential.pkg.js' => 'd4ab0e81', 17 - 'diffusion.pkg.css' => 'b93d9b8c', 17 + 'diffusion.pkg.css' => 'a2d17c7d', 18 18 'diffusion.pkg.js' => '6134c5a1', 19 19 'favicon.ico' => '30672e08', 20 20 'maniphest.pkg.css' => '4845691a', ··· 71 71 'rsrc/css/application/differential/revision-history.css' => '0e8eb855', 72 72 'rsrc/css/application/differential/revision-list.css' => 'f3c47d33', 73 73 'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55', 74 - 'rsrc/css/application/diffusion/diffusion-history.css' => '4540f568', 75 - 'rsrc/css/application/diffusion/diffusion-icons.css' => 'a6a1e2ba', 74 + 'rsrc/css/application/diffusion/diffusion-history.css' => '898ed727', 75 + 'rsrc/css/application/diffusion/diffusion-icons.css' => '0c15255e', 76 76 'rsrc/css/application/diffusion/diffusion-readme.css' => '419dd5b6', 77 77 'rsrc/css/application/diffusion/diffusion-repository.css' => 'ee6f20ec', 78 78 'rsrc/css/application/diffusion/diffusion-source.css' => '750add59', ··· 161 161 'rsrc/css/phui/phui-header-view.css' => 'e7de7ee2', 162 162 'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf', 163 163 'rsrc/css/phui/phui-icon-set-selector.css' => '87db8fee', 164 - 'rsrc/css/phui/phui-icon.css' => '4c46b6ba', 164 + 'rsrc/css/phui/phui-icon.css' => '5c4a5de6', 165 165 'rsrc/css/phui/phui-image-mask.css' => 'a8498f9c', 166 166 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', 167 167 'rsrc/css/phui/phui-info-view.css' => '6e217679', ··· 570 570 'differential-revision-history-css' => '0e8eb855', 571 571 'differential-revision-list-css' => 'f3c47d33', 572 572 'differential-table-of-contents-css' => 'ae4b7a55', 573 - 'diffusion-history-css' => '4540f568', 574 - 'diffusion-icons-css' => 'a6a1e2ba', 573 + 'diffusion-history-css' => '898ed727', 574 + 'diffusion-icons-css' => '0c15255e', 575 575 'diffusion-readme-css' => '419dd5b6', 576 576 'diffusion-repository-css' => 'ee6f20ec', 577 577 'diffusion-source-css' => '750add59', ··· 849 849 'phui-hovercard' => '1bd28176', 850 850 'phui-hovercard-view-css' => 'f0592bcf', 851 851 'phui-icon-set-selector-css' => '87db8fee', 852 - 'phui-icon-view-css' => '4c46b6ba', 852 + 'phui-icon-view-css' => '5c4a5de6', 853 853 'phui-image-mask-css' => 'a8498f9c', 854 854 'phui-info-panel-css' => '27ea50a1', 855 855 'phui-info-view-css' => '6e217679',
+7 -7
src/applications/differential/constants/DifferentialChangeType.php
··· 71 71 self::FILE_TEXT => 'fa-file-text-o', 72 72 self::FILE_IMAGE => 'fa-file-image-o', 73 73 self::FILE_BINARY => 'fa-file', 74 - self::FILE_DIRECTORY => 'fa-folder-open', 74 + self::FILE_DIRECTORY => 'fa-folder', 75 75 self::FILE_SYMLINK => 'fa-link', 76 76 self::FILE_DELETED => 'fa-file', 77 77 self::FILE_NORMAL => 'fa-file-text-o', ··· 83 83 84 84 public static function getIconColorForFileType($type) { 85 85 static $icons = array( 86 - self::FILE_TEXT => 'black', 87 - self::FILE_IMAGE => 'black', 86 + self::FILE_TEXT => 'bluetext', 87 + self::FILE_IMAGE => 'bluetext', 88 88 self::FILE_BINARY => 'green', 89 - self::FILE_DIRECTORY => 'blue', 90 - self::FILE_SYMLINK => 'blue', 89 + self::FILE_DIRECTORY => 'bluetext', 90 + self::FILE_SYMLINK => 'bluetext', 91 91 self::FILE_DELETED => 'red', 92 - self::FILE_NORMAL => 'black', 93 - self::FILE_SUBMODULE => 'blue', 92 + self::FILE_NORMAL => 'bluetext', 93 + self::FILE_SUBMODULE => 'bluetext', 94 94 ); 95 95 96 96 return idx($icons, $type, 'black');
+5 -1
src/applications/diffusion/controller/DiffusionLastModifiedController.php
··· 132 132 } 133 133 } 134 134 135 - $details = AphrontTableView::renderSingleDisplayLine($data->getSummary()); 135 + $details = DiffusionView::linkDetail( 136 + $drequest->getRepository(), 137 + $commit->getCommitIdentifier(), 138 + $data->getSummary()); 139 + $details = AphrontTableView::renderSingleDisplayLine($details); 136 140 } else { 137 141 $author = ''; 138 142 $details = '';
+7 -19
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 20 20 public function render() { 21 21 $request = $this->getDiffusionRequest(); 22 22 $repository = $request->getRepository(); 23 + require_celerity_resource('diffusion-history-css'); 23 24 24 25 $base_path = trim($request->getPath(), '/'); 25 26 if ($base_path) { ··· 74 75 75 76 $dict = array( 76 77 'lint' => celerity_generate_unique_node_id(), 77 - 'commit' => celerity_generate_unique_node_id(), 78 78 'date' => celerity_generate_unique_node_id(), 79 79 'author' => celerity_generate_unique_node_id(), 80 80 'details' => celerity_generate_unique_node_id(), ··· 86 86 } 87 87 88 88 $rows[] = array( 89 - $history_link, 90 89 $browse_link, 91 90 idx($dict, 'lint'), 92 - $dict['commit'], 93 91 $dict['details'], 94 92 $dict['date'], 93 + $history_link, 95 94 ); 95 + 96 96 } 97 97 98 98 if ($need_pull) { ··· 113 113 $lint = $request->getLint(); 114 114 115 115 $view = new AphrontTableView($rows); 116 - $view->setHeaders( 117 - array( 118 - null, 119 - pht('Path'), 120 - ($lint ? $lint : pht('Lint')), 121 - pht('Modified'), 122 - pht('Details'), 123 - pht('Committed'), 124 - )); 125 116 $view->setColumnClasses( 126 117 array( 127 - 'nudgeright', 128 118 '', 129 119 '', 130 - '', 131 - 'wide', 120 + 'wide commit-detail', 132 121 'right', 122 + 'right narrow', 133 123 )); 134 124 $view->setColumnVisibility( 135 125 array( 136 126 true, 137 - true, 138 127 $show_lint, 139 128 true, 140 129 true, ··· 144 133 $view->setDeviceVisibility( 145 134 array( 146 135 true, 147 - true, 148 - false, 149 136 false, 150 137 true, 151 138 false, 139 + false, 152 140 )); 153 141 154 142 155 - return $view->render(); 143 + return phutil_tag_div('diffusion-browse-table', $view->render()); 156 144 } 157 145 158 146 }
+13
src/applications/diffusion/view/DiffusionView.php
··· 156 156 $commit_name); 157 157 } 158 158 159 + final public static function linkDetail( 160 + PhabricatorRepository $repository, 161 + $commit, 162 + $detail) { 163 + 164 + return phutil_tag( 165 + 'a', 166 + array( 167 + 'href' => $repository->getCommitURI($commit), 168 + ), 169 + $detail); 170 + } 171 + 159 172 final public static function linkRevision($id) { 160 173 if (!$id) { 161 174 return null;
+10
webroot/rsrc/css/application/diffusion/diffusion-history.css
··· 48 48 margin-right: 4px; 49 49 } 50 50 51 + /* - Browse Styles ----------------------------------------------------------*/ 52 + 53 + .diffusion-browse-table .commit-detail { 54 + padding-left: 32px; 55 + } 56 + 57 + .diffusion-browse-table .commit-detail a { 58 + color: {$darkbluetext}; 59 + } 60 + 51 61 /* - Phone Style ------------------------------------------------------------*/ 52 62 53 63 .device-phone.diffusion-history-view .phui-two-column-view
+1
webroot/rsrc/css/application/diffusion/diffusion-icons.css
··· 20 20 21 21 .diffusion-browse-name { 22 22 margin-left: 8px; 23 + letter-spacing: 0.02em; 23 24 } 24 25 25 26 .diffusion-link-icon + .diffusion-link-icon {
+4
webroot/rsrc/css/phui/phui-icon.css
··· 45 45 filter: grayscale(100%); 46 46 } 47 47 48 + .phui-icon-view.bluetext { 49 + color: {$bluetext}; 50 + } 51 + 48 52 /* - Icon in a Circle ------------------------------------------------------- */ 49 53 50 54 .phui-icon-circle {