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

Revert some changes to Diffusion History List

Summary: Ref rPf2fcafb40dde94ddf4ee22716fea74fca0334a64#38208, I think this is a more usable layout. Gets rid of clippy, audit. Adds back Differential link as tag, Build Status as button.

Test Plan: Faked data on this for Differential, Builds, should all work though. Test on real and fake repositories.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+86 -35
+5 -5
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'ff161f2d', 11 11 'conpherence.pkg.js' => 'b5b51108', 12 - 'core.pkg.css' => 'eb39b754', 12 + 'core.pkg.css' => '38689e09', 13 13 'core.pkg.js' => '1475bd91', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => 'a2755617', ··· 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' => '4faf40cd', 74 + 'rsrc/css/application/diffusion/diffusion-history.css' => 'de70e348', 75 75 'rsrc/css/application/diffusion/diffusion-icons.css' => 'a6a1e2ba', 76 76 'rsrc/css/application/diffusion/diffusion-readme.css' => '18bd3910', 77 77 'rsrc/css/application/diffusion/diffusion-source.css' => '750add59', ··· 140 140 'rsrc/css/phui/phui-basic-nav-view.css' => 'a0705f53', 141 141 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', 142 142 'rsrc/css/phui/phui-box.css' => '269cbc99', 143 - 'rsrc/css/phui/phui-button.css' => '7ffbeee7', 143 + 'rsrc/css/phui/phui-button.css' => '836844c9', 144 144 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 145 145 'rsrc/css/phui/phui-cms.css' => '504b4b23', 146 146 'rsrc/css/phui/phui-comment-form.css' => '57af2e14', ··· 565 565 'differential-revision-history-css' => '0e8eb855', 566 566 'differential-revision-list-css' => 'f3c47d33', 567 567 'differential-table-of-contents-css' => 'ae4b7a55', 568 - 'diffusion-history-css' => '4faf40cd', 568 + 'diffusion-history-css' => 'de70e348', 569 569 'diffusion-icons-css' => 'a6a1e2ba', 570 570 'diffusion-readme-css' => '18bd3910', 571 571 'diffusion-source-css' => '750add59', ··· 817 817 'phui-basic-nav-view-css' => 'a0705f53', 818 818 'phui-big-info-view-css' => 'bd903741', 819 819 'phui-box-css' => '269cbc99', 820 - 'phui-button-css' => '7ffbeee7', 820 + 'phui-button-css' => '836844c9', 821 821 'phui-calendar-css' => '477acfaa', 822 822 'phui-calendar-day-css' => '572b1893', 823 823 'phui-calendar-list-css' => '576be600',
+47 -23
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 + 13 20 $handles = $viewer->loadHandles($this->getRequiredHandlePHIDs()); 21 + 22 + $show_builds = PhabricatorApplication::isClassInstalledForViewer( 23 + 'PhabricatorHarbormasterApplication', 24 + $this->getUser()); 14 25 15 26 $rows = array(); 16 27 $ii = 0; ··· 95 106 ), 96 107 true); 97 108 109 + $diff_tag = null; 110 + if ($show_revisions && $commit) { 111 + $d_id = idx($this->getRevisions(), $commit->getPHID()); 112 + if ($d_id) { 113 + $diff_tag = id(new PHUITagView()) 114 + ->setName('D'.$d_id) 115 + ->setType(PHUITagView::TYPE_SHADE) 116 + ->setColor(PHUITagView::COLOR_BLUE) 117 + ->setHref('/D'.$d_id) 118 + ->addClass('diffusion-differential-tag') 119 + ->setSlimShady(true); 120 + } 121 + } 122 + 123 + $build_view = null; 124 + if ($show_builds) { 125 + $buildable = idx($buildables, $commit->getPHID()); 126 + if ($buildable !== null) { 127 + $status = $buildable->getBuildableStatus(); 128 + $icon = HarbormasterBuildable::getBuildableStatusIcon($status); 129 + $color = HarbormasterBuildable::getBuildableStatusColor($status); 130 + $name = HarbormasterBuildable::getBuildableStatusName($status); 131 + $build_view = id(new PHUIButtonView()) 132 + ->setTag('a') 133 + ->setText($name) 134 + ->setIcon($icon) 135 + ->setColor($color) 136 + ->setHref('/'.$buildable->getMonogram()) 137 + ->addClass('mmr') 138 + ->setButtonType(PHUIButtonView::BUTTONTYPE_SIMPLE) 139 + ->addClass('diffusion-list-build-status'); 140 + } 141 + } 142 + 98 143 $message = null; 99 144 $commit_link = $repository->getCommitURI( 100 145 $history->getCommitIdentifier()); ··· 117 162 ->setColor(PHUITagView::COLOR_INDIGO) 118 163 ->setSlimShady(true); 119 164 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 - 141 165 $item = id(new PHUIObjectItemView()) 142 166 ->setHeader($commit_desc) 143 167 ->setHref($commit_link) 144 168 ->setDisabled($commit->isUnreachable()) 145 169 ->setDescription($message) 146 170 ->setImageURI($author_image) 147 - ->addAttribute($commit_tag) 171 + ->addAttribute(array($commit_tag, ' ', $diff_tag)) // For Copy Pasta 148 172 ->addAttribute($authored) 149 173 ->setSideColumn(array( 150 - $clippy, 174 + $build_view, 151 175 $browse_button, 152 176 )); 153 177
+9
webroot/rsrc/css/application/diffusion/diffusion-history.css
··· 31 31 .diffusion-history-author-name a { 32 32 color: {$darkbluetext}; 33 33 } 34 + 35 + .diffusion-history-list .diffusion-differential-tag { 36 + margin-left: 4px; 37 + } 38 + 39 + a.phui-tag-view:hover.diffusion-differential-tag .phui-tag-core { 40 + border-color: transparent; 41 + text-decoration: underline; 42 + }
+25 -7
webroot/rsrc/css/phui/phui-button.css
··· 106 106 color: {$lightbluetext}; 107 107 } 108 108 109 + button.simple.red, 110 + input[type="submit"].simple.red, 111 + a.simple.red, 112 + a.simple.red:visited { 113 + background: #fff; 114 + color: {$redtext}; 115 + border: 1px solid {$sh-redborder}; 116 + } 117 + 118 + button.simple.red .phui-icon-view, 119 + input[type="submit"].simple.red .phui-icon-view, 120 + a.simple.red .phui-icon-view, 121 + a.simple.red:visited .phui-icon-view { 122 + color: {$redtext}; 123 + } 124 + 109 125 a.disabled, 110 126 button.disabled, 111 127 button[disabled] { ··· 145 161 146 162 a.button.simple:hover, 147 163 button.simple:hover { 148 - background-color: {$lightblue}; 149 - background-image: linear-gradient(to bottom, {$blue}, {$blue}); 150 - color: #fff; 164 + border-color: {$blueborder}; 165 + background-image: none; 166 + background-color: #fff; 151 167 transition: 0s; 152 168 } 153 169 154 - a.button.simple:hover .phui-icon-view, 155 - button.simple:hover .phui-icon-view { 156 - color: #fff; 157 - transition: 0.1s; 170 + a.button.simple.red:hover, 171 + button.simple.red:hover { 172 + border-color: {$red}; 173 + background-image: none; 174 + background-color: #fff; 175 + transition: 0s; 158 176 } 159 177 160 178 a.button.simple .phui-icon-view {