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

Improve Ponder on Mobile

Summary: Ponder was pretty unusable on mobile, I fixed most of the issues and ran some pht's as well.

Test Plan: Use Ponder //shudder//

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

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

+83 -144
+3 -12
src/__celerity_resource_map__.php
··· 3705 3705 ), 3706 3706 'ponder-comment-table-css' => 3707 3707 array( 3708 - 'uri' => '/res/a1bb9056/rsrc/css/application/ponder/comments.css', 3708 + 'uri' => '/res/cf9c686f/rsrc/css/application/ponder/comments.css', 3709 3709 'type' => 'css', 3710 3710 'requires' => 3711 3711 array( 3712 3712 ), 3713 3713 'disk' => '/rsrc/css/application/ponder/comments.css', 3714 3714 ), 3715 - 'ponder-core-view-css' => 3716 - array( 3717 - 'uri' => '/res/3a2d5e18/rsrc/css/application/ponder/core.css', 3718 - 'type' => 'css', 3719 - 'requires' => 3720 - array( 3721 - ), 3722 - 'disk' => '/rsrc/css/application/ponder/core.css', 3723 - ), 3724 3715 'ponder-feed-view-css' => 3725 3716 array( 3726 - 'uri' => '/res/df22bd20/rsrc/css/application/ponder/feed.css', 3717 + 'uri' => '/res/cab09075/rsrc/css/application/ponder/feed.css', 3727 3718 'type' => 'css', 3728 3719 'requires' => 3729 3720 array( ··· 3741 3732 ), 3742 3733 'ponder-vote-css' => 3743 3734 array( 3744 - 'uri' => '/res/ea8316c2/rsrc/css/application/ponder/vote.css', 3735 + 'uri' => '/res/104d54ba/rsrc/css/application/ponder/vote.css', 3745 3736 'type' => 'css', 3746 3737 'requires' => 3747 3738 array(
+1 -1
src/applications/ponder/application/PhabricatorApplicationPonder.php
··· 7 7 } 8 8 9 9 public function getShortDescription() { 10 - return 'Find Answers'; 10 + return pht('Find Answers'); 11 11 } 12 12 13 13 public function getIconName() {
+3 -2
src/applications/ponder/controller/PonderAnswerSaveController.php
··· 22 22 if (!strlen(trim($answer))) { 23 23 $dialog = new AphrontDialogView(); 24 24 $dialog->setUser($request->getUser()); 25 - $dialog->setTitle('Empty answer'); 26 - $dialog->appendChild(phutil_tag('p', array(), pht( 25 + $dialog->setTitle(pht('Empty Answer')); 26 + $dialog->appendChild( 27 + phutil_tag('p', array(), pht( 27 28 'Your answer must not be empty.'))); 28 29 $dialog->addCancelButton('/Q'.$question_id); 29 30
+1 -1
src/applications/ponder/controller/PonderCommentSaveController.php
··· 31 31 if (!strlen(trim($content))) { 32 32 $dialog = new AphrontDialogView(); 33 33 $dialog->setUser($request->getUser()); 34 - $dialog->setTitle('Empty comment'); 34 + $dialog->setTitle(pht('Empty Comment')); 35 35 $dialog->appendChild(phutil_tag('p', array(), pht( 36 36 'Your comment must not be empty.'))); 37 37 $dialog->addCancelButton('/Q'.$question_id);
+4 -3
src/applications/ponder/controller/PonderQuestionAskController.php
··· 48 48 $error_view = null; 49 49 if ($errors) { 50 50 $error_view = id(new AphrontErrorView()) 51 - ->setTitle('Form Errors') 51 + ->setTitle(pht('Form Errors')) 52 52 ->setErrors($errors); 53 53 } 54 54 ··· 72 72 ->setUser($user)) 73 73 ->appendChild( 74 74 id(new AphrontFormSubmitControl()) 75 - ->setValue('Ask Away!')); 75 + ->setValue(pht('Ask Away!'))); 76 76 77 77 $preview = hsprintf( 78 78 '<div class="aphront-panel-flush">'. ··· 106 106 $nav, 107 107 array( 108 108 'device' => true, 109 - 'title' => 'Ask a Question', 109 + 'dust' => true, 110 + 'title' => pht('Ask a Question'), 110 111 )); 111 112 } 112 113
+2 -1
src/applications/ponder/controller/PonderQuestionViewController.php
··· 94 94 $nav, 95 95 array( 96 96 'device' => true, 97 - 'title' => 'Q'.$question->getID().' '.$question->getTitle() 97 + 'title' => 'Q'.$question->getID().' '.$question->getTitle(), 98 + 'dust' => true, 98 99 )); 99 100 } 100 101
+9 -7
src/applications/ponder/view/PonderAddAnswerView.php
··· 17 17 } 18 18 19 19 public function render() { 20 - require_celerity_resource('ponder-core-view-css'); 21 - 22 20 $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); 23 21 24 22 $question = $this->question; 25 23 26 24 $header = id(new PhabricatorHeaderView()) 27 - ->setHeader('Add Answer'); 25 + ->setHeader(pht('Add Answer')); 28 26 29 27 $form = new AphrontFormView(); 30 28 $form ··· 36 34 ->appendChild( 37 35 id(new PhabricatorRemarkupControl()) 38 36 ->setName('answer') 39 - ->setLabel('Answer') 37 + ->setLabel(pht('Answer')) 40 38 ->setError(true) 41 39 ->setID('answer-content') 42 40 ->setUser($this->user)) 43 41 ->appendChild( 44 42 id(new AphrontFormSubmitControl()) 45 - ->setValue($is_serious ? 'Submit' : 'Make it so')); 43 + ->setValue($is_serious ? 44 + pht('Submit') : 45 + pht('Make it so'))); 46 46 47 + $loading = pht('Loading answer preview...'); 47 48 $preview = hsprintf( 48 49 '<div class="aphront-panel-flush">'. 49 50 '<div id="answer-preview">'. 50 51 '<span class="aphront-panel-preview-loading-text">'. 51 - 'Loading answer preview...'. 52 + '%s'. 52 53 '</span>'. 53 54 '</div>'. 54 - '</div>'); 55 + '</div>', 56 + $loading); 55 57 56 58 Javelin::initBehavior( 57 59 'ponder-feedback-preview',
+5 -2
src/applications/ponder/view/PonderAddCommentView.php
··· 33 33 $form 34 34 ->setUser($this->user) 35 35 ->setAction($this->actionURI) 36 + ->setNoShading(true) 36 37 ->setWorkflow(true) 37 38 ->addHiddenInput('target', $target) 38 39 ->addHiddenInput('question_id', $questionID) ··· 41 42 ->setName('content')) 42 43 ->appendChild( 43 44 id(new AphrontFormSubmitControl()) 44 - ->setValue($is_serious ? 'Submit' : 'Editorialize')); 45 + ->setValue($is_serious ? 46 + pht('Submit') : 47 + pht('Editorialize'))); 45 48 46 49 $view = id(new AphrontMoreView()) 47 50 ->setSome('') 48 51 ->setMore($form->render()) 49 - ->setExpandText('Add Comment'); 52 + ->setExpandText(pht('Add Comment')); 50 53 51 54 return $view->render(); 52 55 }
+3 -3
src/applications/ponder/view/PonderAnswerListView.php
··· 47 47 $handles = $this->handles; 48 48 49 49 $panel = id(new AphrontPanelView()) 50 - ->addClass("ponder-panel") 51 - ->setHeader("Responses:"); 50 + ->setNoBackground() 51 + ->setHeader(pht("Responses")); 52 52 53 53 foreach ($this->answers as $cur_answer) { 54 54 $view = new PonderPostBodyView(); ··· 71 71 $panel->appendChild($view); 72 72 $panel->appendChild($commentview); 73 73 $panel->appendChild( 74 - hsprintf('<div style="height: 40px; clear : both"></div>')); 74 + hsprintf('<div style="height: 20px; clear: both"></div>')); 75 75 76 76 } 77 77
+1 -1
src/applications/ponder/view/PonderCommentListView.php
··· 57 57 '<th><a name="comment-%s" /></th>'. 58 58 '<td>'. 59 59 '<div class="phabricator-remarkup ponder-comment-markup">'. 60 - '%s&nbsp;&mdash;%s&nbsp;<span class="ponder-datestamp">%s</span>'. 60 + '%s -%s <span class="ponder-datestamp">%s</span>'. 61 61 '</div>'. 62 62 '</td>'. 63 63 '</tr>',
+1 -2
src/applications/ponder/view/PonderQuestionDetailView.php
··· 16 16 } 17 17 18 18 public function render() { 19 - require_celerity_resource('ponder-core-view-css'); 20 19 21 20 $question = $this->question; 22 21 $handles = $this->handles; 23 22 $user = $this->user; 24 23 25 24 $panel = id(new AphrontPanelView()) 26 - ->addClass("ponder-panel"); 25 + ->setNoBackground(true); 27 26 28 27 $contentview = new PonderPostBodyView(); 29 28 $contentview
-1
src/applications/ponder/view/PonderUserProfileView.php
··· 35 35 } 36 36 37 37 public function render() { 38 - require_celerity_resource('ponder-core-view-css'); 39 38 require_celerity_resource('ponder-feed-view-css'); 40 39 41 40 $user = $this->user;
+29 -59
webroot/rsrc/css/application/ponder/comments.css
··· 4 4 5 5 6 6 .ponder-comments { 7 - width: 600px; 8 - margin : 0; 9 - margin-left : 120px; 7 + width: 480px; 8 + margin: 5px 0 0 60px; 9 + } 10 + 11 + .device .ponder-comments { 12 + width: 100%; 13 + margin: 5px 0 0 0; 10 14 } 11 15 12 16 .ponder-comments th { 13 - width : 0px; 14 - height : 0px; 17 + width: 0px; 18 + height: 0px; 15 19 } 16 20 17 21 .ponder-comments td { 18 22 vertical-align: top; 19 - padding: 6px 2px; 20 - border-bottom: 1px dotted #d0d0d0; 21 - background : #FFF; 23 + padding: 6px; 24 + border-bottom: 1px solid #e7e7e7; 25 + background: #fff; 22 26 } 23 27 24 28 .ponder-datestamp { 25 - font-size: 9px; 26 - font-family: "Verdana"; 27 - color: #666666; 29 + font-size: 11px; 30 + color: #777; 28 31 } 29 32 30 33 .ponder-label { 31 34 display: block; 32 35 width: 100%; 33 - font-size: 14px; 34 36 font-weight: bold; 35 - color: #222222; 37 + color: #333; 36 38 text-align: left; 37 39 margin: 0px 0px 6px; 38 40 padding: 6px 4px; 39 - background: #cccccc; 40 - border-bottom: 1px solid #aaaaaa; 41 + background: #ccc; 42 + border-bottom: 1px solid #aaa; 41 43 cursor: pointer; 42 44 } 43 45 44 46 td .aphront-form-control { 45 - padding : 0; 47 + padding: 0; 46 48 } 47 49 48 50 td .aphront-form-control-submit { 49 - float : right; 50 - margin : 0; 51 - padding : 0; 51 + display: block; 52 52 } 53 53 54 - .aphront-form-control-submit button { 55 - margin : 0; 56 - } 57 - 58 - 59 54 td .aphront-form-input { 60 - margin : 0; 61 - width : 100%; 55 + margin: 0; 56 + width: 100%; 62 57 } 63 58 64 59 td .aphront-form-control textarea { 65 - height : 40px; 66 - width : 560px; 67 - padding : 0; 68 - margin : 0; 69 - background : #EEE; 70 - border : 1px solid #CCC; 71 - } 72 - 73 - div.ponder-comment-markup { 74 - padding-left : 5px; 60 + height: 50px; 75 61 } 76 62 77 - 78 63 .ponder-comment-markup p { 79 - margin : 0; 80 - } 81 - 82 - .ponder-comment-markup h2 { 83 - margin : 0; 84 - font-size : inherit; 85 - font-weight : normal; 86 - } 87 - 88 - .ponder-comment-markup h3 { 89 - margin : 0; 90 - font-size : inherit; 91 - font-weight : normal; 92 - } 93 - 94 - .ponder-comment-markup h4 { 95 - margin : 0; 96 - font-size : inherit; 97 - font-weight : normal; 64 + margin: 0 0 5px 0; 98 65 } 99 66 67 + .ponder-comment-markup h2, 68 + .ponder-comment-markup h3, 69 + .ponder-comment-markup h4, 100 70 .ponder-comment-markup h5 { 101 - margin : 0; 102 - font-size : inherit; 103 - font-weight : normal; 71 + margin: 0; 72 + font-size: inherit; 73 + font-weight: normal; 104 74 }
-30
webroot/rsrc/css/application/ponder/core.css
··· 1 - /** 2 - * @provides ponder-core-view-css 3 - */ 4 - 5 - .ponder-primary-pane { 6 - margin: 0 0 0 2em; 7 - padding-bottom: 2em; 8 - max-width: 800px; 9 - } 10 - 11 - .ponder-panel { 12 - max-width: 800px; 13 - padding-left : 30px; 14 - border : none; 15 - background : white; 16 - } 17 - 18 - .ponder-panel h1 { 19 - margin-left : -30px; 20 - margin-right : -50px; 21 - margin-bottom: 0px; 22 - padding-bottom : 4px; 23 - font-size : 1.5em; 24 - border-bottom : 1px solid #AAA; 25 - } 26 - 27 - .ponder-panel .aphront-form-view { 28 - border : none; 29 - background : none; 30 - }
+6 -6
webroot/rsrc/css/application/ponder/feed.css
··· 3 3 */ 4 4 5 5 .ponder-question-summary { 6 - width : 100%; 7 - background : #DFDFE3; 8 - float : left; 9 - clear : both; 10 - margin-top : 1px; 11 - padding : 1px; 6 + width: 100%; 7 + background: #DFDFE3; 8 + float: left; 9 + clear: both; 10 + margin-top: 1px; 11 + padding: 1px; 12 12 } 13 13 14 14 .ponder-answer-summary {
+15 -13
webroot/rsrc/css/application/ponder/vote.css
··· 12 12 display: block; 13 13 14 14 text-decoration: none; 15 - color: #999999; 15 + color: #a1a5a9; 16 16 font-weight: normal; 17 - 18 - /* Our default fonts have weirdly different up/down arrow sizes. */ 19 - font-family: Arial; 20 17 } 21 18 22 19 .ponder-votebox a:hover { ··· 38 35 font-weight: bold; 39 36 } 40 37 38 + .ponder-votebox { 39 + float: left; 40 + width: 32px; 41 + height: 60px; 42 + margin-top: 56px; 43 + margin-left: 10px; 44 + } 41 45 46 + .device-phone .ponder-votebox { 47 + margin: 0; 48 + } 42 49 43 - 44 - .ponder-votebox { 45 - float : left; 46 - width : 32px; 47 - height : 60px; 48 - margin-top : 56px; 49 - margin-left : 10px; 50 + .device-phone .ponder-votebox-content { 51 + margin-left: 35px; 50 52 } 51 53 52 54 .ponder-votable .phabricator-transaction-view { 53 - margin : 0; 54 - padding : 0; 55 + margin: 0; 56 + padding: 0; 55 57 } 56 58 57 59 .ponder-votable .phabricator-transaction-detail {