mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 07:50:57 +01:00
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
This commit is contained in:
parent
2214f96d3f
commit
092020a7a6
16 changed files with 84 additions and 145 deletions
|
@ -3705,25 +3705,16 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'ponder-comment-table-css' =>
|
||||
array(
|
||||
'uri' => '/res/a1bb9056/rsrc/css/application/ponder/comments.css',
|
||||
'uri' => '/res/cf9c686f/rsrc/css/application/ponder/comments.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/ponder/comments.css',
|
||||
),
|
||||
'ponder-core-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/3a2d5e18/rsrc/css/application/ponder/core.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/ponder/core.css',
|
||||
),
|
||||
'ponder-feed-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/df22bd20/rsrc/css/application/ponder/feed.css',
|
||||
'uri' => '/res/cab09075/rsrc/css/application/ponder/feed.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -3741,7 +3732,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'ponder-vote-css' =>
|
||||
array(
|
||||
'uri' => '/res/ea8316c2/rsrc/css/application/ponder/vote.css',
|
||||
'uri' => '/res/104d54ba/rsrc/css/application/ponder/vote.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
|
|
@ -7,7 +7,7 @@ final class PhabricatorApplicationPonder extends PhabricatorApplication {
|
|||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Find Answers';
|
||||
return pht('Find Answers');
|
||||
}
|
||||
|
||||
public function getIconName() {
|
||||
|
|
|
@ -22,8 +22,9 @@ final class PonderAnswerSaveController extends PonderController {
|
|||
if (!strlen(trim($answer))) {
|
||||
$dialog = new AphrontDialogView();
|
||||
$dialog->setUser($request->getUser());
|
||||
$dialog->setTitle('Empty answer');
|
||||
$dialog->appendChild(phutil_tag('p', array(), pht(
|
||||
$dialog->setTitle(pht('Empty Answer'));
|
||||
$dialog->appendChild(
|
||||
phutil_tag('p', array(), pht(
|
||||
'Your answer must not be empty.')));
|
||||
$dialog->addCancelButton('/Q'.$question_id);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ final class PonderCommentSaveController extends PonderController {
|
|||
if (!strlen(trim($content))) {
|
||||
$dialog = new AphrontDialogView();
|
||||
$dialog->setUser($request->getUser());
|
||||
$dialog->setTitle('Empty comment');
|
||||
$dialog->setTitle(pht('Empty Comment'));
|
||||
$dialog->appendChild(phutil_tag('p', array(), pht(
|
||||
'Your comment must not be empty.')));
|
||||
$dialog->addCancelButton('/Q'.$question_id);
|
||||
|
|
|
@ -48,7 +48,7 @@ final class PonderQuestionAskController extends PonderController {
|
|||
$error_view = null;
|
||||
if ($errors) {
|
||||
$error_view = id(new AphrontErrorView())
|
||||
->setTitle('Form Errors')
|
||||
->setTitle(pht('Form Errors'))
|
||||
->setErrors($errors);
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ final class PonderQuestionAskController extends PonderController {
|
|||
->setUser($user))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Ask Away!'));
|
||||
->setValue(pht('Ask Away!')));
|
||||
|
||||
$preview = hsprintf(
|
||||
'<div class="aphront-panel-flush">'.
|
||||
|
@ -106,7 +106,8 @@ final class PonderQuestionAskController extends PonderController {
|
|||
$nav,
|
||||
array(
|
||||
'device' => true,
|
||||
'title' => 'Ask a Question',
|
||||
'dust' => true,
|
||||
'title' => pht('Ask a Question'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,8 @@ final class PonderQuestionViewController extends PonderController {
|
|||
$nav,
|
||||
array(
|
||||
'device' => true,
|
||||
'title' => 'Q'.$question->getID().' '.$question->getTitle()
|
||||
'title' => 'Q'.$question->getID().' '.$question->getTitle(),
|
||||
'dust' => true,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -17,14 +17,12 @@ final class PonderAddAnswerView extends AphrontView {
|
|||
}
|
||||
|
||||
public function render() {
|
||||
require_celerity_resource('ponder-core-view-css');
|
||||
|
||||
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
|
||||
|
||||
$question = $this->question;
|
||||
|
||||
$header = id(new PhabricatorHeaderView())
|
||||
->setHeader('Add Answer');
|
||||
->setHeader(pht('Add Answer'));
|
||||
|
||||
$form = new AphrontFormView();
|
||||
$form
|
||||
|
@ -36,22 +34,26 @@ final class PonderAddAnswerView extends AphrontView {
|
|||
->appendChild(
|
||||
id(new PhabricatorRemarkupControl())
|
||||
->setName('answer')
|
||||
->setLabel('Answer')
|
||||
->setLabel(pht('Answer'))
|
||||
->setError(true)
|
||||
->setID('answer-content')
|
||||
->setUser($this->user))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue($is_serious ? 'Submit' : 'Make it so'));
|
||||
->setValue($is_serious ?
|
||||
pht('Submit') :
|
||||
pht('Make it so')));
|
||||
|
||||
$loading = pht('Loading answer preview...');
|
||||
$preview = hsprintf(
|
||||
'<div class="aphront-panel-flush">'.
|
||||
'<div id="answer-preview">'.
|
||||
'<span class="aphront-panel-preview-loading-text">'.
|
||||
'Loading answer preview...'.
|
||||
'%s'.
|
||||
'</span>'.
|
||||
'</div>'.
|
||||
'</div>');
|
||||
'</div>',
|
||||
$loading);
|
||||
|
||||
Javelin::initBehavior(
|
||||
'ponder-feedback-preview',
|
||||
|
|
|
@ -33,6 +33,7 @@ final class PonderAddCommentView extends AphrontView {
|
|||
$form
|
||||
->setUser($this->user)
|
||||
->setAction($this->actionURI)
|
||||
->setNoShading(true)
|
||||
->setWorkflow(true)
|
||||
->addHiddenInput('target', $target)
|
||||
->addHiddenInput('question_id', $questionID)
|
||||
|
@ -41,12 +42,14 @@ final class PonderAddCommentView extends AphrontView {
|
|||
->setName('content'))
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue($is_serious ? 'Submit' : 'Editorialize'));
|
||||
->setValue($is_serious ?
|
||||
pht('Submit') :
|
||||
pht('Editorialize')));
|
||||
|
||||
$view = id(new AphrontMoreView())
|
||||
->setSome('')
|
||||
->setMore($form->render())
|
||||
->setExpandText('Add Comment');
|
||||
->setExpandText(pht('Add Comment'));
|
||||
|
||||
return $view->render();
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ final class PonderAnswerListView extends AphrontView {
|
|||
$handles = $this->handles;
|
||||
|
||||
$panel = id(new AphrontPanelView())
|
||||
->addClass("ponder-panel")
|
||||
->setHeader("Responses:");
|
||||
->setNoBackground()
|
||||
->setHeader(pht("Responses"));
|
||||
|
||||
foreach ($this->answers as $cur_answer) {
|
||||
$view = new PonderPostBodyView();
|
||||
|
@ -71,7 +71,7 @@ final class PonderAnswerListView extends AphrontView {
|
|||
$panel->appendChild($view);
|
||||
$panel->appendChild($commentview);
|
||||
$panel->appendChild(
|
||||
hsprintf('<div style="height: 40px; clear : both"></div>'));
|
||||
hsprintf('<div style="height: 20px; clear: both"></div>'));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ final class PonderCommentListView extends AphrontView {
|
|||
'<th><a name="comment-%s" /></th>'.
|
||||
'<td>'.
|
||||
'<div class="phabricator-remarkup ponder-comment-markup">'.
|
||||
'%s —%s <span class="ponder-datestamp">%s</span>'.
|
||||
'%s -%s <span class="ponder-datestamp">%s</span>'.
|
||||
'</div>'.
|
||||
'</td>'.
|
||||
'</tr>',
|
||||
|
|
|
@ -16,14 +16,13 @@ final class PonderQuestionDetailView extends AphrontView {
|
|||
}
|
||||
|
||||
public function render() {
|
||||
require_celerity_resource('ponder-core-view-css');
|
||||
|
||||
$question = $this->question;
|
||||
$handles = $this->handles;
|
||||
$user = $this->user;
|
||||
|
||||
$panel = id(new AphrontPanelView())
|
||||
->addClass("ponder-panel");
|
||||
->setNoBackground(true);
|
||||
|
||||
$contentview = new PonderPostBodyView();
|
||||
$contentview
|
||||
|
|
|
@ -35,7 +35,6 @@ final class PonderUserProfileView extends AphrontView {
|
|||
}
|
||||
|
||||
public function render() {
|
||||
require_celerity_resource('ponder-core-view-css');
|
||||
require_celerity_resource('ponder-feed-view-css');
|
||||
|
||||
$user = $this->user;
|
||||
|
|
|
@ -4,9 +4,13 @@
|
|||
|
||||
|
||||
.ponder-comments {
|
||||
width: 600px;
|
||||
margin : 0;
|
||||
margin-left : 120px;
|
||||
width: 480px;
|
||||
margin: 5px 0 0 60px;
|
||||
}
|
||||
|
||||
.device .ponder-comments {
|
||||
width: 100%;
|
||||
margin: 5px 0 0 0;
|
||||
}
|
||||
|
||||
.ponder-comments th {
|
||||
|
@ -16,28 +20,26 @@
|
|||
|
||||
.ponder-comments td {
|
||||
vertical-align: top;
|
||||
padding: 6px 2px;
|
||||
border-bottom: 1px dotted #d0d0d0;
|
||||
background : #FFF;
|
||||
padding: 6px;
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.ponder-datestamp {
|
||||
font-size: 9px;
|
||||
font-family: "Verdana";
|
||||
color: #666666;
|
||||
font-size: 11px;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.ponder-label {
|
||||
display: block;
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #222222;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin: 0px 0px 6px;
|
||||
padding: 6px 4px;
|
||||
background: #cccccc;
|
||||
border-bottom: 1px solid #aaaaaa;
|
||||
background: #ccc;
|
||||
border-bottom: 1px solid #aaa;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -46,57 +48,25 @@ td .aphront-form-control {
|
|||
}
|
||||
|
||||
td .aphront-form-control-submit {
|
||||
float : right;
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.aphront-form-control-submit button {
|
||||
margin : 0;
|
||||
}
|
||||
|
||||
|
||||
td .aphront-form-input {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td .aphront-form-control textarea {
|
||||
height : 40px;
|
||||
width : 560px;
|
||||
padding : 0;
|
||||
margin : 0;
|
||||
background : #EEE;
|
||||
border : 1px solid #CCC;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
div.ponder-comment-markup {
|
||||
padding-left : 5px;
|
||||
}
|
||||
|
||||
|
||||
.ponder-comment-markup p {
|
||||
margin : 0;
|
||||
}
|
||||
|
||||
.ponder-comment-markup h2 {
|
||||
margin : 0;
|
||||
font-size : inherit;
|
||||
font-weight : normal;
|
||||
}
|
||||
|
||||
.ponder-comment-markup h3 {
|
||||
margin : 0;
|
||||
font-size : inherit;
|
||||
font-weight : normal;
|
||||
}
|
||||
|
||||
.ponder-comment-markup h4 {
|
||||
margin : 0;
|
||||
font-size : inherit;
|
||||
font-weight : normal;
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
.ponder-comment-markup h2,
|
||||
.ponder-comment-markup h3,
|
||||
.ponder-comment-markup h4,
|
||||
.ponder-comment-markup h5 {
|
||||
margin: 0;
|
||||
font-size: inherit;
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/**
|
||||
* @provides ponder-core-view-css
|
||||
*/
|
||||
|
||||
.ponder-primary-pane {
|
||||
margin: 0 0 0 2em;
|
||||
padding-bottom: 2em;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.ponder-panel {
|
||||
max-width: 800px;
|
||||
padding-left : 30px;
|
||||
border : none;
|
||||
background : white;
|
||||
}
|
||||
|
||||
.ponder-panel h1 {
|
||||
margin-left : -30px;
|
||||
margin-right : -50px;
|
||||
margin-bottom: 0px;
|
||||
padding-bottom : 4px;
|
||||
font-size : 1.5em;
|
||||
border-bottom : 1px solid #AAA;
|
||||
}
|
||||
|
||||
.ponder-panel .aphront-form-view {
|
||||
border : none;
|
||||
background : none;
|
||||
}
|
|
@ -12,11 +12,8 @@
|
|||
display: block;
|
||||
|
||||
text-decoration: none;
|
||||
color: #999999;
|
||||
color: #a1a5a9;
|
||||
font-weight: normal;
|
||||
|
||||
/* Our default fonts have weirdly different up/down arrow sizes. */
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
.ponder-votebox a:hover {
|
||||
|
@ -38,9 +35,6 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.ponder-votebox {
|
||||
float: left;
|
||||
width: 32px;
|
||||
|
@ -49,6 +43,14 @@
|
|||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.device-phone .ponder-votebox {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.device-phone .ponder-votebox-content {
|
||||
margin-left: 35px;
|
||||
}
|
||||
|
||||
.ponder-votable .phabricator-transaction-view {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
|
Loading…
Reference in a new issue