mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 00:10:57 +01:00
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
This commit is contained in:
parent
a3b955f948
commit
e05e539a9c
9 changed files with 52 additions and 220 deletions
|
@ -94,10 +94,7 @@ return array(
|
|||
'rsrc/css/application/policy/policy-edit.css' => '815c66f7',
|
||||
'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43',
|
||||
'rsrc/css/application/policy/policy.css' => '957ea14c',
|
||||
'rsrc/css/application/ponder/comments.css' => '865a67e6',
|
||||
'rsrc/css/application/ponder/feed.css' => 'e62615b6',
|
||||
'rsrc/css/application/ponder/post.css' => '9d415218',
|
||||
'rsrc/css/application/ponder/vote.css' => 'aea452b0',
|
||||
'rsrc/css/application/ponder/ponder-view.css' => 'fcd6b398',
|
||||
'rsrc/css/application/projects/project-icon.css' => '4e3eaa5a',
|
||||
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
|
||||
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
|
||||
|
@ -816,10 +813,7 @@ return array(
|
|||
'policy-css' => '957ea14c',
|
||||
'policy-edit-css' => '815c66f7',
|
||||
'policy-transaction-detail-css' => '82100a43',
|
||||
'ponder-comment-table-css' => '865a67e6',
|
||||
'ponder-feed-view-css' => 'e62615b6',
|
||||
'ponder-post-css' => '9d415218',
|
||||
'ponder-vote-css' => 'aea452b0',
|
||||
'ponder-view-css' => 'fcd6b398',
|
||||
'project-icon-css' => '4e3eaa5a',
|
||||
'raphael-core' => '51ee6b43',
|
||||
'raphael-g' => '40dde778',
|
||||
|
|
|
@ -24,6 +24,7 @@ final class PonderAnswerHistoryController extends PonderController {
|
|||
$aid = $answer->getID();
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->setBorder(true);
|
||||
$crumbs->addTextCrumb("Q{$qid}", "/Q{$qid}");
|
||||
$crumbs->addTextCrumb("A{$aid}", "/Q{$qid}#{$aid}");
|
||||
$crumbs->addTextCrumb(pht('History'));
|
||||
|
|
|
@ -22,6 +22,7 @@ final class PonderQuestionHistoryController extends PonderController {
|
|||
$qid = $question->getID();
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->setBorder(true);
|
||||
$crumbs->addTextCrumb("Q{$qid}", "/Q{$qid}");
|
||||
$crumbs->addTextCrumb(pht('History'));
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
final class PonderQuestionViewController extends PonderController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$user = $request->getViewer();
|
||||
$viewer = $request->getViewer();
|
||||
$id = $request->getURIData('id');
|
||||
|
||||
$question = id(new PonderQuestionQuery())
|
||||
->setViewer($user)
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($id))
|
||||
->needAnswers(true)
|
||||
->needViewerVotes(true)
|
||||
|
@ -16,15 +16,15 @@ final class PonderQuestionViewController extends PonderController {
|
|||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$question->attachVotes($user->getPHID());
|
||||
$question->attachVotes($viewer->getPHID());
|
||||
|
||||
$question_xactions = $this->buildQuestionTransactions($question);
|
||||
$answers = $this->buildAnswers($question->getAnswers());
|
||||
|
||||
$authors = mpull($question->getAnswers(), null, 'getAuthorPHID');
|
||||
if (isset($authors[$user->getPHID()])) {
|
||||
if (isset($authors[$viewer->getPHID()])) {
|
||||
$answer_add_panel = id(new PHUIInfoView())
|
||||
->setSeverity(PHUIInfoView::SEVERITY_NODATA)
|
||||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
|
||||
->appendChild(
|
||||
pht(
|
||||
'You have already answered this question. You can not answer '.
|
||||
|
@ -33,14 +33,14 @@ final class PonderQuestionViewController extends PonderController {
|
|||
$answer_add_panel = new PonderAddAnswerView();
|
||||
$answer_add_panel
|
||||
->setQuestion($question)
|
||||
->setUser($user)
|
||||
->setUser($viewer)
|
||||
->setActionURI('/ponder/answer/add/');
|
||||
}
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($question->getTitle())
|
||||
->setUser($user)
|
||||
->setPolicyObject($question);
|
||||
$header = new PHUIHeaderView();
|
||||
$header->setHeader($question->getTitle());
|
||||
$header->setUser($viewer);
|
||||
$header->setPolicyObject($question);
|
||||
|
||||
if ($question->getStatus() == PonderQuestionStatus::STATUS_OPEN) {
|
||||
$header->setStatus('fa-square-o', 'bluegrey', pht('Open'));
|
||||
|
@ -58,13 +58,22 @@ final class PonderQuestionViewController extends PonderController {
|
|||
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
|
||||
$crumbs->addTextCrumb('Q'.$id, '/Q'.$id);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$ponder_view = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'ponder-question-view',
|
||||
),
|
||||
array(
|
||||
$crumbs,
|
||||
$object_box,
|
||||
$question_xactions,
|
||||
$answers,
|
||||
$answer_add_panel,
|
||||
));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$ponder_view,
|
||||
),
|
||||
array(
|
||||
'title' => 'Q'.$question->getID().' '.$question->getTitle(),
|
||||
|
@ -75,9 +84,8 @@ final class PonderQuestionViewController extends PonderController {
|
|||
}
|
||||
|
||||
private function buildActionListView(PonderQuestion $question) {
|
||||
$viewer = $this->getViewer();
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
|
||||
$id = $question->getID();
|
||||
|
||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||
|
@ -86,7 +94,7 @@ final class PonderQuestionViewController extends PonderController {
|
|||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($request->getUser())
|
||||
->setUser($viewer)
|
||||
->setObject($question)
|
||||
->setObjectURI($request->getRequestURI());
|
||||
|
||||
|
@ -130,16 +138,12 @@ final class PonderQuestionViewController extends PonderController {
|
|||
PonderQuestion $question,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
->setObject($question)
|
||||
->setActionList($actions);
|
||||
|
||||
$view->addProperty(
|
||||
pht('Status'),
|
||||
PonderQuestionStatus::getQuestionStatusFullName($question->getStatus()));
|
||||
|
||||
$view->addProperty(
|
||||
pht('Author'),
|
||||
$viewer->renderHandle($question->getAuthorPHID()));
|
||||
|
@ -209,8 +213,7 @@ final class PonderQuestionViewController extends PonderController {
|
|||
* standard fashion. This is necessary to scale this application.
|
||||
*/
|
||||
private function buildAnswers(array $answers) {
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$out = array();
|
||||
|
||||
|
@ -283,9 +286,8 @@ final class PonderQuestionViewController extends PonderController {
|
|||
}
|
||||
|
||||
private function buildAnswerActions(PonderAnswer $answer) {
|
||||
$viewer = $this->getViewer();
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
|
||||
$id = $answer->getID();
|
||||
|
||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||
|
@ -294,7 +296,7 @@ final class PonderQuestionViewController extends PonderController {
|
|||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setUser($request->getUser())
|
||||
->setUser($viewer)
|
||||
->setObject($answer)
|
||||
->setObjectURI($request->getRequestURI());
|
||||
|
||||
|
@ -319,7 +321,7 @@ final class PonderQuestionViewController extends PonderController {
|
|||
PonderAnswer $answer,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
$viewer = $this->getViewer();
|
||||
$view = id(new PHUIPropertyListView())
|
||||
->setUser($viewer)
|
||||
->setObject($answer)
|
||||
|
@ -366,7 +368,7 @@ final class PonderQuestionViewController extends PonderController {
|
|||
$hide_id = celerity_generate_unique_node_id();
|
||||
|
||||
Javelin::initBehavior('phabricator-reveal-content');
|
||||
require_celerity_resource('ponder-comment-table-css');
|
||||
require_celerity_resource('ponder-view-css');
|
||||
|
||||
$show = phutil_tag(
|
||||
'div',
|
||||
|
@ -389,6 +391,7 @@ final class PonderQuestionViewController extends PonderController {
|
|||
$hide = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'ponder-comments-view',
|
||||
'id' => $hide_id,
|
||||
'style' => 'display: none',
|
||||
),
|
||||
|
|
|
@ -28,7 +28,7 @@ final class PonderVotableView extends AphrontView {
|
|||
}
|
||||
|
||||
public function render() {
|
||||
require_celerity_resource('ponder-vote-css');
|
||||
require_celerity_resource('ponder-view-css');
|
||||
require_celerity_resource('javelin-behavior-ponder-votebox');
|
||||
|
||||
Javelin::initBehavior('ponder-votebox', array());
|
||||
|
|
|
@ -1,85 +0,0 @@
|
|||
/**
|
||||
* @provides ponder-comment-table-css
|
||||
*/
|
||||
|
||||
.ponder-show-comments {
|
||||
text-align: center;
|
||||
padding: 8px;
|
||||
margin: 0 16px;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid {$blueborder};
|
||||
border-left: 1px solid {$lightblueborder};
|
||||
border-right: 1px solid {$lightblueborder};
|
||||
}
|
||||
|
||||
.ponder-comments {
|
||||
width: 480px;
|
||||
margin: 5px 0 0 60px;
|
||||
}
|
||||
|
||||
.device .ponder-comments {
|
||||
width: 100%;
|
||||
margin: 5px 0 0 0;
|
||||
}
|
||||
|
||||
.ponder-comments th {
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
.ponder-comments td {
|
||||
vertical-align: top;
|
||||
padding: 6px;
|
||||
border-bottom: 1px solid {$thinblueborder};
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.ponder-datestamp {
|
||||
font-size: {$smallestfontsize};
|
||||
color: {$greytext};
|
||||
}
|
||||
|
||||
.ponder-label {
|
||||
display: block;
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin: 0px 0px 6px;
|
||||
padding: 6px 4px;
|
||||
background: #ccc;
|
||||
border-bottom: 1px solid #aaa;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
td .aphront-form-control {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
td .aphront-form-control-submit {
|
||||
display: block;
|
||||
}
|
||||
|
||||
td .aphront-form-input {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td .aphront-form-control textarea {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.ponder-comment-markup p {
|
||||
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;
|
||||
font-weight: normal;
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
/**
|
||||
* @provides ponder-feed-view-css
|
||||
*/
|
||||
|
||||
.ponder-question-summary {
|
||||
width: 100%;
|
||||
background: #DFDFE3;
|
||||
float: left;
|
||||
clear: both;
|
||||
margin-top: 1px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.ponder-answer-summary {
|
||||
width : 100%;
|
||||
background : #DFDFE3;
|
||||
float : left;
|
||||
clear : both;
|
||||
margin-top : 1px;
|
||||
padding : 1px;
|
||||
}
|
||||
|
||||
.ponder-summary-votes {
|
||||
width : 50px;
|
||||
height : 36pt;
|
||||
font-size : 18pt;
|
||||
text-align : center;
|
||||
background : #EEE;
|
||||
border : 1px solid #BBB;
|
||||
float : left;
|
||||
margin : 2px;
|
||||
padding-top : 2px;
|
||||
}
|
||||
|
||||
.ponder-summary-answers {
|
||||
width : 50px;
|
||||
height : 36pt;
|
||||
font-size : 18pt;
|
||||
text-align : center;
|
||||
background : #EEE;
|
||||
border : 1px solid #BBB;
|
||||
float : left;
|
||||
margin : 2px;
|
||||
padding-top : 2px;
|
||||
}
|
||||
|
||||
.ponder-question-label {
|
||||
font-size : 6pt;
|
||||
}
|
||||
|
||||
h2.ponder-question-title {
|
||||
font-size : 12pt;
|
||||
margin : 2px;
|
||||
padding : 0;
|
||||
}
|
||||
|
||||
h2.ponder-answer-title {
|
||||
font-size : 12pt;
|
||||
margin : 2px;
|
||||
padding : 0;
|
||||
}
|
||||
|
||||
.ponder-metadata {
|
||||
padding-left : 5px;
|
||||
width : 650px;
|
||||
float : left;
|
||||
}
|
||||
|
||||
.ponder-small-metadata {
|
||||
font-size : 7.5pt;
|
||||
color : #555;
|
||||
margin : 0;
|
||||
text-align : right;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @provides ponder-vote-css
|
||||
* @provides ponder-view-css
|
||||
*/
|
||||
|
||||
.ponder-votable {
|
||||
|
@ -40,3 +40,20 @@
|
|||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ponder-show-comments {
|
||||
text-align: center;
|
||||
padding: 8px;
|
||||
margin: 0 16px;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid {$blueborder};
|
||||
border-left: 1px solid {$lightblueborder};
|
||||
border-right: 1px solid {$lightblueborder};
|
||||
}
|
||||
|
||||
.device-desktop .ponder-comments-view {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/**
|
||||
* @provides ponder-post-css
|
||||
*/
|
||||
|
||||
.ponder-post-list {
|
||||
max-width: 1162px;
|
||||
}
|
||||
|
||||
.ponder-add-answer-panel {
|
||||
max-width: 1162px;
|
||||
}
|
||||
|
||||
.ponder-post-list .anchor-target {
|
||||
background-color: #ffffdd;
|
||||
border-color: #ffff00;
|
||||
}
|
||||
|
||||
.ponder-post-core .phabricator-remarkup .remarkup-code-block {
|
||||
width: 88ex;
|
||||
width: 81ch;
|
||||
}
|
||||
|
||||
.ponder-question {
|
||||
background: white;
|
||||
}
|
Loading…
Reference in a new issue