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

Diffusion History List cleanup

Summary: Removes the odd circle buttons, adds copy-pasta button.

Test Plan: Review new layout locally.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+22 -79
+22 -79
src/applications/diffusion/view/DiffusionHistoryListView.php
··· 10 10 require_celerity_resource('diffusion-history-css'); 11 11 Javelin::initBehavior('phabricator-tooltips'); 12 12 13 - $buildables = $this->loadBuildables( 14 - mpull($this->getHistory(), 'getCommit')); 15 - 16 - $show_revisions = PhabricatorApplication::isClassInstalledForViewer( 17 - 'PhabricatorDifferentialApplication', 18 - $viewer); 19 - 20 13 $handles = $viewer->loadHandles($this->getRequiredHandlePHIDs()); 21 - 22 - $show_builds = PhabricatorApplication::isClassInstalledForViewer( 23 - 'PhabricatorHarbormasterApplication', 24 - $this->getUser()); 25 14 26 15 $rows = array(); 27 16 $ii = 0; ··· 97 86 $commit_desc = phutil_tag('em', array(), pht("Importing\xE2\x80\xA6")); 98 87 } 99 88 100 - $build_view = null; 101 - if ($show_builds) { 102 - $buildable = idx($buildables, $commit->getPHID()); 103 - if ($buildable !== null) { 104 - $build_view = $this->renderBuildable($buildable); 105 - } 106 - } 107 - 108 89 $browse_button = $this->linkBrowse( 109 90 $history->getPath(), 110 91 array( ··· 114 95 ), 115 96 true); 116 97 117 - $differential_view = null; 118 - if ($show_revisions && $commit) { 119 - $d_id = idx($this->getRevisions(), $commit->getPHID()); 120 - if ($d_id) { 121 - $differential_view = id(new PHUIIconCircleView()) 122 - ->setIcon('fa-gear') 123 - ->setColor('green') 124 - ->setState(PHUIIconCircleView::STATE_SUCCESS) 125 - ->addSigil('has-tooltip') 126 - ->setSize(PHUIIconCircleView::SMALL) 127 - ->setHref('/D'.$d_id) 128 - ->addClass('mmr') 129 - ->setMetadata( 130 - array( 131 - 'tip' => 'Revision D'.$d_id, 132 - )); 133 - } 134 - } 135 - 136 - $status = $commit->getAuditStatus(); 137 - $icon = PhabricatorAuditCommitStatusConstants::getStatusIcon($status); 138 - $color = PhabricatorAuditCommitStatusConstants::getStatusColor($status); 139 - $name = PhabricatorAuditCommitStatusConstants::getStatusName($status); 140 - $audit_view = id(new PHUIIconCircleView()) 141 - ->setIcon('fa-code') 142 - ->setColor($color) 143 - ->setState($icon) 144 - ->addSigil('has-tooltip') 145 - ->setSize(PHUIIconCircleView::SMALL) 146 - ->addClass('mmr') 147 - ->setMetadata( 148 - array( 149 - 'tip' => $name, 150 - )); 151 - 152 - if ($show_builds) { 153 - $buildable = idx($buildables, $commit->getPHID()); 154 - if ($buildable !== null) { 155 - $status = $buildable->getBuildableStatus(); 156 - $icon = HarbormasterBuildable::getBuildableStatusIcon($status); 157 - $color = HarbormasterBuildable::getBuildableStatusColor($status); 158 - $name = HarbormasterBuildable::getBuildableStatusName($status); 159 - $build_view = id(new PHUIIconCircleView()) 160 - ->setIcon('fa-recycle') 161 - ->setColor($color) 162 - ->setState($icon) 163 - ->addSigil('has-tooltip') 164 - ->setSize(PHUIIconCircleView::SMALL) 165 - ->setHref('/'.$buildable->getMonogram()) 166 - ->addClass('mmr') 167 - ->setMetadata( 168 - array( 169 - 'tip' => $name, 170 - )); 171 - } 172 - } 173 - 174 98 $message = null; 175 99 $commit_link = $repository->getCommitURI( 176 100 $history->getCommitIdentifier()); ··· 193 117 ->setColor(PHUITagView::COLOR_INDIGO) 194 118 ->setSlimShady(true); 195 119 120 + $clippy = null; 121 + if ($commit) { 122 + Javelin::initBehavior('phabricator-clipboard-copy'); 123 + $clippy = id(new PHUIButtonView()) 124 + ->setIcon('fa-clipboard') 125 + ->setHref('#') 126 + ->setTag('a') 127 + ->addSigil('has-tooltip') 128 + ->addSigil('clipboard-copy') 129 + ->addClass('clipboard-copy') 130 + ->addClass('mmr') 131 + ->setButtonType(PHUIButtonView::BUTTONTYPE_SIMPLE) 132 + ->setMetadata( 133 + array( 134 + 'text' => $history->getCommitIdentifier(), 135 + 'tip' => pht('Copy'), 136 + 'align' => 'N', 137 + 'size' => 'auto', 138 + )); 139 + } 140 + 196 141 $item = id(new PHUIObjectItemView()) 197 142 ->setHeader($commit_desc) 198 143 ->setHref($commit_link) ··· 202 147 ->addAttribute($commit_tag) 203 148 ->addAttribute($authored) 204 149 ->setSideColumn(array( 205 - $differential_view, 206 - $audit_view, 207 - $build_view, 150 + $clippy, 208 151 $browse_button, 209 152 )); 210 153