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

Clean up Ponder CSS

Summary: Ref T3578, Removes old cruft and updates Ponder UI very slightly.

Test Plan: Use Ponder alot, new answers, comments, questions. Grep for removed CSS.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

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

+52 -220
+2 -8
resources/celerity/map.php
··· 94 94 'rsrc/css/application/policy/policy-edit.css' => '815c66f7', 95 95 'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43', 96 96 'rsrc/css/application/policy/policy.css' => '957ea14c', 97 - 'rsrc/css/application/ponder/comments.css' => '865a67e6', 98 - 'rsrc/css/application/ponder/feed.css' => 'e62615b6', 99 - 'rsrc/css/application/ponder/post.css' => '9d415218', 100 - 'rsrc/css/application/ponder/vote.css' => 'aea452b0', 97 + 'rsrc/css/application/ponder/ponder-view.css' => 'fcd6b398', 101 98 'rsrc/css/application/projects/project-icon.css' => '4e3eaa5a', 102 99 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 103 100 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', ··· 816 813 'policy-css' => '957ea14c', 817 814 'policy-edit-css' => '815c66f7', 818 815 'policy-transaction-detail-css' => '82100a43', 819 - 'ponder-comment-table-css' => '865a67e6', 820 - 'ponder-feed-view-css' => 'e62615b6', 821 - 'ponder-post-css' => '9d415218', 822 - 'ponder-vote-css' => 'aea452b0', 816 + 'ponder-view-css' => 'fcd6b398', 823 817 'project-icon-css' => '4e3eaa5a', 824 818 'raphael-core' => '51ee6b43', 825 819 'raphael-g' => '40dde778',
+1
src/applications/ponder/controller/PonderAnswerHistoryController.php
··· 24 24 $aid = $answer->getID(); 25 25 26 26 $crumbs = $this->buildApplicationCrumbs(); 27 + $crumbs->setBorder(true); 27 28 $crumbs->addTextCrumb("Q{$qid}", "/Q{$qid}"); 28 29 $crumbs->addTextCrumb("A{$aid}", "/Q{$qid}#{$aid}"); 29 30 $crumbs->addTextCrumb(pht('History'));
+1
src/applications/ponder/controller/PonderQuestionHistoryController.php
··· 22 22 $qid = $question->getID(); 23 23 24 24 $crumbs = $this->buildApplicationCrumbs(); 25 + $crumbs->setBorder(true); 25 26 $crumbs->addTextCrumb("Q{$qid}", "/Q{$qid}"); 26 27 $crumbs->addTextCrumb(pht('History')); 27 28
+29 -26
src/applications/ponder/controller/PonderQuestionViewController.php
··· 3 3 final class PonderQuestionViewController extends PonderController { 4 4 5 5 public function handleRequest(AphrontRequest $request) { 6 - $user = $request->getViewer(); 6 + $viewer = $request->getViewer(); 7 7 $id = $request->getURIData('id'); 8 8 9 9 $question = id(new PonderQuestionQuery()) 10 - ->setViewer($user) 10 + ->setViewer($viewer) 11 11 ->withIDs(array($id)) 12 12 ->needAnswers(true) 13 13 ->needViewerVotes(true) ··· 16 16 return new Aphront404Response(); 17 17 } 18 18 19 - $question->attachVotes($user->getPHID()); 19 + $question->attachVotes($viewer->getPHID()); 20 20 21 21 $question_xactions = $this->buildQuestionTransactions($question); 22 22 $answers = $this->buildAnswers($question->getAnswers()); 23 23 24 24 $authors = mpull($question->getAnswers(), null, 'getAuthorPHID'); 25 - if (isset($authors[$user->getPHID()])) { 25 + if (isset($authors[$viewer->getPHID()])) { 26 26 $answer_add_panel = id(new PHUIInfoView()) 27 - ->setSeverity(PHUIInfoView::SEVERITY_NODATA) 27 + ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 28 28 ->appendChild( 29 29 pht( 30 30 'You have already answered this question. You can not answer '. ··· 33 33 $answer_add_panel = new PonderAddAnswerView(); 34 34 $answer_add_panel 35 35 ->setQuestion($question) 36 - ->setUser($user) 36 + ->setUser($viewer) 37 37 ->setActionURI('/ponder/answer/add/'); 38 38 } 39 39 40 - $header = id(new PHUIHeaderView()) 41 - ->setHeader($question->getTitle()) 42 - ->setUser($user) 43 - ->setPolicyObject($question); 40 + $header = new PHUIHeaderView(); 41 + $header->setHeader($question->getTitle()); 42 + $header->setUser($viewer); 43 + $header->setPolicyObject($question); 44 44 45 45 if ($question->getStatus() == PonderQuestionStatus::STATUS_OPEN) { 46 46 $header->setStatus('fa-square-o', 'bluegrey', pht('Open')); ··· 58 58 $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView()); 59 59 $crumbs->addTextCrumb('Q'.$id, '/Q'.$id); 60 60 61 - return $this->buildApplicationPage( 61 + $ponder_view = phutil_tag( 62 + 'div', 63 + array( 64 + 'class' => 'ponder-question-view', 65 + ), 62 66 array( 63 67 $crumbs, 64 68 $object_box, 65 69 $question_xactions, 66 70 $answers, 67 71 $answer_add_panel, 72 + )); 73 + 74 + return $this->buildApplicationPage( 75 + array( 76 + $ponder_view, 68 77 ), 69 78 array( 70 79 'title' => 'Q'.$question->getID().' '.$question->getTitle(), ··· 75 84 } 76 85 77 86 private function buildActionListView(PonderQuestion $question) { 87 + $viewer = $this->getViewer(); 78 88 $request = $this->getRequest(); 79 - $viewer = $request->getUser(); 80 - 81 89 $id = $question->getID(); 82 90 83 91 $can_edit = PhabricatorPolicyFilter::hasCapability( ··· 86 94 PhabricatorPolicyCapability::CAN_EDIT); 87 95 88 96 $view = id(new PhabricatorActionListView()) 89 - ->setUser($request->getUser()) 97 + ->setUser($viewer) 90 98 ->setObject($question) 91 99 ->setObjectURI($request->getRequestURI()); 92 100 ··· 130 138 PonderQuestion $question, 131 139 PhabricatorActionListView $actions) { 132 140 133 - $viewer = $this->getRequest()->getUser(); 141 + $viewer = $this->getViewer(); 134 142 $view = id(new PHUIPropertyListView()) 135 143 ->setUser($viewer) 136 144 ->setObject($question) 137 145 ->setActionList($actions); 138 - 139 - $view->addProperty( 140 - pht('Status'), 141 - PonderQuestionStatus::getQuestionStatusFullName($question->getStatus())); 142 146 143 147 $view->addProperty( 144 148 pht('Author'), ··· 209 213 * standard fashion. This is necessary to scale this application. 210 214 */ 211 215 private function buildAnswers(array $answers) { 212 - $request = $this->getRequest(); 213 - $viewer = $request->getUser(); 216 + $viewer = $this->getViewer(); 214 217 215 218 $out = array(); 216 219 ··· 283 286 } 284 287 285 288 private function buildAnswerActions(PonderAnswer $answer) { 289 + $viewer = $this->getViewer(); 286 290 $request = $this->getRequest(); 287 - $viewer = $request->getUser(); 288 - 289 291 $id = $answer->getID(); 290 292 291 293 $can_edit = PhabricatorPolicyFilter::hasCapability( ··· 294 296 PhabricatorPolicyCapability::CAN_EDIT); 295 297 296 298 $view = id(new PhabricatorActionListView()) 297 - ->setUser($request->getUser()) 299 + ->setUser($viewer) 298 300 ->setObject($answer) 299 301 ->setObjectURI($request->getRequestURI()); 300 302 ··· 319 321 PonderAnswer $answer, 320 322 PhabricatorActionListView $actions) { 321 323 322 - $viewer = $this->getRequest()->getUser(); 324 + $viewer = $this->getViewer(); 323 325 $view = id(new PHUIPropertyListView()) 324 326 ->setUser($viewer) 325 327 ->setObject($answer) ··· 366 368 $hide_id = celerity_generate_unique_node_id(); 367 369 368 370 Javelin::initBehavior('phabricator-reveal-content'); 369 - require_celerity_resource('ponder-comment-table-css'); 371 + require_celerity_resource('ponder-view-css'); 370 372 371 373 $show = phutil_tag( 372 374 'div', ··· 389 391 $hide = phutil_tag( 390 392 'div', 391 393 array( 394 + 'class' => 'ponder-comments-view', 392 395 'id' => $hide_id, 393 396 'style' => 'display: none', 394 397 ),
+1 -1
src/applications/ponder/view/PonderVotableView.php
··· 28 28 } 29 29 30 30 public function render() { 31 - require_celerity_resource('ponder-vote-css'); 31 + require_celerity_resource('ponder-view-css'); 32 32 require_celerity_resource('javelin-behavior-ponder-votebox'); 33 33 34 34 Javelin::initBehavior('ponder-votebox', array());
-85
webroot/rsrc/css/application/ponder/comments.css
··· 1 - /** 2 - * @provides ponder-comment-table-css 3 - */ 4 - 5 - .ponder-show-comments { 6 - text-align: center; 7 - padding: 8px; 8 - margin: 0 16px; 9 - float: right; 10 - font-weight: bold; 11 - background: #fff; 12 - border-bottom: 1px solid {$blueborder}; 13 - border-left: 1px solid {$lightblueborder}; 14 - border-right: 1px solid {$lightblueborder}; 15 - } 16 - 17 - .ponder-comments { 18 - width: 480px; 19 - margin: 5px 0 0 60px; 20 - } 21 - 22 - .device .ponder-comments { 23 - width: 100%; 24 - margin: 5px 0 0 0; 25 - } 26 - 27 - .ponder-comments th { 28 - width: 0px; 29 - height: 0px; 30 - } 31 - 32 - .ponder-comments td { 33 - vertical-align: top; 34 - padding: 6px; 35 - border-bottom: 1px solid {$thinblueborder}; 36 - background: #fff; 37 - } 38 - 39 - .ponder-datestamp { 40 - font-size: {$smallestfontsize}; 41 - color: {$greytext}; 42 - } 43 - 44 - .ponder-label { 45 - display: block; 46 - width: 100%; 47 - font-weight: bold; 48 - color: #333; 49 - text-align: left; 50 - margin: 0px 0px 6px; 51 - padding: 6px 4px; 52 - background: #ccc; 53 - border-bottom: 1px solid #aaa; 54 - cursor: pointer; 55 - } 56 - 57 - td .aphront-form-control { 58 - padding: 0; 59 - } 60 - 61 - td .aphront-form-control-submit { 62 - display: block; 63 - } 64 - 65 - td .aphront-form-input { 66 - margin: 0; 67 - width: 100%; 68 - } 69 - 70 - td .aphront-form-control textarea { 71 - height: 50px; 72 - } 73 - 74 - .ponder-comment-markup p { 75 - margin: 0 0 5px 0; 76 - } 77 - 78 - .ponder-comment-markup h2, 79 - .ponder-comment-markup h3, 80 - .ponder-comment-markup h4, 81 - .ponder-comment-markup h5 { 82 - margin: 0; 83 - font-size: inherit; 84 - font-weight: normal; 85 - }
-74
webroot/rsrc/css/application/ponder/feed.css
··· 1 - /** 2 - * @provides ponder-feed-view-css 3 - */ 4 - 5 - .ponder-question-summary { 6 - width: 100%; 7 - background: #DFDFE3; 8 - float: left; 9 - clear: both; 10 - margin-top: 1px; 11 - padding: 1px; 12 - } 13 - 14 - .ponder-answer-summary { 15 - width : 100%; 16 - background : #DFDFE3; 17 - float : left; 18 - clear : both; 19 - margin-top : 1px; 20 - padding : 1px; 21 - } 22 - 23 - .ponder-summary-votes { 24 - width : 50px; 25 - height : 36pt; 26 - font-size : 18pt; 27 - text-align : center; 28 - background : #EEE; 29 - border : 1px solid #BBB; 30 - float : left; 31 - margin : 2px; 32 - padding-top : 2px; 33 - } 34 - 35 - .ponder-summary-answers { 36 - width : 50px; 37 - height : 36pt; 38 - font-size : 18pt; 39 - text-align : center; 40 - background : #EEE; 41 - border : 1px solid #BBB; 42 - float : left; 43 - margin : 2px; 44 - padding-top : 2px; 45 - } 46 - 47 - .ponder-question-label { 48 - font-size : 6pt; 49 - } 50 - 51 - h2.ponder-question-title { 52 - font-size : 12pt; 53 - margin : 2px; 54 - padding : 0; 55 - } 56 - 57 - h2.ponder-answer-title { 58 - font-size : 12pt; 59 - margin : 2px; 60 - padding : 0; 61 - } 62 - 63 - .ponder-metadata { 64 - padding-left : 5px; 65 - width : 650px; 66 - float : left; 67 - } 68 - 69 - .ponder-small-metadata { 70 - font-size : 7.5pt; 71 - color : #555; 72 - margin : 0; 73 - text-align : right; 74 - }
-25
webroot/rsrc/css/application/ponder/post.css
··· 1 - /** 2 - * @provides ponder-post-css 3 - */ 4 - 5 - .ponder-post-list { 6 - max-width: 1162px; 7 - } 8 - 9 - .ponder-add-answer-panel { 10 - max-width: 1162px; 11 - } 12 - 13 - .ponder-post-list .anchor-target { 14 - background-color: #ffffdd; 15 - border-color: #ffff00; 16 - } 17 - 18 - .ponder-post-core .phabricator-remarkup .remarkup-code-block { 19 - width: 88ex; 20 - width: 81ch; 21 - } 22 - 23 - .ponder-question { 24 - background: white; 25 - }
+18 -1
webroot/rsrc/css/application/ponder/vote.css webroot/rsrc/css/application/ponder/ponder-view.css
··· 1 1 /** 2 - * @provides ponder-vote-css 2 + * @provides ponder-view-css 3 3 */ 4 4 5 5 .ponder-votable { ··· 40 40 line-height: 20px; 41 41 font-weight: bold; 42 42 } 43 + 44 + .ponder-show-comments { 45 + text-align: center; 46 + padding: 8px; 47 + margin: 0 16px; 48 + float: right; 49 + font-weight: bold; 50 + background: #fff; 51 + border-bottom: 1px solid {$blueborder}; 52 + border-left: 1px solid {$lightblueborder}; 53 + border-right: 1px solid {$lightblueborder}; 54 + } 55 + 56 + .device-desktop .ponder-comments-view { 57 + width: 90%; 58 + margin: 0 auto; 59 + }