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

Summary: Full new UI, testing some upcoming treatments for consideration in other View controllers. Small tweaks to allow PHUITwoColumnView to have fixed and fluid width, and let TransactionCommentView go fullWidth.

Test Plan:
Tested a number of Ponder cases, New Question, with and without summary, with and without answers, with and without comments. Mobile, Tablet, and Desktop layouts. Verify Project and Profile UI's still in tact.

{F1120961}

{F1120962}

{F1120963}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+423 -644
+9 -9
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '7935f211', 10 + 'core.pkg.css' => 'ecdca229', 11 11 'core.pkg.js' => '7d8faf57', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 92 92 'rsrc/css/application/policy/policy-edit.css' => '815c66f7', 93 93 'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43', 94 94 'rsrc/css/application/policy/policy.css' => '957ea14c', 95 - 'rsrc/css/application/ponder/ponder-view.css' => 'b40dc156', 95 + 'rsrc/css/application/ponder/ponder-view.css' => 'fdd4629b', 96 96 'rsrc/css/application/project/project-card-view.css' => '9418c97d', 97 - 'rsrc/css/application/project/project-view.css' => '83bb6654', 97 + 'rsrc/css/application/project/project-view.css' => '298b7c5b', 98 98 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 99 99 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', 100 100 'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd', ··· 134 134 'rsrc/css/phui/phui-fontkit.css' => '9cda225e', 135 135 'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e', 136 136 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 137 - 'rsrc/css/phui/phui-header-view.css' => '50c5cb6a', 137 + 'rsrc/css/phui/phui-header-view.css' => 'a6d7b20d', 138 138 'rsrc/css/phui/phui-hovercard.css' => 'de1a2119', 139 139 'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad', 140 140 'rsrc/css/phui/phui-icon.css' => '3f33ab57', ··· 154 154 'rsrc/css/phui/phui-status.css' => '888cedb8', 155 155 'rsrc/css/phui/phui-tag-view.css' => '9d5d4400', 156 156 'rsrc/css/phui/phui-timeline-view.css' => '2efceff8', 157 - 'rsrc/css/phui/phui-two-column-view.css' => '0763177e', 157 + 'rsrc/css/phui/phui-two-column-view.css' => 'a317616a', 158 158 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7', 159 159 'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647', 160 160 'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96', ··· 818 818 'phui-fontkit-css' => '9cda225e', 819 819 'phui-form-css' => 'aac1d51d', 820 820 'phui-form-view-css' => '4a1a0f5e', 821 - 'phui-header-view-css' => '50c5cb6a', 821 + 'phui-header-view-css' => 'a6d7b20d', 822 822 'phui-hovercard' => '1bd28176', 823 823 'phui-hovercard-view-css' => 'de1a2119', 824 824 'phui-icon-set-selector-css' => '1ab67aad', ··· 841 841 'phui-tag-view-css' => '9d5d4400', 842 842 'phui-theme-css' => '027ba77e', 843 843 'phui-timeline-view-css' => '2efceff8', 844 - 'phui-two-column-view-css' => '0763177e', 844 + 'phui-two-column-view-css' => 'a317616a', 845 845 'phui-workboard-color-css' => 'ac6fe6a7', 846 846 'phui-workboard-view-css' => 'e6d89647', 847 847 'phui-workcard-view-css' => '3646fb96', ··· 855 855 'policy-css' => '957ea14c', 856 856 'policy-edit-css' => '815c66f7', 857 857 'policy-transaction-detail-css' => '82100a43', 858 - 'ponder-view-css' => 'b40dc156', 858 + 'ponder-view-css' => 'fdd4629b', 859 859 'project-card-view-css' => '9418c97d', 860 - 'project-view-css' => '83bb6654', 860 + 'project-view-css' => '298b7c5b', 861 861 'releeph-core' => '9b3c5733', 862 862 'releeph-preview-branch' => 'b7a6f4a5', 863 863 'releeph-request-differential-create-dialog' => '8d8b92cd',
-12
src/__phutil_library_map__.php
··· 3810 3810 'PonderAnswerCommentController' => 'applications/ponder/controller/PonderAnswerCommentController.php', 3811 3811 'PonderAnswerEditController' => 'applications/ponder/controller/PonderAnswerEditController.php', 3812 3812 'PonderAnswerEditor' => 'applications/ponder/editor/PonderAnswerEditor.php', 3813 - 'PonderAnswerHasVotingUserEdgeType' => 'applications/ponder/edge/PonderAnswerHasVotingUserEdgeType.php', 3814 3813 'PonderAnswerHistoryController' => 'applications/ponder/controller/PonderAnswerHistoryController.php', 3815 3814 'PonderAnswerMailReceiver' => 'applications/ponder/mail/PonderAnswerMailReceiver.php', 3816 3815 'PonderAnswerPHIDType' => 'applications/ponder/phid/PonderAnswerPHIDType.php', ··· 3828 3827 'PonderDefaultViewCapability' => 'applications/ponder/capability/PonderDefaultViewCapability.php', 3829 3828 'PonderEditor' => 'applications/ponder/editor/PonderEditor.php', 3830 3829 'PonderFooterView' => 'applications/ponder/view/PonderFooterView.php', 3831 - 'PonderHelpfulSaveController' => 'applications/ponder/controller/PonderHelpfulSaveController.php', 3832 3830 'PonderModerateCapability' => 'applications/ponder/capability/PonderModerateCapability.php', 3833 3831 'PonderQuestion' => 'applications/ponder/storage/PonderQuestion.php', 3834 3832 'PonderQuestionCommentController' => 'applications/ponder/controller/PonderQuestionCommentController.php', ··· 3850 3848 'PonderQuestionViewController' => 'applications/ponder/controller/PonderQuestionViewController.php', 3851 3849 'PonderRemarkupRule' => 'applications/ponder/remarkup/PonderRemarkupRule.php', 3852 3850 'PonderSchemaSpec' => 'applications/ponder/storage/PonderSchemaSpec.php', 3853 - 'PonderVotableInterface' => 'applications/ponder/storage/PonderVotableInterface.php', 3854 - 'PonderVote' => 'applications/ponder/constants/PonderVote.php', 3855 - 'PonderVoteEditor' => 'applications/ponder/editor/PonderVoteEditor.php', 3856 - 'PonderVotingUserHasAnswerEdgeType' => 'applications/ponder/edge/PonderVotingUserHasAnswerEdgeType.php', 3857 3851 'ProjectAddProjectsEmailCommand' => 'applications/project/command/ProjectAddProjectsEmailCommand.php', 3858 3852 'ProjectBoardTaskCard' => 'applications/project/view/ProjectBoardTaskCard.php', 3859 3853 'ProjectCanLockProjectsCapability' => 'applications/project/capability/ProjectCanLockProjectsCapability.php', ··· 8479 8473 'PonderDAO', 8480 8474 'PhabricatorApplicationTransactionInterface', 8481 8475 'PhabricatorMarkupInterface', 8482 - 'PonderVotableInterface', 8483 8476 'PhabricatorPolicyInterface', 8484 8477 'PhabricatorFlaggableInterface', 8485 8478 'PhabricatorSubscribableInterface', ··· 8488 8481 'PonderAnswerCommentController' => 'PonderController', 8489 8482 'PonderAnswerEditController' => 'PonderController', 8490 8483 'PonderAnswerEditor' => 'PonderEditor', 8491 - 'PonderAnswerHasVotingUserEdgeType' => 'PhabricatorEdgeType', 8492 8484 'PonderAnswerHistoryController' => 'PonderController', 8493 8485 'PonderAnswerMailReceiver' => 'PhabricatorObjectMailReceiver', 8494 8486 'PonderAnswerPHIDType' => 'PhabricatorPHIDType', ··· 8506 8498 'PonderDefaultViewCapability' => 'PhabricatorPolicyCapability', 8507 8499 'PonderEditor' => 'PhabricatorApplicationTransactionEditor', 8508 8500 'PonderFooterView' => 'AphrontTagView', 8509 - 'PonderHelpfulSaveController' => 'PonderController', 8510 8501 'PonderModerateCapability' => 'PhabricatorPolicyCapability', 8511 8502 'PonderQuestion' => array( 8512 8503 'PonderDAO', ··· 8540 8531 'PonderQuestionViewController' => 'PonderController', 8541 8532 'PonderRemarkupRule' => 'PhabricatorObjectRemarkupRule', 8542 8533 'PonderSchemaSpec' => 'PhabricatorConfigSchemaSpec', 8543 - 'PonderVote' => 'PonderConstants', 8544 - 'PonderVoteEditor' => 'PhabricatorEditor', 8545 - 'PonderVotingUserHasAnswerEdgeType' => 'PhabricatorEdgeType', 8546 8534 'ProjectAddProjectsEmailCommand' => 'MetaMTAEmailTransactionCommand', 8547 8535 'ProjectBoardTaskCard' => 'Phobject', 8548 8536 'ProjectCanLockProjectsCapability' => 'PhabricatorPolicyCapability',
+1
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
··· 60 60 61 61 $home = id(new PHUITwoColumnView()) 62 62 ->setHeader($header) 63 + ->setFluid(true) 63 64 ->addClass('project-view-home') 64 65 ->setMainColumn( 65 66 array(
-2
src/applications/ponder/application/PhabricatorPonderApplication.php
··· 49 49 => 'PonderAnswerCommentController', 50 50 'answer/history/(?P<id>\d+)/' 51 51 => 'PonderAnswerHistoryController', 52 - 'answer/helpful/(?P<action>add|remove)/(?P<id>[1-9]\d*)/' 53 - => 'PonderHelpfulSaveController', 54 52 'question/edit/(?:(?P<id>\d+)/)?' 55 53 => 'PonderQuestionEditController', 56 54 'question/create/'
-8
src/applications/ponder/constants/PonderVote.php
··· 1 - <?php 2 - 3 - final class PonderVote extends PonderConstants { 4 - 5 - const VOTE_UP = 1; 6 - const VOTE_NONE = 0; 7 - 8 - }
-60
src/applications/ponder/controller/PonderHelpfulSaveController.php
··· 1 - <?php 2 - 3 - final class PonderHelpfulSaveController extends PonderController { 4 - 5 - public function handleRequest(AphrontRequest $request) { 6 - $viewer = $request->getViewer(); 7 - $id = $request->getURIData('id'); 8 - $action = $request->getURIData('action'); 9 - 10 - $answer = id(new PonderAnswerQuery()) 11 - ->setViewer($viewer) 12 - ->withIDs(array($id)) 13 - ->needViewerVotes(true) 14 - ->executeOne(); 15 - 16 - if (!$answer) { 17 - return new Aphront404Response(); 18 - } 19 - 20 - $edit_uri = '/Q'.$answer->getQuestionID(); 21 - 22 - switch ($action) { 23 - case 'add': 24 - $newvote = PonderVote::VOTE_UP; 25 - break; 26 - case 'remove': 27 - $newvote = PonderVote::VOTE_NONE; 28 - break; 29 - } 30 - 31 - if ($request->isFormPost()) { 32 - 33 - $editor = id(new PonderVoteEditor()) 34 - ->setVotable($answer) 35 - ->setActor($viewer) 36 - ->setVote($newvote) 37 - ->saveVote(); 38 - 39 - return id(new AphrontRedirectResponse())->setURI($edit_uri); 40 - } 41 - 42 - if ($action == 'add') { 43 - $title = pht('Mark Answer as Helpful?'); 44 - $body = pht('This answer will be marked as helpful.'); 45 - $button = pht('Mark Helpful'); 46 - } else { 47 - $title = pht('Remove Helpful From Answer?'); 48 - $body = pht('This answer will no longer be marked as helpful.'); 49 - $button = pht('Remove Helpful'); 50 - } 51 - 52 - $dialog = $this->newDialog(); 53 - $dialog->setTitle($title); 54 - $dialog->appendChild($body); 55 - $dialog->addCancelButton($edit_uri); 56 - $dialog->addSubmitButton($button); 57 - 58 - return id(new AphrontDialogResponse())->setDialog($dialog); 59 - } 60 - }
+165 -75
src/applications/ponder/controller/PonderQuestionViewController.php
··· 31 31 $header->setHeader($question->getTitle()); 32 32 $header->setUser($viewer); 33 33 $header->setPolicyObject($question); 34 + $header->setProfileHeader(true); 34 35 35 36 if ($question->getStatus() == PonderQuestionStatus::STATUS_OPEN) { 36 37 $header->setStatus('fa-square-o', 'bluegrey', pht('Open')); ··· 43 44 } 44 45 45 46 $actions = $this->buildActionListView($question); 46 - $properties = $this->buildPropertyListView($question, $actions); 47 + $properties = $this->buildPropertyListView($question); 48 + $details = $this->buildDetailsPropertyView($question); 49 + 50 + $can_edit = PhabricatorPolicyFilter::hasCapability( 51 + $viewer, 52 + $question, 53 + PhabricatorPolicyCapability::CAN_EDIT); 54 + 55 + $edit_uri = '/question/edit/'.$question->getID().'/'; 56 + $edit_button = id(new PHUIButtonView()) 57 + ->setTag('a') 58 + ->setText(pht('Edit')) 59 + ->setHref($this->getApplicationURI($edit_uri)) 60 + ->setIcon('fa-pencil') 61 + ->setDisabled(!$can_edit) 62 + ->setWorkflow(!$can_edit); 63 + 64 + $action_button = id(new PHUIButtonView()) 65 + ->setTag('a') 66 + ->setText(pht('Actions')) 67 + ->setHref('#') 68 + ->setIcon('fa-bars') 69 + ->setDropdownMenu($actions); 70 + 71 + $header->addActionLink($action_button); 72 + $header->addActionLink($edit_button); 47 73 48 74 $content_id = celerity_generate_unique_node_id(); 49 75 $timeline = $this->buildTransactionTimeline( ··· 55 81 $add_comment = id(new PhabricatorApplicationTransactionCommentView()) 56 82 ->setUser($viewer) 57 83 ->setObjectPHID($question->getPHID()) 84 + ->setFullWidth(true) 58 85 ->setShowPreview(false) 59 - ->setHeaderText(pht('Question Comment')) 60 86 ->setAction($this->getApplicationURI("/question/comment/{$id}/")) 61 87 ->setSubmitButtonName(pht('Comment')); 62 88 89 + $add_comment = phutil_tag_div( 90 + 'ponder-question-add-comment-view', $add_comment); 91 + 63 92 $comment_view = phutil_tag( 64 93 'div', 65 94 array( ··· 75 104 ->setContentID($content_id) 76 105 ->setCount(count($xactions)); 77 106 78 - $object_box = id(new PHUIObjectBoxView()) 79 - ->setHeader($header) 80 - ->addPropertyList($properties) 81 - ->appendChild($footer); 82 - 83 107 $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView()); 84 108 $crumbs->addTextCrumb('Q'.$id, '/Q'.$id); 109 + $crumbs->setBorder(true); 85 110 86 111 $answer_wiki = null; 87 112 if ($question->getAnswerWiki()) { 88 - $answer = phutil_tag_div('mlt mlb msr msl', $question->getAnswerWiki()); 113 + $wiki = new PHUIRemarkupView($viewer, $question->getAnswerWiki()); 114 + $wiki_header = phutil_tag( 115 + 'div', 116 + array( 117 + 'class' => 'ponder-answer-wiki-header', 118 + ), 119 + pht('Answer Summary')); 120 + 89 121 $answer_wiki = id(new PHUIObjectBoxView()) 90 - ->setHeaderText(pht('Answer Summary')) 91 - ->setColor(PHUIObjectBoxView::COLOR_BLUE) 92 - ->appendChild($answer); 122 + ->setBackground(PHUIObjectBoxView::BLUE) 123 + ->appendChild($wiki_header) 124 + ->appendChild($wiki) 125 + ->addClass('ponder-answer-wiki'); 93 126 } 94 127 95 - return $this->buildApplicationPage( 128 + require_celerity_resource('ponder-view-css'); 129 + 130 + $ponder_content = phutil_tag( 131 + 'div', 96 132 array( 97 - $crumbs, 98 - $object_box, 133 + 'class' => 'ponder-question-content', 134 + ), 135 + array( 136 + $details, 137 + $footer, 99 138 $comment_view, 100 139 $answer_wiki, 101 140 $answers, 102 141 $answer_add_panel, 103 - ), 104 - array( 105 - 'title' => 'Q'.$question->getID().' '.$question->getTitle(), 106 - 'pageObjects' => array_merge( 107 - array($question->getPHID()), 108 - mpull($question->getAnswers(), 'getPHID')), 109 142 )); 143 + 144 + $ponder_view = id(new PHUITwoColumnView()) 145 + ->setHeader($header) 146 + ->setMainColumn($ponder_content) 147 + ->setSideColumn($properties) 148 + ->addClass('ponder-question-view'); 149 + 150 + $page_objects = array_merge( 151 + array($question->getPHID()), 152 + mpull($question->getAnswers(), 'getPHID')); 153 + 154 + return $this->newPage() 155 + ->setTitle('Q'.$question->getID().' '.$question->getTitle()) 156 + ->setCrumbs($crumbs) 157 + ->setPageObjectPHIDs($page_objects) 158 + ->appendChild( 159 + array( 160 + $ponder_view, 161 + )); 110 162 } 111 163 112 164 private function buildActionListView(PonderQuestion $question) { ··· 123 175 ->setUser($viewer) 124 176 ->setObject($question); 125 177 126 - $view->addAction( 127 - id(new PhabricatorActionView()) 128 - ->setIcon('fa-pencil') 129 - ->setName(pht('Edit Question')) 130 - ->setHref($this->getApplicationURI("/question/edit/{$id}/")) 131 - ->setDisabled(!$can_edit) 132 - ->setWorkflow(!$can_edit)); 133 - 134 178 if ($question->getStatus() == PonderQuestionStatus::STATUS_OPEN) { 135 179 $name = pht('Close Question'); 136 180 $icon = 'fa-check-square-o'; ··· 157 201 } 158 202 159 203 private function buildPropertyListView( 160 - PonderQuestion $question, 161 - PhabricatorActionListView $actions) { 204 + PonderQuestion $question) { 162 205 163 206 $viewer = $this->getViewer(); 164 207 $view = id(new PHUIPropertyListView()) 165 208 ->setUser($viewer) 166 209 ->setObject($question) 167 - ->setActionList($actions); 210 + ->setStacked(true); 168 211 169 - $view->addProperty( 170 - pht('Author'), 171 - $viewer->renderHandle($question->getAuthorPHID())); 212 + $view->invokeWillRenderEvent(); 172 213 173 - $view->addProperty( 174 - pht('Created'), 175 - phabricator_datetime($question->getDateCreated(), $viewer)); 214 + if (!$view->hasAnyProperties()) { 215 + return null; 216 + } 176 217 177 - $view->invokeWillRenderEvent(); 218 + $view = id(new PHUIObjectBoxView()) 219 + ->appendChild($view) 220 + ->setBackground(PHUIObjectBoxView::GREY) 221 + ->addClass('ponder-view-properties'); 178 222 179 - $details = PhabricatorMarkupEngine::renderOneObject( 180 - $question, 181 - $question->getMarkupField(), 182 - $viewer); 223 + return $view; 224 + } 183 225 184 - if ($details) { 185 - $view->addSectionHeader( 186 - pht('Details'), 187 - PHUIPropertyListView::ICON_SUMMARY); 226 + private function buildDetailsPropertyView( 227 + PonderQuestion $question) { 228 + $viewer = $this->getViewer(); 188 229 189 - $view->addTextContent( 190 - array( 191 - phutil_tag( 192 - 'div', 193 - array( 194 - 'class' => 'phabricator-remarkup', 195 - ), 196 - $details), 197 - )); 230 + $question_details = PhabricatorMarkupEngine::renderOneObject( 231 + $question, 232 + $question->getMarkupField(), 233 + $viewer); 234 + 235 + if (!$question_details) { 236 + $question_details = phutil_tag( 237 + 'em', 238 + array(), 239 + pht('No further details for this question.')); 198 240 } 199 241 200 - return $view; 242 + $asker = $viewer->renderHandle($question->getAuthorPHID())->render(); 243 + $date = phabricator_datetime($question->getDateCreated(), $viewer); 244 + $asker = phutil_tag('strong', array(), $asker); 245 + 246 + $author = id(new PhabricatorPeopleQuery()) 247 + ->setViewer($viewer) 248 + ->withPHIDs(array($question->getAuthorPHID())) 249 + ->needProfileImage(true) 250 + ->executeOne(); 251 + 252 + $image_uri = $author->getProfileImageURI(); 253 + $image_href = '/p/'.$author->getUsername(); 254 + 255 + $image = phutil_tag( 256 + 'a', 257 + array( 258 + 'class' => 'ponder-details-author-image', 259 + 'style' => 'background-image: url('.$image_uri.');', 260 + 'href' => $image_href, 261 + )); 262 + 263 + $details_header = phutil_tag( 264 + 'div', 265 + array( 266 + 'class' => 'ponder-details-subtitle', 267 + ), 268 + array( 269 + $image, 270 + pht('Asked by %s on %s.', $asker, $date), 271 + )); 272 + 273 + $details = phutil_tag( 274 + 'div', 275 + array( 276 + 'class' => 'ponder-detail-view', 277 + ), 278 + array( 279 + $details_header, 280 + phutil_tag_div('phabricator-remarkup', $question_details), 281 + )); 282 + 283 + 284 + return $details; 201 285 } 202 286 203 287 /** ··· 211 295 $viewer = $this->getViewer(); 212 296 $answers = $question->getAnswers(); 213 297 214 - $author_phids = mpull($answers, 'getAuthorPHID'); 215 - $handles = $this->loadViewerHandles($author_phids); 216 - $answers_sort = array_reverse(msort($answers, 'getVoteCount')); 298 + if ($answers) { 299 + $author_phids = mpull($answers, 'getAuthorPHID'); 300 + $handles = $this->loadViewerHandles($author_phids); 217 301 218 - $view = array(); 219 - foreach ($answers_sort as $answer) { 220 - $id = $answer->getID(); 221 - $handle = $handles[$answer->getAuthorPHID()]; 302 + $view = array(); 303 + foreach ($answers as $answer) { 304 + $id = $answer->getID(); 305 + $handle = $handles[$answer->getAuthorPHID()]; 222 306 223 - $timeline = $this->buildTransactionTimeline( 224 - $answer, 225 - id(new PonderAnswerTransactionQuery()) 226 - ->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))); 227 - $xactions = $timeline->getTransactions(); 307 + $timeline = $this->buildTransactionTimeline( 308 + $answer, 309 + id(new PonderAnswerTransactionQuery()) 310 + ->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT))); 311 + $xactions = $timeline->getTransactions(); 228 312 229 313 230 - $view[] = id(new PonderAnswerView()) 231 - ->setUser($viewer) 232 - ->setAnswer($answer) 233 - ->setTransactions($xactions) 234 - ->setTimeline($timeline) 235 - ->setHandle($handle); 314 + $view[] = id(new PonderAnswerView()) 315 + ->setUser($viewer) 316 + ->setAnswer($answer) 317 + ->setTransactions($xactions) 318 + ->setTimeline($timeline) 319 + ->setHandle($handle); 320 + 321 + } 236 322 323 + $header = id(new PHUIHeaderView()) 324 + ->setHeader('Answers'); 325 + return array($header, $view); 237 326 } 238 327 239 - return $view; 328 + return null; 329 + 240 330 } 241 331 242 332 }
-105
src/applications/ponder/edge/PonderAnswerHasVotingUserEdgeType.php
··· 1 - <?php 2 - 3 - final class PonderAnswerHasVotingUserEdgeType extends PhabricatorEdgeType { 4 - 5 - const EDGECONST = 19; 6 - 7 - public function shouldWriteInverseTransactions() { 8 - return true; 9 - } 10 - 11 - public function getInverseEdgeConstant() { 12 - return PonderVotingUserHasAnswerEdgeType::EDGECONST; 13 - } 14 - 15 - public function getTransactionAddString( 16 - $actor, 17 - $add_count, 18 - $add_edges) { 19 - 20 - return pht( 21 - '%s added %s voting user(s): %s.', 22 - $actor, 23 - $add_count, 24 - $add_edges); 25 - } 26 - 27 - public function getTransactionRemoveString( 28 - $actor, 29 - $rem_count, 30 - $rem_edges) { 31 - 32 - return pht( 33 - '%s removed %s voting user(s): %s.', 34 - $actor, 35 - $rem_count, 36 - $rem_edges); 37 - } 38 - 39 - public function getTransactionEditString( 40 - $actor, 41 - $total_count, 42 - $add_count, 43 - $add_edges, 44 - $rem_count, 45 - $rem_edges) { 46 - 47 - return pht( 48 - '%s edited %s voting user(s), added %s: %s; removed %s: %s.', 49 - $actor, 50 - $total_count, 51 - $add_count, 52 - $add_edges, 53 - $rem_count, 54 - $rem_edges); 55 - } 56 - 57 - public function getFeedAddString( 58 - $actor, 59 - $object, 60 - $add_count, 61 - $add_edges) { 62 - 63 - return pht( 64 - '%s added %s voting user(s) to %s: %s.', 65 - $actor, 66 - $add_count, 67 - $object, 68 - $add_edges); 69 - } 70 - 71 - public function getFeedRemoveString( 72 - $actor, 73 - $object, 74 - $rem_count, 75 - $rem_edges) { 76 - 77 - return pht( 78 - '%s removed %s voting user(s) from %s: %s.', 79 - $actor, 80 - $rem_count, 81 - $object, 82 - $rem_edges); 83 - } 84 - 85 - public function getFeedEditString( 86 - $actor, 87 - $object, 88 - $total_count, 89 - $add_count, 90 - $add_edges, 91 - $rem_count, 92 - $rem_edges) { 93 - 94 - return pht( 95 - '%s edited %s voting user(s) for %s, added %s: %s; removed %s: %s.', 96 - $actor, 97 - $total_count, 98 - $object, 99 - $add_count, 100 - $add_edges, 101 - $rem_count, 102 - $rem_edges); 103 - } 104 - 105 - }
-105
src/applications/ponder/edge/PonderVotingUserHasAnswerEdgeType.php
··· 1 - <?php 2 - 3 - final class PonderVotingUserHasAnswerEdgeType extends PhabricatorEdgeType { 4 - 5 - const EDGECONST = 20; 6 - 7 - public function shouldWriteInverseTransactions() { 8 - return true; 9 - } 10 - 11 - public function getInverseEdgeConstant() { 12 - return PonderAnswerHasVotingUserEdgeType::EDGECONST; 13 - } 14 - 15 - public function getTransactionAddString( 16 - $actor, 17 - $add_count, 18 - $add_edges) { 19 - 20 - return pht( 21 - '%s added %s answer(s): %s.', 22 - $actor, 23 - $add_count, 24 - $add_edges); 25 - } 26 - 27 - public function getTransactionRemoveString( 28 - $actor, 29 - $rem_count, 30 - $rem_edges) { 31 - 32 - return pht( 33 - '%s removed %s answer(s): %s.', 34 - $actor, 35 - $rem_count, 36 - $rem_edges); 37 - } 38 - 39 - public function getTransactionEditString( 40 - $actor, 41 - $total_count, 42 - $add_count, 43 - $add_edges, 44 - $rem_count, 45 - $rem_edges) { 46 - 47 - return pht( 48 - '%s edited %s answer(s), added %s: %s; removed %s: %s.', 49 - $actor, 50 - $total_count, 51 - $add_count, 52 - $add_edges, 53 - $rem_count, 54 - $rem_edges); 55 - } 56 - 57 - public function getFeedAddString( 58 - $actor, 59 - $object, 60 - $add_count, 61 - $add_edges) { 62 - 63 - return pht( 64 - '%s added %s answer(s) to %s: %s.', 65 - $actor, 66 - $add_count, 67 - $object, 68 - $add_edges); 69 - } 70 - 71 - public function getFeedRemoveString( 72 - $actor, 73 - $object, 74 - $rem_count, 75 - $rem_edges) { 76 - 77 - return pht( 78 - '%s removed %s answer(s) from %s: %s.', 79 - $actor, 80 - $rem_count, 81 - $object, 82 - $rem_edges); 83 - } 84 - 85 - public function getFeedEditString( 86 - $actor, 87 - $object, 88 - $total_count, 89 - $add_count, 90 - $add_edges, 91 - $rem_count, 92 - $rem_edges) { 93 - 94 - return pht( 95 - '%s edited %s answer(s) for %s, added %s: %s; removed %s: %s.', 96 - $actor, 97 - $total_count, 98 - $object, 99 - $add_count, 100 - $add_edges, 101 - $rem_count, 102 - $rem_edges); 103 - } 104 - 105 - }
-77
src/applications/ponder/editor/PonderVoteEditor.php
··· 1 - <?php 2 - 3 - final class PonderVoteEditor extends PhabricatorEditor { 4 - 5 - private $answer; 6 - private $votable; 7 - private $anwer; 8 - private $vote; 9 - 10 - public function setAnswer($answer) { 11 - $this->answer = $answer; 12 - return $this; 13 - } 14 - 15 - public function setVotable($votable) { 16 - $this->votable = $votable; 17 - return $this; 18 - } 19 - 20 - public function setVote($vote) { 21 - $this->vote = $vote; 22 - return $this; 23 - } 24 - 25 - public function saveVote() { 26 - $actor = $this->requireActor(); 27 - if (!$this->votable) { 28 - throw new PhutilInvalidStateException('setVotable'); 29 - } 30 - 31 - $votable = $this->votable; 32 - $newvote = $this->vote; 33 - 34 - // prepare vote add, or update if this user is amending an 35 - // earlier vote 36 - $editor = id(new PhabricatorEdgeEditor()) 37 - ->addEdge( 38 - $actor->getPHID(), 39 - $votable->getUserVoteEdgeType(), 40 - $votable->getVotablePHID(), 41 - array('data' => $newvote)) 42 - ->removeEdge( 43 - $actor->getPHID(), 44 - $votable->getUserVoteEdgeType(), 45 - $votable->getVotablePHID()); 46 - 47 - $conn = $votable->establishConnection('w'); 48 - $trans = $conn->openTransaction(); 49 - $trans->beginReadLocking(); 50 - 51 - $votable->reload(); 52 - $curvote = (int)PhabricatorEdgeQuery::loadSingleEdgeData( 53 - $actor->getPHID(), 54 - $votable->getUserVoteEdgeType(), 55 - $votable->getVotablePHID()); 56 - 57 - if (!$curvote) { 58 - $curvote = PonderVote::VOTE_NONE; 59 - } 60 - 61 - // Adjust votable's score by this much. 62 - $delta = $newvote - $curvote; 63 - 64 - queryfx($conn, 65 - 'UPDATE %T as t 66 - SET t.voteCount = t.voteCount + %d 67 - WHERE t.PHID = %s', 68 - $votable->getTableName(), 69 - $delta, 70 - $votable->getVotablePHID()); 71 - 72 - $editor->save(); 73 - 74 - $trans->endReadLocking(); 75 - $trans->saveTransaction(); 76 - } 77 - }
-27
src/applications/ponder/query/PonderAnswerQuery.php
··· 8 8 private $authorPHIDs; 9 9 private $questionIDs; 10 10 11 - private $needViewerVotes; 12 - 13 - 14 11 public function withIDs(array $ids) { 15 12 $this->ids = $ids; 16 13 return $this; ··· 28 25 29 26 public function withQuestionIDs(array $ids) { 30 27 $this->questionIDs = $ids; 31 - return $this; 32 - } 33 - 34 - public function needViewerVotes($need_viewer_votes) { 35 - $this->needViewerVotes = $need_viewer_votes; 36 28 return $this; 37 29 } 38 30 ··· 84 76 continue; 85 77 } 86 78 $answer->attachQuestion($question); 87 - } 88 - 89 - if ($this->needViewerVotes) { 90 - $viewer_phid = $this->getViewer()->getPHID(); 91 - 92 - $etype = PonderAnswerHasVotingUserEdgeType::EDGECONST; 93 - $edges = id(new PhabricatorEdgeQuery()) 94 - ->withSourcePHIDs(mpull($answers, 'getPHID')) 95 - ->withDestinationPHIDs(array($viewer_phid)) 96 - ->withEdgeTypes(array($etype)) 97 - ->needEdgeData(true) 98 - ->execute(); 99 - foreach ($answers as $answer) { 100 - $user_edge = idx( 101 - $edges[$answer->getPHID()][$etype], 102 - $viewer_phid, 103 - array()); 104 - $answer->attachUserVote($viewer_phid, idx($user_edge, 'data', 0)); 105 - } 106 79 } 107 80 108 81 return $answers;
-1
src/applications/ponder/query/PonderQuestionQuery.php
··· 98 98 $aquery = id(new PonderAnswerQuery()) 99 99 ->setViewer($this->getViewer()) 100 100 ->setOrderVector(array('-id')) 101 - ->needViewerVotes(true) 102 101 ->withQuestionIDs(mpull($questions, 'getID')); 103 102 104 103 $answers = $aquery->execute();
+1 -32
src/applications/ponder/storage/PonderAnswer.php
··· 4 4 implements 5 5 PhabricatorApplicationTransactionInterface, 6 6 PhabricatorMarkupInterface, 7 - PonderVotableInterface, 8 7 PhabricatorPolicyInterface, 9 8 PhabricatorFlaggableInterface, 10 9 PhabricatorSubscribableInterface, ··· 18 17 protected $content; 19 18 protected $mailKey; 20 19 protected $status; 21 - protected $voteCount; 22 20 23 - private $vote; 24 21 private $question = self::ATTACHABLE; 25 22 private $comments; 26 23 27 - private $userVotes = array(); 28 - 29 24 public static function initializeNewAnswer( 30 25 PhabricatorUser $actor, 31 26 PonderQuestion $question) { ··· 39 34 ->setContent('') 40 35 ->attachQuestion($question) 41 36 ->setAuthorPHID($actor->getPHID()) 42 - ->setVoteCount(0) 37 + ->setVoteCount('0') 43 38 ->setStatus(PonderAnswerStatus::ANSWER_STATUS_VISIBLE); 44 39 45 40 } ··· 55 50 56 51 public function getURI() { 57 52 return '/Q'.$this->getQuestionID().'#A'.$this->getID(); 58 - } 59 - 60 - public function setUserVote($vote) { 61 - $this->vote = $vote['data']; 62 - if (!$this->vote) { 63 - $this->vote = PonderVote::VOTE_NONE; 64 - } 65 - return $this; 66 - } 67 - 68 - public function attachUserVote($user_phid, $vote) { 69 - $this->vote = $vote; 70 - return $this; 71 - } 72 - 73 - public function getUserVote() { 74 - return $this->vote; 75 53 } 76 54 77 55 public function setComments($comments) { ··· 179 157 180 158 public function shouldUseMarkupCache($field) { 181 159 return (bool)$this->getID(); 182 - } 183 - 184 - // votable interface 185 - public function getUserVoteEdgeType() { 186 - return PonderVotingUserHasAnswerEdgeType::EDGECONST; 187 - } 188 - 189 - public function getVotablePHID() { 190 - return $this->getPHID(); 191 160 } 192 161 193 162
-8
src/applications/ponder/storage/PonderVotableInterface.php
··· 1 - <?php 2 - 3 - interface PonderVotableInterface { 4 - 5 - public function getUserVoteEdgeType(); 6 - public function getVotablePHID(); 7 - 8 - }
+7 -41
src/applications/ponder/view/PonderAddAnswerView.php
··· 42 42 } 43 43 44 44 $box_style = null; 45 - $own_question = null; 46 - $hide_action_id = celerity_generate_unique_node_id(); 47 - $show_action_id = celerity_generate_unique_node_id(); 48 - if ($question->getAuthorPHID() == $viewer->getPHID()) { 49 - $box_style = 'display: none;'; 50 - $open_link = javelin_tag( 51 - 'a', 52 - array( 53 - 'sigil' => 'reveal-content', 54 - 'class' => 'mml', 55 - 'id' => $hide_action_id, 56 - 'href' => '#', 57 - 'meta' => array( 58 - 'showIDs' => array($show_action_id), 59 - 'hideIDs' => array($hide_action_id), 60 - ), 61 - ), 62 - pht('Add an answer.')); 63 - $own_question = id(new PHUIInfoView()) 64 - ->setSeverity(PHUIInfoView::SEVERITY_WARNING) 65 - ->setID($hide_action_id) 66 - ->appendChild( 67 - pht( 68 - 'This is your own question. You are welcome to provide 69 - an answer if you have found a resolution.')) 70 - ->appendChild($open_link); 71 - } 72 - 73 45 $header = id(new PHUIHeaderView()) 74 - ->setHeader(pht('Add Answer')); 46 + ->setHeader(pht('New Answer')) 47 + ->addClass('ponder-add-answer-header'); 75 48 76 49 $form = new AphrontFormView(); 77 50 $form 78 51 ->setUser($this->user) 79 52 ->setAction($this->actionURI) 80 53 ->setWorkflow(true) 54 + ->setFullWidth(true) 81 55 ->addHiddenInput('question_id', $question->getID()) 82 56 ->appendChild( 83 57 id(new PhabricatorRemarkupControl()) ··· 103 77 } 104 78 105 79 $box = id(new PHUIObjectBoxView()) 106 - ->setHeader($header) 107 - ->appendChild($form); 80 + ->appendChild($form) 81 + ->setBackground(PHUIObjectBoxView::GREY) 82 + ->addClass('ponder-add-answer-view'); 108 83 109 84 if ($info_panel) { 110 85 $box->setInfoView($info_panel); 111 86 } 112 87 113 - $box = phutil_tag( 114 - 'div', 115 - array( 116 - 'style' => $box_style, 117 - 'class' => 'mlt', 118 - 'id' => $show_action_id, 119 - ), 120 - $box); 121 - 122 - return array($own_question, $box); 88 + return array($header, $box); 123 89 } 124 90 }
+6 -40
src/applications/ponder/view/PonderAnswerView.php
··· 95 95 $content = phutil_tag( 96 96 'div', 97 97 array( 98 - 'class' => 'phabricator-remarkup mlt mlb msr msl', 98 + 'class' => 'phabricator-remarkup', 99 99 ), 100 100 PhabricatorMarkupEngine::renderOneObject( 101 101 $answer, ··· 110 110 ->setContentID($content_id) 111 111 ->setCount(count($this->transactions)); 112 112 113 - $votes = $answer->getVoteCount(); 114 - $vote_class = null; 115 - if ($votes > 0) { 116 - $vote_class = 'ponder-footer-action-helpful'; 117 - } 118 - $icon = id(new PHUIIconView()) 119 - ->setIcon('fa-thumbs-up msr'); 120 - $helpful = phutil_tag( 121 - 'span', 122 - array( 123 - 'class' => 'ponder-footer-action '.$vote_class, 124 - ), 125 - array($icon, $votes)); 126 - $footer->addAction($helpful); 113 + $content = phutil_tag_div( 114 + 'ponder-answer-content', array($anchor, $content, $footer)); 127 115 128 116 $answer_view = id(new PHUIObjectBoxView()) 129 117 ->setHeader($header) 130 - ->appendChild($anchor) 131 - ->appendChild($content) 132 - ->appendChild($footer); 118 + ->setBackground(PHUIObjectBoxView::GREY) 119 + ->addClass('ponder-answer') 120 + ->appendChild($content); 133 121 134 122 $comment_view = id(new PhabricatorApplicationTransactionCommentView()) 135 123 ->setUser($viewer) ··· 169 157 $view = id(new PhabricatorActionListView()) 170 158 ->setUser($viewer) 171 159 ->setObject($answer); 172 - 173 - $user_marked = $answer->getUserVote(); 174 - $can_vote = $viewer->isLoggedIn(); 175 - 176 - if ($user_marked) { 177 - $helpful_uri = "/ponder/answer/helpful/remove/{$id}/"; 178 - $helpful_icon = 'fa-times'; 179 - $helpful_text = pht('Remove Helpful'); 180 - } else { 181 - $helpful_uri = "/ponder/answer/helpful/add/{$id}/"; 182 - $helpful_icon = 'fa-thumbs-up'; 183 - $helpful_text = pht('Mark as Helpful'); 184 - } 185 - 186 - $view->addAction( 187 - id(new PhabricatorActionView()) 188 - ->setIcon($helpful_icon) 189 - ->setName($helpful_text) 190 - ->setHref($helpful_uri) 191 - ->setRenderAsForm(true) 192 - ->setDisabled(!$can_vote) 193 - ->setWorkflow($can_vote)); 194 160 195 161 $view->addAction( 196 162 id(new PhabricatorActionView())
+2 -6
src/applications/ponder/view/PonderFooterView.php
··· 36 36 $content_id = $this->contentID; 37 37 38 38 if ($this->count == 0) { 39 - $icon = id(new PHUIIconView()) 40 - ->setIcon('fa-comments msr'); 41 39 $text = pht('Add a Comment'); 42 40 } else { 43 - $icon = id(new PHUIIconView()) 44 - ->setIcon('fa-comments msr'); 45 41 $text = pht('Show %d Comment(s)', new PhutilNumber($this->count)); 46 42 } 47 43 ··· 58 54 'hideIDs' => array($hide_action_id), 59 55 ), 60 56 ), 61 - array($icon, $text)); 57 + array($text)); 62 58 63 59 $show_action = javelin_tag( 64 60 'a', ··· 73 69 'hideIDs' => array($content_id, $show_action_id), 74 70 ), 75 71 ), 76 - array($icon, pht('Hide Comments'))); 72 + array(pht('Hide Comments'))); 77 73 78 74 $actions[] = $hide_action; 79 75 $actions[] = $show_action;
+1
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 87 87 88 88 $home = id(new PHUITwoColumnView()) 89 89 ->setHeader($header) 90 + ->setFluid(true) 90 91 ->addClass('project-view-home') 91 92 ->setMainColumn( 92 93 array(
+7
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
··· 19 19 private $objectPHID; 20 20 private $headerText; 21 21 private $noPermission; 22 + private $fullWidth; 22 23 23 24 private $currentVersion; 24 25 private $versionedDraft; ··· 99 100 100 101 public function setHeaderText($text) { 101 102 $this->headerText = $text; 103 + return $this; 104 + } 105 + 106 + public function setFullWidth($fw) { 107 + $this->fullWidth = $fw; 102 108 return $this; 103 109 } 104 110 ··· 209 215 ->setUser($this->getUser()) 210 216 ->addSigil('transaction-append') 211 217 ->setWorkflow(true) 218 + ->setFullWidth($this->fullWidth) 212 219 ->setMetadata( 213 220 array( 214 221 'objectPHID' => $this->getObjectPHID(),
+20 -2
src/view/phui/PHUITwoColumnView.php
··· 5 5 private $mainColumn; 6 6 private $sideColumn; 7 7 private $display; 8 + private $fluid; 8 9 private $header; 9 10 10 11 const DISPLAY_LEFT = 'phui-side-column-left'; ··· 22 23 23 24 public function setHeader(PHUIHeaderView $header) { 24 25 $this->header = $header; 26 + return $this; 27 + } 28 + 29 + public function setFluid($fluid) { 30 + $this->fluid = $fluid; 25 31 return $this; 26 32 } 27 33 ··· 30 36 return $this; 31 37 } 32 38 33 - public function getDisplay() { 39 + private function getDisplay() { 34 40 if ($this->display) { 35 41 return $this->display; 36 42 } else { ··· 43 49 $classes[] = 'phui-two-column-view'; 44 50 $classes[] = $this->getDisplay(); 45 51 52 + if ($this->fluid) { 53 + $classes[] = 'phui-two-column-fluid'; 54 + } 55 + 46 56 return array( 47 57 'class' => implode(' ', $classes), 48 58 ); ··· 79 89 $header = phutil_tag_div('phui-two-column-header', $this->header); 80 90 } 81 91 82 - return array($header, $table); 92 + return phutil_tag( 93 + 'div', 94 + array( 95 + 'class' => 'phui-two-column-container', 96 + ), 97 + array( 98 + $header, 99 + $table, 100 + )); 83 101 } 84 102 }
+176 -30
webroot/rsrc/css/application/ponder/ponder-view.css
··· 2 2 * @provides ponder-view-css 3 3 */ 4 4 5 - .ponder-show-comments { 6 - text-align: center; 7 - padding: 8px; 5 + .ponder-question-view { 6 + background: #fff; 7 + padding-bottom: 64px; 8 + } 9 + 10 + .device-desktop .ponder-question-view.phui-two-column-view .phui-side-column { 11 + width: 300px; 12 + } 13 + 14 + .ponder-question-view .phui-object-box, 15 + .ponder-question-view .phui-info-view { 16 + margin-left: 0; 17 + margin-right: 0; 18 + } 19 + 20 + .device-phone .ponder-question-view .phui-profile-header.phui-header-shell 21 + .phui-header-header { 22 + font-size: 20px; 23 + } 24 + 25 + .ponder-question-container { 26 + border-top: 1px solid {$thinblueborder}; 27 + } 28 + 29 + .ponder-question-content { 30 + margin: 0 24px; 31 + padding: 24px 0; 32 + border-top: 1px solid rgba({$alphagrey}, .15); 33 + } 34 + 35 + .device-phone .ponder-question-content { 8 36 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}; 37 + } 38 + 39 + .device .ponder-view-properties { 40 + border-left: none; 41 + border-right: none; 42 + border-radius: 0; 43 + } 44 + 45 + .device .ponder-question-view .phui-timeline-view, 46 + .device .ponder-question-view .phui-timeline-event-view { 47 + margin: 0; 48 + padding: 0; 49 + } 50 + 51 + .ponder-view-properties .phui-property-list-container { 52 + margin: 0; 53 + padding: 0; 54 + } 55 + 56 + .ponder-question-view .phui-document-container { 57 + border: none; 58 + } 59 + 60 + .ponder-view-properties .phui-property-list-stacked 61 + .phui-property-list-properties .phui-property-list-key { 62 + padding: 0; 63 + } 64 + 65 + .ponder-view-properties .phui-property-list-stacked 66 + .phui-property-list-properties .phui-property-list-value { 67 + margin-bottom: 16px; 68 + padding: 0; 69 + } 70 + 71 + .phui-box.ponder-answer-wiki { 72 + padding: 16px; 73 + margin: 24px 0; 74 + } 75 + 76 + .ponder-details-subtitle { 77 + height: 24px; 78 + line-height: 24px; 79 + margin-bottom: 12px; 80 + color: {$greytext}; 81 + position: relative; 82 + padding-left: 32px; 83 + } 84 + 85 + .ponder-details-subtitle a { 86 + color: {$darkgreytext}; 87 + } 88 + 89 + .ponder-details-author-image { 90 + height: 24px; 91 + width: 24px; 92 + background-size: 100%; 93 + margin-right: 8px; 94 + border-radius: 3px; 95 + display: inline-block; 96 + position: absolute; 97 + top: 0; 98 + left: 0; 99 + } 100 + 101 + .ponder-detail-view .phabricator-remarkup { 102 + margin-left: 32px; 103 + } 104 + 105 + .ponder-question-content .phui-timeline-view { 106 + padding-right: 0; 107 + } 108 + 109 + .ponder-question-content .phui-timeline-view .phui-timeline-core-content { 110 + background-color: {$lightbluebackground}; 15 111 } 16 112 17 113 .ponder-answer-view { ··· 27 123 margin-left: 12px; 28 124 } 29 125 30 - .ponder-answer-view .phui-header-shell { 31 - padding-bottom: 8px; 126 + .ponder-question-view .ponder-answer-view .phui-header-shell { 127 + padding: 4px 8px 3px 8px; 128 + } 129 + 130 + .ponder-answer-view .phui-header-image-href { 131 + display: flex; 32 132 } 33 133 34 134 .ponder-answer-view .phui-header-view .phui-header-header { 35 - font-size: 16px; 135 + font-size: 15px; 36 136 } 37 137 38 138 .ponder-answer-view .phui-header-col1 { 39 - width: 45px; 139 + width: 40px; 140 + } 141 + 142 + .ponder-answer-view .ponder-answer-content { 143 + background-color: #fff; 144 + padding: 16px 16px 0 16px; 145 + } 146 + 147 + .device-phone .ponder-answer-view .ponder-answer-content { 148 + padding: 12px 12px 0 12px; 40 149 } 41 150 42 151 .ponder-answer-view .phui-header-image { 43 - height: 35px; 44 - width: 35px; 152 + height: 30px; 153 + width: 30px; 45 154 border-radius: 3px; 46 155 } 47 156 157 + .ponder-answer-wiki-header { 158 + font-weight: bold; 159 + border-bottom: 1px solid {$lightblueborder}; 160 + color: {$bluetext}; 161 + padding-bottom: 8px; 162 + margin-bottom: 16px; 163 + } 164 + 48 165 .ponder-footer-view { 49 - margin: 0 0 -4px; 50 166 text-align: left; 167 + margin-top: 16px; 168 + border-bottom: 1px solid {$thinblueborder}; 169 + } 170 + 171 + .ponder-answer-view .ponder-footer-view { 172 + margin-top: 24px; 173 + border-top: 1px solid rgba({$alphagrey}, .15); 174 + border-bottom: none; 175 + } 176 + 177 + body .phui-main-column .ponder-question-content .ponder-answer-view 178 + .phui-object-box.ponder-answer { 179 + margin: 0; 180 + padding: 0; 51 181 } 52 182 53 183 .ponder-footer-view .ponder-footer-action { 54 - padding: 4px 8px; 184 + padding: 8px 0; 55 185 margin-right: 8px; 56 - color: {$anchor}; 57 186 display: inline-block; 58 - background-color: rgba({$alphablue}, 0.06); 187 + } 188 + 189 + .ponder-add-answer-header { 190 + margin-top: 64px; 191 + } 192 + 193 + .ponder-add-answer-view { 194 + margin-top: 16px; 195 + } 196 + 197 + .ponder-question-content div.ponder-question-add-comment-view 198 + div.phui-box.phui-object-box { 199 + background: {$lightbluebackground}; 200 + margin-right: 0; 201 + margin-left: 32px; 59 202 } 60 203 61 - .ponder-footer-view .ponder-footer-action.ponder-footer-action-helpful { 62 - background-color: {$lightyellow}; 63 - color: {$bluetext}; 204 + .device .ponder-question-content div.ponder-question-add-comment-view 205 + div.phui-box.phui-object-box { 206 + margin: 0; 64 207 } 65 208 66 - .ponder-footer-view .ponder-footer-action.ponder-footer-action-helpful 67 - .phui-icon-view { 68 - color: {$bluetext}; 209 + .ponder-add-answer-view .phui-form-full-width.phui-form-view 210 + label.aphront-form-label, 211 + .ponder-question-add-comment-view .phui-form-full-width.phui-form-view 212 + label.aphront-form-label{ 213 + display: none; 69 214 } 70 215 71 - .ponder-footer-view .ponder-footer-action .phui-icon-view { 72 - color: {$anchor}; 216 + .ponder-add-answer-view.phui-box-grey .phui-header-shell { 217 + border: none; 218 + padding-bottom: 8px; 73 219 } 74 220 75 - .ponder-footer-view a:hover { 76 - text-decoration: none; 77 - background-color: rgba({$alphablue}, 0.10); 221 + .ponder-add-answer-view .remarkup-assist-textarea, 222 + .ponder-question-add-comment-view .remarkup-assist-textarea { 223 + height: 8em; 78 224 }
+1 -4
webroot/rsrc/css/application/project/project-view.css
··· 85 85 padding: 4px 8px 0 8px; 86 86 } 87 87 88 - .device-desktop .phui-two-column-view.project-view-badges .phui-side-column { 89 - width: 366px; 90 - } 91 - 92 88 .project-view-badges .phui-badge-flex-view { 93 89 background-color: #fff; 90 + width: 340px; 94 91 } 95 92 96 93 .project-view-home .phui-box-grey .phui-object-item-attribute .phui-icon-view {
+6
webroot/rsrc/css/phui/phui-header-view.css
··· 98 98 font-size: {$normalfontsize}; 99 99 } 100 100 101 + .phui-header-action-link { 102 + margin-bottom: 4px; 103 + margin-top: 4px; 104 + float: right; 105 + } 106 + 101 107 .device-phone .phui-header-action-link .phui-button-text { 102 108 visibility: hidden; 103 109 width: 0;
+21
webroot/rsrc/css/phui/phui-two-column-view.css
··· 2 2 * @provides phui-two-column-view-css 3 3 */ 4 4 5 + .phui-two-column-view { 6 + background-color: #fff; 7 + } 8 + 9 + .phui-two-column-container { 10 + max-width: 1024px; 11 + margin: 0 auto; 12 + } 13 + 14 + .phui-two-column-view .phui-two-column-header .phui-header-shell { 15 + padding-bottom: 32px; 16 + } 17 + 18 + .device-phone .phui-two-column-view .phui-two-column-header .phui-header-shell { 19 + padding-bottom: 20px; 20 + } 21 + 22 + .phui-two-column-fluid .phui-two-column-container { 23 + max-width: 100%; 24 + } 25 + 5 26 .phui-two-column-content { 6 27 display: table; 7 28 width: 100%;