mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Transactions - adding willRenderTimeline to handle tricky cases
Summary: Fixes T6693. Test Plan: Made a bunch of comments on a diff with differential, being sure to leave inlines here and there. This reproduced the issue in T6693. With this patch this issue no longer reproduces! Successfully "showed older changes" in Maniphest too. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6693 Differential Revision: https://secure.phabricator.com/D10931
This commit is contained in:
parent
20035fe9a8
commit
6ab3f06b6e
48 changed files with 373 additions and 19 deletions
|
@ -421,7 +421,7 @@ return array(
|
||||||
'rsrc/js/application/repository/repository-crossreference.js' => 'f9539603',
|
'rsrc/js/application/repository/repository-crossreference.js' => 'f9539603',
|
||||||
'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08',
|
'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08',
|
||||||
'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => 'd6f54db0',
|
'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => 'd6f54db0',
|
||||||
'rsrc/js/application/transactions/behavior-show-older-transactions.js' => 'c30ccda9',
|
'rsrc/js/application/transactions/behavior-show-older-transactions.js' => '83458cbb',
|
||||||
'rsrc/js/application/transactions/behavior-transaction-comment-form.js' => '9f7309fb',
|
'rsrc/js/application/transactions/behavior-transaction-comment-form.js' => '9f7309fb',
|
||||||
'rsrc/js/application/transactions/behavior-transaction-list.js' => '13c739ea',
|
'rsrc/js/application/transactions/behavior-transaction-list.js' => '13c739ea',
|
||||||
'rsrc/js/application/uiexample/JavelinViewExample.js' => 'd4a14807',
|
'rsrc/js/application/uiexample/JavelinViewExample.js' => 'd4a14807',
|
||||||
|
@ -625,7 +625,7 @@ return array(
|
||||||
'javelin-behavior-phabricator-reveal-content' => '60821bc7',
|
'javelin-behavior-phabricator-reveal-content' => '60821bc7',
|
||||||
'javelin-behavior-phabricator-search-typeahead' => '724b1247',
|
'javelin-behavior-phabricator-search-typeahead' => '724b1247',
|
||||||
'javelin-behavior-phabricator-show-all-transactions' => '7c273581',
|
'javelin-behavior-phabricator-show-all-transactions' => '7c273581',
|
||||||
'javelin-behavior-phabricator-show-older-transactions' => 'c30ccda9',
|
'javelin-behavior-phabricator-show-older-transactions' => '83458cbb',
|
||||||
'javelin-behavior-phabricator-tooltips' => '3ee3408b',
|
'javelin-behavior-phabricator-tooltips' => '3ee3408b',
|
||||||
'javelin-behavior-phabricator-transaction-comment-form' => '9f7309fb',
|
'javelin-behavior-phabricator-transaction-comment-form' => '9f7309fb',
|
||||||
'javelin-behavior-phabricator-transaction-list' => '13c739ea',
|
'javelin-behavior-phabricator-transaction-list' => '13c739ea',
|
||||||
|
@ -1375,6 +1375,12 @@ return array(
|
||||||
'82ce2142' => array(
|
'82ce2142' => array(
|
||||||
'aphront-typeahead-control-css',
|
'aphront-typeahead-control-css',
|
||||||
),
|
),
|
||||||
|
'83458cbb' => array(
|
||||||
|
'javelin-behavior',
|
||||||
|
'javelin-stratcom',
|
||||||
|
'javelin-dom',
|
||||||
|
'phabricator-busy',
|
||||||
|
),
|
||||||
'84845b5b' => array(
|
'84845b5b' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
|
@ -1668,12 +1674,6 @@ return array(
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
'phabricator-shaped-request',
|
'phabricator-shaped-request',
|
||||||
),
|
),
|
||||||
'c30ccda9' => array(
|
|
||||||
'javelin-behavior',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-dom',
|
|
||||||
'phabricator-busy',
|
|
||||||
),
|
|
||||||
'c4569c05' => array(
|
'c4569c05' => array(
|
||||||
'javelin-magical-init',
|
'javelin-magical-init',
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
|
|
|
@ -184,4 +184,11 @@ final class AlmanacBinding
|
||||||
return new AlmanacBindingTransaction();
|
return new AlmanacBindingTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,6 +162,13 @@ final class AlmanacDevice
|
||||||
return new AlmanacDeviceTransaction();
|
return new AlmanacDeviceTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorSSHPublicKeyInterface )----------------------------------- */
|
/* -( PhabricatorSSHPublicKeyInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,13 @@ final class AlmanacNetwork
|
||||||
return new AlmanacNetworkTransaction();
|
return new AlmanacNetworkTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -161,4 +161,11 @@ final class AlmanacService
|
||||||
return new AlmanacServiceTransaction();
|
return new AlmanacServiceTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,13 @@ final class PhabricatorAuthProviderConfig
|
||||||
return new PhabricatorAuthProviderConfigTransaction();
|
return new PhabricatorAuthProviderConfigTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -529,7 +529,8 @@ abstract class PhabricatorController extends AphrontController {
|
||||||
protected function buildTransactionTimeline(
|
protected function buildTransactionTimeline(
|
||||||
PhabricatorApplicationTransactionInterface $object,
|
PhabricatorApplicationTransactionInterface $object,
|
||||||
PhabricatorApplicationTransactionQuery $query,
|
PhabricatorApplicationTransactionQuery $query,
|
||||||
PhabricatorMarkupEngine $engine = null) {
|
PhabricatorMarkupEngine $engine = null,
|
||||||
|
$render_data = array()) {
|
||||||
|
|
||||||
$viewer = $this->getRequest()->getUser();
|
$viewer = $this->getRequest()->getUser();
|
||||||
$xaction = $object->getApplicationTransactionTemplate();
|
$xaction = $object->getApplicationTransactionTemplate();
|
||||||
|
@ -564,7 +565,9 @@ abstract class PhabricatorController extends AphrontController {
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setObjectPHID($object->getPHID())
|
->setObjectPHID($object->getPHID())
|
||||||
->setTransactions($xactions)
|
->setTransactions($xactions)
|
||||||
->setPager($pager);
|
->setPager($pager)
|
||||||
|
->setRenderData($render_data);
|
||||||
|
$object->willRenderTimeline($timeline, $this->getRequest());
|
||||||
|
|
||||||
return $timeline;
|
return $timeline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,13 @@ final class PhabricatorConfigEntry
|
||||||
return new PhabricatorConfigTransaction();
|
return new PhabricatorConfigTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,13 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
|
||||||
return new PhabricatorDashboardTransaction();
|
return new PhabricatorDashboardTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,13 @@ final class PhabricatorDashboardPanel
|
||||||
return new PhabricatorDashboardPanelTransaction();
|
return new PhabricatorDashboardPanelTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -928,12 +928,12 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
|
|
||||||
$timeline = $this->buildTransactionTimeline(
|
$timeline = $this->buildTransactionTimeline(
|
||||||
$revision,
|
$revision,
|
||||||
new DifferentialTransactionQuery());
|
new DifferentialTransactionQuery(),
|
||||||
$timeline
|
$engine = null,
|
||||||
->setChangesets($changesets)
|
array(
|
||||||
->setRevision($revision)
|
'left' => $left_diff->getID(),
|
||||||
->setLeftDiff($left_diff)
|
'right' => $right_diff->getID(),
|
||||||
->setRightDiff($right_diff);
|
));
|
||||||
|
|
||||||
return $timeline;
|
return $timeline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,11 +421,9 @@ final class DifferentialDiff
|
||||||
|
|
||||||
|
|
||||||
public function getApplicationTransactionEditor() {
|
public function getApplicationTransactionEditor() {
|
||||||
|
|
||||||
return new DifferentialDiffEditor();
|
return new DifferentialDiffEditor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getApplicationTransactionObject() {
|
public function getApplicationTransactionObject() {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -434,6 +432,13 @@ final class DifferentialDiff
|
||||||
return new DifferentialDiffTransaction();
|
return new DifferentialDiffTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -475,6 +475,35 @@ final class DifferentialRevision extends DifferentialDAO
|
||||||
return new DifferentialTransaction();
|
return new DifferentialTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
$render_data = $timeline->getRenderData();
|
||||||
|
$left = $request->getInt('left', idx($render_data, 'left'));
|
||||||
|
$right = $request->getInt('right', idx($render_data, 'right'));
|
||||||
|
|
||||||
|
$diffs = id(new DifferentialDiffQuery())
|
||||||
|
->setViewer($request->getUser())
|
||||||
|
->withIDs(array($left, $right))
|
||||||
|
->execute();
|
||||||
|
$diffs = mpull($diffs, null, 'getID');
|
||||||
|
$left_diff = $diffs[$left];
|
||||||
|
$right_diff = $diffs[$right];
|
||||||
|
|
||||||
|
$changesets = id(new DifferentialChangesetQuery())
|
||||||
|
->setViewer($request->getUser())
|
||||||
|
->withDiffs(array($right_diff))
|
||||||
|
->execute();
|
||||||
|
$changesets = mpull($changesets, null, 'getID');
|
||||||
|
|
||||||
|
return $timeline
|
||||||
|
->setChangesets($changesets)
|
||||||
|
->setRevision($this)
|
||||||
|
->setLeftDiff($left_diff)
|
||||||
|
->setRightDiff($right_diff);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,13 @@ final class DrydockBlueprint extends DrydockDAO
|
||||||
return new DrydockBlueprintTransaction();
|
return new DrydockBlueprintTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -1095,6 +1095,13 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
||||||
return new PhabricatorFileTransaction();
|
return new PhabricatorFileTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface Implementation )-------------------------- */
|
/* -( PhabricatorPolicyInterface Implementation )-------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -118,4 +118,11 @@ final class FundBacker extends FundDAO
|
||||||
return new FundBackerTransaction();
|
return new FundBackerTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,6 +149,13 @@ final class FundInitiative extends FundDAO
|
||||||
return new FundInitiativeTransaction();
|
return new FundInitiativeTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorSubscribableInterface )----------------------------------- */
|
/* -( PhabricatorSubscribableInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -242,6 +242,13 @@ final class HarbormasterBuildable extends HarbormasterDAO
|
||||||
return new HarbormasterBuildableTransaction();
|
return new HarbormasterBuildableTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -419,6 +419,13 @@ final class HarbormasterBuild extends HarbormasterDAO
|
||||||
return new HarbormasterBuildTransaction();
|
return new HarbormasterBuildTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,13 @@ final class HarbormasterBuildPlan extends HarbormasterDAO
|
||||||
return new HarbormasterBuildPlanTransaction();
|
return new HarbormasterBuildPlanTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,13 @@ final class HarbormasterBuildStep extends HarbormasterDAO
|
||||||
return new HarbormasterBuildStepTransaction();
|
return new HarbormasterBuildStepTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -265,8 +265,10 @@ final class HeraldRule extends HeraldDAO
|
||||||
return sprintf('~%d%010d', $type_order, $this->getID());
|
return sprintf('~%d%010d', $type_order, $this->getID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorApplicationTransactionInterface )------------------------- */
|
/* -( PhabricatorApplicationTransactionInterface )------------------------- */
|
||||||
|
|
||||||
|
|
||||||
public function getApplicationTransactionEditor() {
|
public function getApplicationTransactionEditor() {
|
||||||
return new HeraldRuleEditor();
|
return new HeraldRuleEditor();
|
||||||
}
|
}
|
||||||
|
@ -279,6 +281,14 @@ final class HeraldRule extends HeraldDAO
|
||||||
return new HeraldRuleTransaction();
|
return new HeraldRuleTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,13 @@ final class LegalpadDocument extends LegalpadDAO
|
||||||
return new LegalpadTransaction();
|
return new LegalpadTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,13 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO
|
||||||
return new PhabricatorMacroTransaction();
|
return new PhabricatorMacroTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorSubscribableInterface )----------------------------------- */
|
/* -( PhabricatorSubscribableInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -374,4 +374,11 @@ final class ManiphestTask extends ManiphestDAO
|
||||||
return new ManiphestTransaction();
|
return new ManiphestTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,13 @@ final class NuanceSource extends NuanceDAO
|
||||||
return new NuanceSourceTransaction();
|
return new NuanceSourceTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getCapabilities() {
|
public function getCapabilities() {
|
||||||
return array(
|
return array(
|
||||||
|
|
|
@ -98,6 +98,13 @@ final class PassphraseCredential extends PassphraseDAO
|
||||||
return new PassphraseCredentialTransaction();
|
return new PassphraseCredentialTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -194,4 +194,11 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
|
||||||
return new PhabricatorPasteTransaction();
|
return new PhabricatorPasteTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,13 @@ final class PhluxVariable extends PhluxDAO
|
||||||
return new PhluxTransaction();
|
return new PhluxTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -264,6 +264,13 @@ final class PholioMock extends PholioDAO
|
||||||
return new PholioTransaction();
|
return new PholioTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
$timeline->setMock($this);
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
/* -( PhabricatorTokenReceiverInterface )---------------------------------- */
|
/* -( PhabricatorTokenReceiverInterface )---------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,13 @@ final class PhortuneAccount extends PhortuneDAO
|
||||||
return new PhortuneAccountTransaction();
|
return new PhortuneAccountTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -614,6 +614,13 @@ final class PhortuneCart extends PhortuneDAO
|
||||||
return new PhortuneCartTransaction();
|
return new PhortuneCartTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,13 @@ final class PhortuneMerchant extends PhortuneDAO
|
||||||
return new PhortuneMerchantTransaction();
|
return new PhortuneMerchantTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -216,6 +216,12 @@ final class PhrictionDocument extends PhrictionDAO
|
||||||
return new PhrictionTransaction();
|
return new PhrictionTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorTokenReceiverInterface )---------------------------------- */
|
/* -( PhabricatorTokenReceiverInterface )---------------------------------- */
|
||||||
|
|
|
@ -129,6 +129,13 @@ final class PonderAnswer extends PonderDAO
|
||||||
return new PonderAnswerTransaction();
|
return new PonderAnswerTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Markup interface
|
// Markup interface
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,13 @@ final class PonderQuestion extends PonderDAO
|
||||||
return new PonderQuestionTransaction();
|
return new PonderQuestionTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Markup interface
|
// Markup interface
|
||||||
|
|
||||||
|
|
|
@ -375,6 +375,13 @@ final class PhabricatorProject extends PhabricatorProjectDAO
|
||||||
return new PhabricatorProjectTransaction();
|
return new PhabricatorProjectTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,13 @@ final class PhabricatorProjectColumn
|
||||||
return new PhabricatorProjectColumnTransaction();
|
return new PhabricatorProjectColumnTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,13 @@ final class ReleephBranch extends ReleephDAO
|
||||||
return new ReleephBranchTransaction();
|
return new ReleephBranchTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,13 @@ final class ReleephProject extends ReleephDAO
|
||||||
return new ReleephProductTransaction();
|
return new ReleephProductTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -312,6 +312,13 @@ final class ReleephRequest extends ReleephDAO
|
||||||
return new ReleephRequestTransaction();
|
return new ReleephRequestTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -1528,6 +1528,13 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
||||||
return new PhabricatorRepositoryTransaction();
|
return new PhabricatorRepositoryTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -402,4 +402,11 @@ final class PhabricatorRepositoryCommit
|
||||||
return new PhabricatorAuditTransaction();
|
return new PhabricatorAuditTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,13 @@ final class PhabricatorSlowvotePoll extends PhabricatorSlowvoteDAO
|
||||||
return new PhabricatorSlowvoteTransaction();
|
return new PhabricatorSlowvoteTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,15 @@ interface PhabricatorApplicationTransactionInterface {
|
||||||
*/
|
*/
|
||||||
public function getApplicationTransactionTemplate();
|
public function getApplicationTransactionTemplate();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook to augment the $timeline with additional data for rendering.
|
||||||
|
*
|
||||||
|
* @return PhabricatorApplicationTransactionView
|
||||||
|
*/
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMPLATE IMPLEMENTATION /////////////////////////////////////////////////////
|
// TEMPLATE IMPLEMENTATION /////////////////////////////////////////////////////
|
||||||
|
@ -55,4 +64,11 @@ interface PhabricatorApplicationTransactionInterface {
|
||||||
return new <<<???>>>Transaction();
|
return new <<<???>>>Transaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,6 +14,7 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
||||||
private $quoteTargetID;
|
private $quoteTargetID;
|
||||||
private $quoteRef;
|
private $quoteRef;
|
||||||
private $pager;
|
private $pager;
|
||||||
|
private $renderData = array();
|
||||||
|
|
||||||
public function setQuoteRef($quote_ref) {
|
public function setQuoteRef($quote_ref) {
|
||||||
$this->quoteRef = $quote_ref;
|
$this->quoteRef = $quote_ref;
|
||||||
|
@ -85,6 +86,21 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
||||||
return $this->pager;
|
return $this->pager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is additional data that may be necessary to render the next set
|
||||||
|
* of transactions. Objects that implement
|
||||||
|
* PhabricatorApplicationTransactionInterface use this data in
|
||||||
|
* willRenderTimeline.
|
||||||
|
*/
|
||||||
|
public function setRenderData(array $data) {
|
||||||
|
$this->renderData = $data;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRenderData() {
|
||||||
|
return $this->renderData;
|
||||||
|
}
|
||||||
|
|
||||||
public function buildEvents($with_hiding = false) {
|
public function buildEvents($with_hiding = false) {
|
||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
|
|
||||||
|
@ -186,6 +202,9 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
||||||
if ($this->getPager()) {
|
if ($this->getPager()) {
|
||||||
$view->setPager($this->getPager());
|
$view->setPager($this->getPager());
|
||||||
}
|
}
|
||||||
|
if ($this->getRenderData()) {
|
||||||
|
$view->setRenderData($this->getRenderData());
|
||||||
|
}
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ final class PHUITimelineView extends AphrontView {
|
||||||
private $shouldTerminate = false;
|
private $shouldTerminate = false;
|
||||||
private $shouldAddSpacers = true;
|
private $shouldAddSpacers = true;
|
||||||
private $pager;
|
private $pager;
|
||||||
|
private $renderData = array();
|
||||||
|
|
||||||
public function setID($id) {
|
public function setID($id) {
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
@ -37,6 +38,11 @@ final class PHUITimelineView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setRenderData(array $data) {
|
||||||
|
$this->renderData = $data;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
if ($this->getPager()) {
|
if ($this->getPager()) {
|
||||||
if ($this->id === null) {
|
if ($this->id === null) {
|
||||||
|
@ -46,6 +52,7 @@ final class PHUITimelineView extends AphrontView {
|
||||||
'phabricator-show-older-transactions',
|
'phabricator-show-older-transactions',
|
||||||
array(
|
array(
|
||||||
'timelineID' => $this->id,
|
'timelineID' => $this->id,
|
||||||
|
'renderData' => $this->renderData,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
$events = $this->buildEvents();
|
$events = $this->buildEvents();
|
||||||
|
|
|
@ -82,7 +82,7 @@ JX.behavior('phabricator-show-older-transactions', function(config) {
|
||||||
};
|
};
|
||||||
|
|
||||||
var fetch_older_workflow = function(href, callback, swap) {
|
var fetch_older_workflow = function(href, callback, swap) {
|
||||||
return new JX.Workflow(href)
|
return new JX.Workflow(href, config.renderData)
|
||||||
.setHandler(JX.bind(null, callback, swap));
|
.setHandler(JX.bind(null, callback, swap));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue