@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 main view

Summary:
Currently, Diffusion has very complex views. After three years I'm not really used to them and rarely use many of these options.

Simplify the browse and history views:

- Put the browse view on top.
- Move dates to the right.
- Remove "History" and "Edit" links from the browse view. You can access these actions by clicking the file/path.
- Remove "Browse" link from the history view. You can access this action by clicking the commit.
- Remove "Change Type", which is essentially never useful, from the history view.
- Add some tweaks for mobile.

Test Plan: {F153931}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley, zeeg

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

+47 -65
+3 -3
resources/celerity/map.php
··· 7 7 return array( 8 8 'names' => 9 9 array( 10 - 'core.pkg.css' => 'c3e794ca', 10 + 'core.pkg.css' => 'd52dea33', 11 11 'core.pkg.js' => 'b2ed04a2', 12 12 'darkconsole.pkg.js' => 'ca8671ce', 13 13 'differential.pkg.css' => '4b8686e3', ··· 30 30 'rsrc/css/aphront/panel-view.css' => '5846dfa2', 31 31 'rsrc/css/aphront/phabricator-nav-view.css' => '80e60fc1', 32 32 'rsrc/css/aphront/request-failure-view.css' => 'da14df31', 33 - 'rsrc/css/aphront/table-view.css' => 'de599000', 33 + 'rsrc/css/aphront/table-view.css' => '52becc92', 34 34 'rsrc/css/aphront/tokenizer.css' => '36903077', 35 35 'rsrc/css/aphront/tooltip.css' => '9c90229d', 36 36 'rsrc/css/aphront/transaction.css' => 'ce491938', ··· 498 498 'aphront-pager-view-css' => '2e3539af', 499 499 'aphront-panel-view-css' => '5846dfa2', 500 500 'aphront-request-failure-view-css' => 'da14df31', 501 - 'aphront-table-view-css' => 'de599000', 501 + 'aphront-table-view-css' => '52becc92', 502 502 'aphront-tokenizer-control-css' => '36903077', 503 503 'aphront-tooltip-css' => '9c90229d', 504 504 'aphront-two-column-view-css' => '16ab3ad2',
+6 -7
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 89 89 $readme = null; 90 90 } 91 91 92 - $content[] = $this->buildHistoryTable( 93 - $history_results, 94 - $history, 95 - $history_exception, 96 - $handles); 97 - 98 92 $content[] = $this->buildBrowseTable( 99 93 $browse_results, 100 94 $browse_paths, 101 95 $browse_exception, 96 + $handles); 97 + 98 + $content[] = $this->buildHistoryTable( 99 + $history_results, 100 + $history, 101 + $history_exception, 102 102 $handles); 103 103 104 104 try { ··· 161 161 162 162 $view = id(new PHUIPropertyListView()) 163 163 ->setUser($user); 164 - $view->addProperty(pht('Callsign'), $repository->getCallsign()); 165 164 166 165 $project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( 167 166 $repository->getPHID(),
+19 -31
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 76 76 $dict[$k] = phutil_tag('span', array('id' => $uniq), ''); 77 77 } 78 78 79 - $editor_button = ''; 80 - if ($this->user) { 81 - $editor_link = $this->user->loadEditorLink( 82 - $base_path.$path->getPath(), 83 - 1, 84 - $request->getRepository()->getCallsign()); 85 - if ($editor_link) { 86 - $show_edit = true; 87 - $editor_button = phutil_tag( 88 - 'a', 89 - array( 90 - 'href' => $editor_link, 91 - ), 92 - pht('Edit')); 93 - } 94 - } 95 - 96 79 $rows[] = array( 97 - $this->linkHistory($base_path.$path->getPath().$dir_slash), 98 - $editor_button, 99 80 $browse_link, 100 81 idx($dict, 'lint'), 101 82 $dict['commit'], 83 + $dict['author'], 84 + $dict['details'], 102 85 $dict['date'], 103 86 $dict['time'], 104 - $dict['author'], 105 - $dict['details'], 106 87 ); 107 88 } 108 89 ··· 126 107 $view = new AphrontTableView($rows); 127 108 $view->setHeaders( 128 109 array( 129 - pht('History'), 130 - pht('Edit'), 131 110 pht('Path'), 132 111 ($lint ? $lint : pht('Lint')), 133 112 pht('Modified'), 113 + pht('Author/Committer'), 114 + pht('Details'), 134 115 pht('Date'), 135 116 pht('Time'), 136 - pht('Author/Committer'), 137 - pht('Details'), 138 117 )); 139 118 $view->setColumnClasses( 140 119 array( 141 120 '', 142 - '', 143 - '', 121 + 'n', 144 122 'n', 145 123 '', 124 + 'wide', 146 125 '', 147 126 'right', 148 - '', 149 - 'wide', 150 127 )); 151 128 $view->setColumnVisibility( 152 129 array( 153 130 true, 154 - $show_edit, 131 + $show_lint, 132 + true, 133 + true, 155 134 true, 156 - $show_lint, 157 135 true, 158 136 true, 137 + )); 138 + 139 + $view->setDeviceVisibility( 140 + array( 159 141 true, 142 + false, 160 143 true, 144 + false, 161 145 true, 146 + false, 147 + false, 162 148 )); 149 + 150 + 163 151 return $view->render(); 164 152 } 165 153
+18 -23
src/applications/diffusion/view/DiffusionHistoryTableView.php
··· 118 118 119 119 $commit = $history->getCommit(); 120 120 if ($commit && $commit->isPartiallyImported($partial_import) && $data) { 121 - $change = $this->linkChange( 122 - $history->getChangeType(), 123 - $history->getFileType(), 124 - $path = null, 125 - $history->getCommitIdentifier()); 121 + $summary = AphrontTableView::renderSingleDisplayLine( 122 + $history->getSummary()); 126 123 } else { 127 - $change = phutil_tag('em', array(), "Importing\xE2\x80\xA6"); 124 + $summary = phutil_tag('em', array(), "Importing\xE2\x80\xA6"); 128 125 } 129 126 130 127 $rows[] = array( 131 - $this->linkBrowse( 132 - $drequest->getPath(), 133 - array( 134 - 'commit' => $history->getCommitIdentifier(), 135 - )), 136 128 $graph ? $graph[$ii++] : null, 137 129 self::linkCommit( 138 130 $drequest->getRepository(), ··· 140 132 ($commit ? 141 133 self::linkRevision(idx($this->revisions, $commit->getPHID())) : 142 134 null), 143 - $change, 135 + $author, 136 + $summary, 144 137 $date, 145 138 $time, 146 - $author, 147 - AphrontTableView::renderSingleDisplayLine($history->getSummary()), 148 - // TODO: etc etc 149 139 ); 150 140 } 151 141 152 142 $view = new AphrontTableView($rows); 153 143 $view->setHeaders( 154 144 array( 155 - pht('Browse'), 156 145 '', 157 146 pht('Commit'), 158 147 pht('Revision'), 159 - pht('Change'), 148 + pht('Author/Committer'), 149 + pht('Details'), 160 150 pht('Date'), 161 151 pht('Time'), 162 - pht('Author/Committer'), 163 - pht('Details'), 164 152 )); 165 153 $view->setColumnClasses( 166 154 array( 167 - '', 168 155 'threads', 169 156 'n', 170 157 'n', 171 158 '', 159 + 'wide', 172 160 '', 173 161 'right', 174 - '', 175 - 'wide', 176 162 )); 177 163 $view->setColumnVisibility( 178 164 array( 179 - true, 180 165 $graph ? true : false, 166 + )); 167 + $view->setDeviceVisibility( 168 + array( 169 + $graph ? true : false, 170 + true, 171 + true, 172 + false, 173 + true, 174 + false, 175 + false, 181 176 )); 182 177 return $view->render(); 183 178 }
+1 -1
webroot/rsrc/css/aphront/table-view.css
··· 220 220 .aphront-table-view td.threads { 221 221 font-family: monospace; 222 222 white-space: pre; 223 - padding: 0; 223 + padding: 0 0 0 8px; 224 224 } 225 225 226 226 .aphront-table-view td.threads canvas {