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

[Redesign] Clean up Slowvote

Summary: Ref T8099, A cleaner, more standard UI for Slowvotes. Because Slowvote is important.

Test Plan: Test a number of poll layouts and embeds.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8099

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

+43 -57
+2 -2
resources/celerity/map.php
··· 104 104 'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd', 105 105 'rsrc/css/application/releeph/releeph-request-typeahead.css' => '667a48ae', 106 106 'rsrc/css/application/search/search-results.css' => '7dea472c', 107 - 'rsrc/css/application/slowvote/slowvote.css' => '266df6a1', 107 + 'rsrc/css/application/slowvote/slowvote.css' => '7c27f0f9', 108 108 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 109 109 'rsrc/css/application/uiexample/example.css' => '528b19de', 110 110 'rsrc/css/core/core.css' => 'a76cefc9', ··· 736 736 'phabricator-search-results-css' => '7dea472c', 737 737 'phabricator-shaped-request' => '7cbe244b', 738 738 'phabricator-side-menu-view-css' => '4f2cd343', 739 - 'phabricator-slowvote-css' => '266df6a1', 739 + 'phabricator-slowvote-css' => '7c27f0f9', 740 740 'phabricator-source-code-view-css' => '098e9b75', 741 741 'phabricator-standard-page-view' => '43045fb4', 742 742 'phabricator-textareautils' => '5c93c52c',
+1 -6
src/applications/slowvote/controller/PhabricatorSlowvotePollController.php
··· 67 67 array( 68 68 $crumbs, 69 69 $object_box, 70 - phutil_tag( 71 - 'div', 72 - array( 73 - 'class' => 'mlt mml mmr', 74 - ), 75 - $poll_view), 70 + $poll_view, 76 71 $timeline, 77 72 $add_comment, 78 73 ),
+10 -19
src/applications/slowvote/view/SlowvoteEmbedView.php
··· 71 71 if ($this->headless) { 72 72 $header = null; 73 73 } else { 74 - $header = phutil_tag( 75 - 'div', 76 - array( 77 - 'class' => 'slowvote-header', 78 - ), 79 - phutil_tag( 80 - 'div', 81 - array( 82 - 'class' => 'slowvote-header-content', 83 - ), 84 - array( 85 - 'V'.$poll->getID(), 86 - ' ', 87 - $link_to_slowvote, 88 - ))); 74 + $header = id(new PHUIHeaderView()) 75 + ->setHeader($link_to_slowvote); 89 76 90 77 $description = null; 91 78 if ($poll->getDescription()) { ··· 147 134 'button', 148 135 array( 149 136 ), 150 - pht('Engage in Deliberations')), 137 + pht('Enrage in Deliberations')), 151 138 ))); 152 139 } 153 140 ··· 168 155 $submit, 169 156 )); 170 157 171 - return javelin_tag( 158 + $embed = javelin_tag( 172 159 'div', 173 160 array( 174 161 'class' => 'slowvote-embed', ··· 177 164 'pollID' => $poll->getID(), 178 165 ), 179 166 ), 180 - array($header, $body)); 167 + array($body)); 168 + 169 + return id(new PHUIObjectBoxView()) 170 + ->setHeader($header) 171 + ->appendChild($embed); 181 172 } 182 173 183 174 private function renderLabel(PhabricatorSlowvoteOption $option, $selected) { ··· 213 204 ), 214 205 array( 215 206 $this->renderControl($option, $selected), 207 + $status, 216 208 )), 217 209 )), 218 - $status, 219 210 $voters, 220 211 )); 221 212 }
+30 -30
webroot/rsrc/css/application/slowvote/slowvote.css
··· 3 3 */ 4 4 5 5 .slowvote-embed { 6 - margin: 24px 12px; 7 - background: #ffffff; 8 - border-color: {$lightgreytext}; 9 - border-style: solid; 10 - border-width: 1px; 11 - border-radius: 4px; 12 - box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.20), 13 - inset 0 0 2px rgba(0, 0, 0, 0.10); 6 + background: #fff; 7 + border-color: {$lightblueborder}; 8 + border-radius: 3px; 14 9 } 15 10 16 11 .slowvote-header { ··· 21 16 22 17 .slowvote-description { 23 18 color: {$greytext}; 24 - padding: 8px; 25 - border-bottom: 1px solid #bbbbbb; 19 + font-size: 14px; 20 + padding: 12px 4px 4px; 26 21 } 27 22 28 23 .slowvote-header-content { 29 24 padding: 8px; 30 25 } 31 26 32 - .slowvote-body { 33 - } 34 - 35 27 .slowvote-body-content { 36 - padding: 4px 16px; 28 + padding: 8px 4px 0; 37 29 } 38 30 39 31 .slowvote-option-label { 40 - border: 1px solid {$greytext}; 32 + border: 1px solid {$sh-lightgreyborder}; 41 33 display: block; 42 34 position: relative; 43 35 padding: 8px 4px; 44 36 cursor: pointer; 45 37 font-weight: bold; 46 38 overflow: hidden; 47 - background-color: {$lightblue}; 39 + background-color: {$lightgreybackground}; 40 + } 41 + 42 + .device-desktop .slowvote-option-label:hover { 43 + border-color: {$sh-blueborder}; 48 44 } 49 45 50 46 .slowvote-bar { ··· 53 49 left: 0; 54 50 bottom: 0; 55 51 overflow: hidden; 56 - background-color: {$blue}; 52 + background-color: {$sh-bluebackground}; 57 53 } 58 54 59 55 .slowvote-control-offset { ··· 62 58 left: 32px; 63 59 top: 8px; 64 60 width: 100%; 65 - color: #000000; 66 - text-shadow: 0 1px 0 #ffffff; 67 - } 68 - 69 - .slowvote-bar .slowvote-control-offset { 70 - color: #ffffff; 71 - text-shadow: 0 1px 0 #000000; 61 + color: {$darkbluetext}; 62 + text-shadow: {$whitetextshadow}; 72 63 } 73 64 74 65 .slowvote-option-label-group { 75 - margin: 8px 0 16px; 66 + margin: 0 0 12px; 76 67 } 77 68 78 69 .slowvote-option-label input[type="radio"], ··· 86 77 } 87 78 88 79 .slowvote-status { 89 - text-align: right; 90 - color: #333333; 80 + color: {$darkbluetext}; 91 81 font-weight: normal; 92 82 padding: 2px 0; 93 83 line-height: 15px; 94 84 text-align: right; 95 - font-size: 11px; 85 + font-size: 12px; 86 + top: 0; 87 + right: 8px; 88 + position: absolute; 89 + text-shadow: {$whitetextshadow}; 90 + } 91 + 92 + .slowvote-voters { 93 + padding-top: 8px; 96 94 } 97 95 98 96 .slowvote-voter { 99 97 display: inline-block; 100 98 width: 25px; 101 99 height: 25px; 102 - background: #f3f3f3; 103 100 background-size: 25px 25px; 101 + border-radius: 3px; 102 + margin: 0 4px; 103 + box-shadow: {$borderinset}; 104 104 } 105 105 106 106 .slowvote-footer { 107 107 border-top-width: 1px; 108 108 border-top-style: solid; 109 - border-top-color: #bbbbbb; 109 + border-top-color: {$thinblueborder}; 110 110 position: relative; 111 111 } 112 112