1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-15 18:10:53 +01:00

(stable) Promote 2017 Week 30

This commit is contained in:
epriestley 2017-07-28 15:13:56 -07:00
commit fec09eac3c
18 changed files with 256 additions and 71 deletions

View file

@ -9,11 +9,11 @@ return array(
'names' => array( 'names' => array(
'conpherence.pkg.css' => 'e68cf1fa', 'conpherence.pkg.css' => 'e68cf1fa',
'conpherence.pkg.js' => 'b5b51108', 'conpherence.pkg.js' => 'b5b51108',
'core.pkg.css' => 'f1c7630f', 'core.pkg.css' => 'd9c9cfd0',
'core.pkg.js' => '5d80e0db', 'core.pkg.js' => '5d80e0db',
'darkconsole.pkg.js' => '1f9a31bc', 'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e', 'differential.pkg.css' => '45951e9e',
'differential.pkg.js' => '414ada25', 'differential.pkg.js' => 'b71b8c5d',
'diffusion.pkg.css' => 'a2d17c7d', 'diffusion.pkg.css' => 'a2d17c7d',
'diffusion.pkg.js' => '6134c5a1', 'diffusion.pkg.js' => '6134c5a1',
'favicon.ico' => '30672e08', 'favicon.ico' => '30672e08',
@ -75,7 +75,7 @@ return array(
'rsrc/css/application/diffusion/diffusion-readme.css' => '419dd5b6', 'rsrc/css/application/diffusion/diffusion-readme.css' => '419dd5b6',
'rsrc/css/application/diffusion/diffusion-repository.css' => 'ee6f20ec', 'rsrc/css/application/diffusion/diffusion-repository.css' => 'ee6f20ec',
'rsrc/css/application/diffusion/diffusion-source.css' => '750add59', 'rsrc/css/application/diffusion/diffusion-source.css' => '750add59',
'rsrc/css/application/diffusion/diffusion.css' => '8d01932f', 'rsrc/css/application/diffusion/diffusion.css' => '67bd971b',
'rsrc/css/application/feed/feed.css' => 'ecd4ec57', 'rsrc/css/application/feed/feed.css' => 'ecd4ec57',
'rsrc/css/application/files/global-drag-and-drop.css' => 'b556a948', 'rsrc/css/application/files/global-drag-and-drop.css' => 'b556a948',
'rsrc/css/application/flag/flag.css' => 'bba8f811', 'rsrc/css/application/flag/flag.css' => 'bba8f811',
@ -127,7 +127,7 @@ return array(
'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829', 'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829',
'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494', 'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494',
'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68', 'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68',
'rsrc/css/phui/button/phui-button.css' => '022581b4', 'rsrc/css/phui/button/phui-button.css' => '3ca51caa',
'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893', 'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893',
'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600', 'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600',
'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf', 'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf',
@ -156,7 +156,7 @@ return array(
'rsrc/css/phui/phui-feed-story.css' => '44a9c8e9', 'rsrc/css/phui/phui-feed-story.css' => '44a9c8e9',
'rsrc/css/phui/phui-fontkit.css' => '1320ed01', 'rsrc/css/phui/phui-fontkit.css' => '1320ed01',
'rsrc/css/phui/phui-form-view.css' => '6175808d', 'rsrc/css/phui/phui-form-view.css' => '6175808d',
'rsrc/css/phui/phui-form.css' => 'efa86a27', 'rsrc/css/phui/phui-form.css' => '7aaa04e3',
'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f',
'rsrc/css/phui/phui-header-view.css' => 'e7de7ee2', 'rsrc/css/phui/phui-header-view.css' => 'e7de7ee2',
'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf', 'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf',
@ -398,7 +398,7 @@ return array(
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375',
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63',
'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd', 'rsrc/js/application/diff/DiffChangeset.js' => '99abf4cd',
'rsrc/js/application/diff/DiffChangesetList.js' => 'cb1570cb', 'rsrc/js/application/diff/DiffChangesetList.js' => '8f1cd52c',
'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3', 'rsrc/js/application/diff/DiffInline.js' => 'e83d28f3',
'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832',
'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07',
@ -571,7 +571,7 @@ return array(
'differential-revision-history-css' => '0e8eb855', 'differential-revision-history-css' => '0e8eb855',
'differential-revision-list-css' => 'f3c47d33', 'differential-revision-list-css' => 'f3c47d33',
'differential-table-of-contents-css' => 'ae4b7a55', 'differential-table-of-contents-css' => 'ae4b7a55',
'diffusion-css' => '8d01932f', 'diffusion-css' => '67bd971b',
'diffusion-icons-css' => '0c15255e', 'diffusion-icons-css' => '0c15255e',
'diffusion-readme-css' => '419dd5b6', 'diffusion-readme-css' => '419dd5b6',
'diffusion-repository-css' => 'ee6f20ec', 'diffusion-repository-css' => 'ee6f20ec',
@ -778,7 +778,7 @@ return array(
'phabricator-darkmessage' => 'c48cccdd', 'phabricator-darkmessage' => 'c48cccdd',
'phabricator-dashboard-css' => 'fe5b1869', 'phabricator-dashboard-css' => 'fe5b1869',
'phabricator-diff-changeset' => '99abf4cd', 'phabricator-diff-changeset' => '99abf4cd',
'phabricator-diff-changeset-list' => 'cb1570cb', 'phabricator-diff-changeset-list' => '8f1cd52c',
'phabricator-diff-inline' => 'e83d28f3', 'phabricator-diff-inline' => 'e83d28f3',
'phabricator-drag-and-drop-file-upload' => '58dea2fa', 'phabricator-drag-and-drop-file-upload' => '58dea2fa',
'phabricator-draggable-list' => 'bea6e7f4', 'phabricator-draggable-list' => 'bea6e7f4',
@ -825,7 +825,7 @@ return array(
'phui-big-info-view-css' => 'd13afcde', 'phui-big-info-view-css' => 'd13afcde',
'phui-box-css' => '745e881d', 'phui-box-css' => '745e881d',
'phui-button-bar-css' => 'f1ff5494', 'phui-button-bar-css' => 'f1ff5494',
'phui-button-css' => '022581b4', 'phui-button-css' => '3ca51caa',
'phui-button-simple-css' => '8e1baf68', 'phui-button-simple-css' => '8e1baf68',
'phui-calendar-css' => 'f1ddf11c', 'phui-calendar-css' => 'f1ddf11c',
'phui-calendar-day-css' => '572b1893', 'phui-calendar-day-css' => '572b1893',
@ -843,7 +843,7 @@ return array(
'phui-feed-story-css' => '44a9c8e9', 'phui-feed-story-css' => '44a9c8e9',
'phui-font-icon-base-css' => '870a7360', 'phui-font-icon-base-css' => '870a7360',
'phui-fontkit-css' => '1320ed01', 'phui-fontkit-css' => '1320ed01',
'phui-form-css' => 'efa86a27', 'phui-form-css' => '7aaa04e3',
'phui-form-view-css' => '6175808d', 'phui-form-view-css' => '6175808d',
'phui-head-thing-view-css' => 'fd311e5f', 'phui-head-thing-view-css' => 'fd311e5f',
'phui-header-view-css' => 'e7de7ee2', 'phui-header-view-css' => 'e7de7ee2',
@ -1567,6 +1567,10 @@ return array(
'8e1baf68' => array( '8e1baf68' => array(
'phui-button-css', 'phui-button-css',
), ),
'8f1cd52c' => array(
'javelin-install',
'phuix-button-view',
),
'8ff5e24c' => array( '8ff5e24c' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',
@ -1950,10 +1954,6 @@ return array(
'cae95e89' => array( 'cae95e89' => array(
'syntax-default-css', 'syntax-default-css',
), ),
'cb1570cb' => array(
'javelin-install',
'phuix-button-view',
),
'ccf1cbf8' => array( 'ccf1cbf8' => array(
'javelin-install', 'javelin-install',
'javelin-dom', 'javelin-dom',

View file

@ -0,0 +1,2 @@
UPDATE {$NAMESPACE}_legalpad.legalpad_documentbody
SET dateCreated = dateModified;

View file

@ -298,6 +298,9 @@ final class DifferentialChangesetListView extends AphrontView {
'Show All Inlines' => pht('Show All Inlines'), 'Show All Inlines' => pht('Show All Inlines'),
'List Inline Comments' => pht('List Inline Comments'), 'List Inline Comments' => pht('List Inline Comments'),
'Hide or show all inline comments.' =>
pht('Hide or show all inline comments.'),
), ),
)); ));

View file

@ -4,7 +4,7 @@ final class DiffusionRepositoryController extends DiffusionController {
private $historyFuture; private $historyFuture;
private $browseFuture; private $browseFuture;
private $tagFuture; private $branchButton = null;
private $branchFuture; private $branchFuture;
public function shouldAllowPublic() { public function shouldAllowPublic() {
@ -53,15 +53,25 @@ final class DiffusionRepositoryController extends DiffusionController {
// This is a valid branch, so we necessarily have some content. // This is a valid branch, so we necessarily have some content.
$page_has_content = true; $page_has_content = true;
} else { } else {
$empty_title = pht('No Such Branch'); $default = $repository->getDefaultBranch();
$empty_message = pht( if ($default != $drequest->getBranch()) {
'There is no branch named "%s" in this repository.', $empty_title = pht('No Such Branch');
$drequest->getBranch()); $empty_message = pht(
'There is no branch named "%s" in this repository.',
$drequest->getBranch());
} else {
$empty_title = pht('No Default Branch');
$empty_message = pht(
'This repository is configured with default branch "%s" but '.
'there is no branch with that name in this repository.',
$default);
}
} }
} }
// If we didn't find any branches, check if there are any commits at all. // If we didn't find any branches, check if there are any commits at all.
// This can tailor the message for empty repositories. // This can tailor the message for empty repositories.
$any_commit = null;
if (!$page_has_content) { if (!$page_has_content) {
$any_commit = id(new DiffusionCommitQuery()) $any_commit = id(new DiffusionCommitQuery())
->setViewer($viewer) ->setViewer($viewer)
@ -81,6 +91,9 @@ final class DiffusionRepositoryController extends DiffusionController {
if ($page_has_content) { if ($page_has_content) {
$content = $this->buildNormalContent($drequest); $content = $this->buildNormalContent($drequest);
} else { } else {
// If we have a commit somewhere, find branches.
// TODO: Evan will replace
// $this->buildNormalContent($drequest);
$content = id(new PHUIInfoView()) $content = id(new PHUIInfoView())
->setTitle($empty_title) ->setTitle($empty_title)
->setSeverity(PHUIInfoView::SEVERITY_WARNING) ->setSeverity(PHUIInfoView::SEVERITY_WARNING)
@ -110,7 +123,7 @@ final class DiffusionRepositoryController extends DiffusionController {
$bar = id(new PHUILeftRightView()) $bar = id(new PHUILeftRightView())
->setLeft($locate_file) ->setLeft($locate_file)
->setRight($clone_button) ->setRight(array($this->branchButton, $clone_button))
->addClass('diffusion-action-bar'); ->addClass('diffusion-action-bar');
$view = id(new PHUITwoColumnView()) $view = id(new PHUITwoColumnView())
@ -145,6 +158,7 @@ final class DiffusionRepositoryController extends DiffusionController {
$commit = $drequest->getCommit(); $commit = $drequest->getCommit();
$path = $drequest->getPath(); $path = $drequest->getPath();
$futures = array();
$this->historyFuture = $this->callConduitMethod( $this->historyFuture = $this->callConduitMethod(
'diffusion.historyquery', 'diffusion.historyquery',
array( array(
@ -153,6 +167,7 @@ final class DiffusionRepositoryController extends DiffusionController {
'offset' => 0, 'offset' => 0,
'limit' => 15, 'limit' => 15,
)); ));
$futures[] = $this->historyFuture;
$browse_pager = id(new PHUIPagerView()) $browse_pager = id(new PHUIPagerView())
->readFromRequest($request); ->readFromRequest($request);
@ -164,11 +179,19 @@ final class DiffusionRepositoryController extends DiffusionController {
'path' => $path, 'path' => $path,
'limit' => $browse_pager->getPageSize() + 1, 'limit' => $browse_pager->getPageSize() + 1,
)); ));
$futures[] = $this->browseFuture;
if ($this->needBranchFuture()) {
$branch_limit = $this->getBranchLimit();
$this->branchFuture = $this->callConduitMethod(
'diffusion.branchquery',
array(
'closed' => false,
'limit' => $branch_limit + 1,
));
$futures[] = $this->branchFuture;
}
$futures = array(
$this->historyFuture,
$this->browseFuture,
);
$futures = array_filter($futures); $futures = array_filter($futures);
$futures = new FutureIterator($futures); $futures = new FutureIterator($futures);
foreach ($futures as $future) { foreach ($futures as $future) {
@ -253,6 +276,18 @@ final class DiffusionRepositoryController extends DiffusionController {
$content[] = $readme; $content[] = $readme;
} }
try {
$branch_button = $this->buildBranchList($drequest);
$this->branchButton = $branch_button;
} catch (Exception $ex) {
if (!$repository->isImporting()) {
$content[] = $this->renderStatusMessage(
pht('Unable to Load Branches'),
$ex->getMessage());
}
}
return $content; return $content;
} }
@ -375,6 +410,67 @@ final class DiffusionRepositoryController extends DiffusionController {
return $panel; return $panel;
} }
private function buildBranchList(DiffusionRequest $drequest) {
$viewer = $this->getViewer();
if (!$this->needBranchFuture()) {
return null;
}
$branches = $this->branchFuture->resolve();
if (!$branches) {
return null;
}
$limit = $this->getBranchLimit();
$more_branches = (count($branches) > $limit);
$branches = array_slice($branches, 0, $limit);
$branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches);
$actions = id(new PhabricatorActionListView())
->setViewer($viewer);
foreach ($branches as $branch) {
$branch_uri = $drequest->generateURI(
array(
'action' => 'browse',
'branch' => $branch->getShortname(),
));
$actions->addAction(
id(new PhabricatorActionView())
->setName($branch->getShortname())
->setIcon('fa-code-fork')
->setHref($branch_uri));
}
if ($more_branches) {
$more_uri = $drequest->generateURI(
array(
'action' => 'branches',
));
$actions->addAction(
id(new PhabricatorActionView())
->setType(PhabricatorActionView::TYPE_DIVIDER));
$actions->addAction(
id(new PhabricatorActionView())
->setName(pht('See More Branches'))
->setIcon('fa-external-link')
->setHref($more_uri));
}
$button = id(new PHUIButtonView())
->setText(pht('Branch: %s', $drequest->getBranch()))
->setTag('a')
->addClass('mmr')
->setIcon('fa-code-fork')
->setColor(PHUIButtonView::GREY)
->setDropdown(true)
->setDropdownMenu($actions);
return $button;
}
private function buildLocateFile() { private function buildLocateFile() {
$request = $this->getRequest(); $request = $this->getRequest();
$viewer = $request->getUser(); $viewer = $request->getUser();
@ -457,7 +553,17 @@ final class DiffusionRepositoryController extends DiffusionController {
->setPager($pager); ->setPager($pager);
} }
private function getTagLimit() { private function needBranchFuture() {
$drequest = $this->getDiffusionRequest();
if ($drequest->getBranch() === null) {
return false;
}
return true;
}
private function getBranchLimit() {
return 15; return 15;
} }

View file

@ -58,7 +58,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
* @task sync * @task sync
*/ */
public function synchronizeWorkingCopyAfterCreation() { public function synchronizeWorkingCopyAfterCreation() {
if (!$this->shouldEnableSynchronization()) { if (!$this->shouldEnableSynchronization(false)) {
return; return;
} }
@ -86,7 +86,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
* @task sync * @task sync
*/ */
public function synchronizeWorkingCopyAfterHostingChange() { public function synchronizeWorkingCopyAfterHostingChange() {
if (!$this->shouldEnableSynchronization()) { if (!$this->shouldEnableSynchronization(false)) {
return; return;
} }
@ -133,7 +133,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
* @task sync * @task sync
*/ */
public function synchronizeWorkingCopyBeforeRead() { public function synchronizeWorkingCopyBeforeRead() {
if (!$this->shouldEnableSynchronization()) { if (!$this->shouldEnableSynchronization(true)) {
return; return;
} }
@ -288,7 +288,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
* @task sync * @task sync
*/ */
public function synchronizeWorkingCopyBeforeWrite() { public function synchronizeWorkingCopyBeforeWrite() {
if (!$this->shouldEnableSynchronization()) { if (!$this->shouldEnableSynchronization(true)) {
return; return;
} }
@ -382,7 +382,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
public function synchronizeWorkingCopyAfterDiscovery($new_version) { public function synchronizeWorkingCopyAfterDiscovery($new_version) {
if (!$this->shouldEnableSynchronization()) { if (!$this->shouldEnableSynchronization(true)) {
return; return;
} }
@ -426,7 +426,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
* @task sync * @task sync
*/ */
public function synchronizeWorkingCopyAfterWrite() { public function synchronizeWorkingCopyAfterWrite() {
if (!$this->shouldEnableSynchronization()) { if (!$this->shouldEnableSynchronization(true)) {
return; return;
} }
@ -551,7 +551,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
/** /**
* @task internal * @task internal
*/ */
private function shouldEnableSynchronization() { private function shouldEnableSynchronization($require_device) {
$repository = $this->getRepository(); $repository = $this->getRepository();
$service_phid = $repository->getAlmanacServicePHID(); $service_phid = $repository->getAlmanacServicePHID();
@ -563,9 +563,11 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
return false; return false;
} }
$device = AlmanacKeys::getLiveDevice(); if ($require_device) {
if (!$device) { $device = AlmanacKeys::getLiveDevice();
return false; if (!$device) {
return false;
}
} }
return true; return true;

View file

@ -45,18 +45,23 @@ final class LegalpadDocumentEditor
} }
if ($is_contribution) { if ($is_contribution) {
$text = $object->getDocumentBody()->getText();
$title = $object->getDocumentBody()->getTitle();
$object->setVersions($object->getVersions() + 1); $object->setVersions($object->getVersions() + 1);
$body = $object->getDocumentBody();
$body = new LegalpadDocumentBody();
$body->setCreatorPHID($this->getActingAsPHID());
$body->setText($text);
$body->setTitle($title);
$body->setVersion($object->getVersions()); $body->setVersion($object->getVersions());
$body->setDocumentPHID($object->getPHID()); $body->setDocumentPHID($object->getPHID());
$body->save(); $body->save();
$object->setDocumentBodyPHID($body->getPHID()); $object->setDocumentBodyPHID($body->getPHID());
$actor = $this->getActor();
$type = PhabricatorContributedToObjectEdgeType::EDGECONST; $type = PhabricatorContributedToObjectEdgeType::EDGECONST;
id(new PhabricatorEdgeEditor()) id(new PhabricatorEdgeEditor())
->addEdge($actor->getPHID(), $type, $object->getPHID()) ->addEdge($this->getActingAsPHID(), $type, $object->getPHID())
->save(); ->save();
$type = PhabricatorObjectHasContributorEdgeType::EDGECONST; $type = PhabricatorObjectHasContributorEdgeType::EDGECONST;

View file

@ -24,6 +24,10 @@ final class ManiphestReplyHandler
$xactions = array(); $xactions = array();
if ($is_new) { if ($is_new) {
$xactions[] = $this->newTransaction()
->setTransactionType(PhabricatorTransactions::TYPE_CREATE)
->setNewValue(true);
$xactions[] = $this->newTransaction() $xactions[] = $this->newTransaction()
->setTransactionType(ManiphestTaskTitleTransaction::TRANSACTIONTYPE) ->setTransactionType(ManiphestTaskTitleTransaction::TRANSACTIONTYPE)
->setNewValue(nonempty($mail->getSubject(), pht('Untitled Task'))); ->setNewValue(nonempty($mail->getSubject(), pht('Untitled Task')));

View file

@ -94,7 +94,7 @@ final class PonderQuestionViewController extends PonderController {
$wiki = new PHUIRemarkupView($viewer, $question->getAnswerWiki()); $wiki = new PHUIRemarkupView($viewer, $question->getAnswerWiki());
$answer_wiki = id(new PHUIObjectBoxView()) $answer_wiki = id(new PHUIObjectBoxView())
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setHeaderText(pht('ANSWER SUMMARY')) ->setHeaderText(pht('Answer Summary'))
->appendChild($wiki) ->appendChild($wiki)
->addClass('ponder-answer-wiki'); ->addClass('ponder-answer-wiki');
} }

View file

@ -10,11 +10,11 @@ final class PonderQuestionEditor
} }
public function getCreateObjectTitle($author, $object) { public function getCreateObjectTitle($author, $object) {
return pht('%s created this question.', $author); return pht('%s asked this question.', $author);
} }
public function getCreateObjectTitleForFeed($author, $object) { public function getCreateObjectTitleForFeed($author, $object) {
return pht('%s created %s.', $author, $object); return pht('%s asked %s.', $author, $object);
} }
/** /**

View file

@ -23,4 +23,11 @@ final class PonderAnswerTransaction
return 'PonderAnswerTransactionType'; return 'PonderAnswerTransactionType';
} }
public function getMailTags() {
$tags = parent::getMailTags();
$tags[] = PonderQuestionTransaction::MAILTAG_OTHER;
return $tags;
}
} }

View file

@ -14,12 +14,29 @@ final class PonderAnswerContentTransaction
} }
public function getTitle() { public function getTitle() {
$old = $this->getOldValue();
if (!strlen($old)) {
return pht(
'%s added an answer.',
$this->renderAuthor());
}
return pht( return pht(
'%s updated the answer details.', '%s updated the answer details.',
$this->renderAuthor()); $this->renderAuthor());
} }
public function getTitleForFeed() { public function getTitleForFeed() {
$old = $this->getOldValue();
if (!strlen($old)) {
return pht(
'%s added %s.',
$this->renderAuthor(),
$this->renderObject());
}
return pht( return pht(
'%s updated the answer details for %s.', '%s updated the answer details for %s.',
$this->renderAuthor(), $this->renderAuthor(),

View file

@ -554,7 +554,7 @@ final class PhabricatorApplicationSearchController
return id(new PHUIButtonView()) return id(new PHUIButtonView())
->setTag('a') ->setTag('a')
->setHref('#') ->setHref('#')
->setText(pht('Use Results...')) ->setText(pht('Use Results'))
->setIcon('fa-bars') ->setIcon('fa-bars')
->setDropdownMenu($action_list) ->setDropdownMenu($action_list)
->addClass('dropdown'); ->addClass('dropdown');

View file

@ -134,6 +134,7 @@ final class PHUIButtonView extends AphrontTagView {
Javelin::initBehavior('phui-dropdown-menu'); Javelin::initBehavior('phui-dropdown-menu');
$this->addSigil('phui-dropdown-menu'); $this->addSigil('phui-dropdown-menu');
$this->setDropdown(true);
$this->setMetadata($actions->getDropdownMenuMetadata()); $this->setMetadata($actions->getDropdownMenuMetadata());
return $this; return $this;
@ -223,32 +224,29 @@ final class PHUIButtonView extends AphrontTagView {
protected function getTagContent() { protected function getTagContent() {
$icon = null; $icon = $this->icon;
$text = $this->text; $text = null;
if ($this->icon) { $subtext = null;
$icon = $this->icon;
$subtext = null; if ($this->subtext) {
if ($this->subtext) { $subtext = phutil_tag(
$subtext = phutil_tag( 'div',
'div', array(
array( 'class' => 'phui-button-subtext',
'class' => 'phui-button-subtext', ),
), $this->subtext);
$this->subtext); }
}
if ($this->text !== null) { if ($this->text !== null) {
$text = phutil_tag( $text = phutil_tag(
'div', 'div',
array( array(
'class' => 'phui-button-text', 'class' => 'phui-button-text',
), ),
array( array(
$text, $this->text,
$subtext, $subtext,
)); ));
}
} }
$caret = null; $caret = null;
@ -259,7 +257,7 @@ final class PHUIButtonView extends AphrontTagView {
if ($this->iconFirst == true) { if ($this->iconFirst == true) {
return array($icon, $text, $caret); return array($icon, $text, $caret);
} else { } else {
return array($text, $icon); return array($text, $icon, $caret);
} }
} }
} }

View file

@ -16,6 +16,23 @@
margin-bottom: 16px; margin-bottom: 16px;
} }
.device-phone .diffusion-action-bar {
display: block;
}
.device-phone .diffusion-action-bar .phui-lr-container {
display: block;
}
.device-phone .diffusion-action-bar .phui-lr-container .phui-left-view {
display: block;
}
.device-phone .diffusion-action-bar .phui-lr-container .phui-right-view {
padding-top: 12px;
display: block;
}
.diffusion-profile-locate .phui-form-view { .diffusion-profile-locate .phui-form-view {
margin: 0; margin: 0;
padding: 0; padding: 0;

View file

@ -265,6 +265,14 @@ a.policy-control .phui-button-text {
right: 10px; right: 10px;
} }
.phui-button-text {
display: inline-block;
}
.dropdown .phui-button-text {
margin-right: 8px;
}
.button.has-icon .phui-button-text { .button.has-icon .phui-button-text {
margin-left: 16px; margin-left: 16px;
} }

View file

@ -22,7 +22,7 @@ div.jx-tokenizer-container {
display: inline-block; display: inline-block;
height: 30px; height: 30px;
line-height: 18px; line-height: 18px;
color: {$darkbluetext}; color: inherit;
vertical-align: middle; vertical-align: middle;
font: {$basefont}; font: {$basefont};
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
@ -108,7 +108,6 @@ select {
background: {$page.content} url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC") no-repeat right 8px center; background: {$page.content} url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC") no-repeat right 8px center;
background-size: 8px 10px; background-size: 8px 10px;
border-radius: 3px; border-radius: 3px;
color: {$darkbluetext};
border: 1px solid {$greyborder}; border: 1px solid {$greyborder};
height: 30px; height: 30px;
padding: 0 24px 0 8px; padding: 0 24px 0 8px;

View file

@ -344,8 +344,8 @@
} }
.phui-timeline-older-transactions-are-hidden { .phui-timeline-older-transactions-are-hidden {
background: {$sh-yellowbackground}; background: {$gentle.highlight};
border: 1px solid {$sh-yellowborder}; border: 1px solid {$gentle.highlight.border};
text-align: center; text-align: center;
padding: 12px; padding: 12px;
color: {$darkgreytext}; color: {$darkgreytext};

View file

@ -190,6 +190,10 @@ JX.install('DiffChangesetList', {
label = pht('Collapse or expand inline comment.'); label = pht('Collapse or expand inline comment.');
this._installKey('q', label, this._onkeycollapse); this._installKey('q', label, this._onkeycollapse);
label = pht('Hide or show all inline comments.');
this._installKey('A', label, this._onkeyhideall);
}, },
isAsleep: function() { isAsleep: function() {
@ -448,6 +452,15 @@ JX.install('DiffChangesetList', {
this._warnUser(pht('You must select a comment to hide.')); this._warnUser(pht('You must select a comment to hide.'));
}, },
_onkeyhideall: function() {
var inlines = this._getInlinesByType();
if (inlines.visible.length) {
this._toggleInlines('all');
} else {
this._toggleInlines('show');
}
},
_warnUser: function(message) { _warnUser: function(message) {
new JX.Notification() new JX.Notification()
.setContent(message) .setContent(message)
@ -1701,6 +1714,10 @@ JX.install('DiffChangesetList', {
this._dropdownMenu.close(); this._dropdownMenu.close();
e.prevent(); e.prevent();
this._toggleInlines(type);
},
_toggleInlines: function(type) {
var inlines = this._getInlinesByType(); var inlines = this._getInlinesByType();
// Clear the selection state since we end up in a weird place if the // Clear the selection state since we end up in a weird place if the