Skip to content

Commit e78df59

Browse files
committed
Maniphest Tasks + Project Boards - some polish
Summary: Fixes T4550 by changing supportsFeed to shouldPublishFeedStory, so things can be more granular like that are with mail. Attempts to fix things generally too, filtering out xactions that have no business in feed, etc. Also return an updated Task HTML representation on drag and drop moves, etc. This is important so if the priority changes you can see it reflected in the UI. Test Plan: dragged tasks around. observed no feed stories on subpriority drags. observed feed stories and updated color bars on stories that changed priority Reviewers: epriestley, chad Reviewed By: epriestley CC: Korvin, epriestley, aran Maniphest Tasks: T4550 Differential Revision: https://secure.phabricator.com/D8399
1 parent cdeea11 commit e78df59

File tree

14 files changed

+62
-34
lines changed

14 files changed

+62
-34
lines changed

src/applications/conpherence/editor/ConpherenceEditor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,9 @@ protected function getMailSubjectPrefix() {
400400
return PhabricatorEnv::getEnvConfig('metamta.conpherence.subject-prefix');
401401
}
402402

403-
protected function supportsFeed() {
403+
protected function shouldPublishFeedStory(
404+
PhabricatorLiskDAO $object,
405+
array $xactions) {
404406
return false;
405407
}
406408

src/applications/differential/editor/DifferentialTransactionEditor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,9 @@ protected function requireCapabilities(
785785
return parent::requireCapabilities($object, $xaction);
786786
}
787787

788-
protected function supportsFeed() {
788+
protected function shouldPublishFeedStory(
789+
PhabricatorLiskDAO $object,
790+
array $xactions) {
789791
return true;
790792
}
791793

src/applications/files/editor/PhabricatorFileEditor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ protected function buildMailBody(
8080
return $body;
8181
}
8282

83-
protected function supportsFeed() {
83+
protected function shouldPublishFeedStory(
84+
PhabricatorLiskDAO $object,
85+
array $xactions) {
8486
return true;
8587
}
8688

src/applications/legalpad/editor/LegalpadDocumentEditor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ protected function getMailSubjectPrefix() {
183183
}
184184

185185

186-
protected function supportsFeed() {
186+
protected function shouldPublishFeedStory(
187+
PhabricatorLiskDAO $object,
188+
array $xactions) {
187189
return false;
188190
}
189191

src/applications/macro/editor/PhabricatorMacroEditor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ protected function getMailSubjectPrefix() {
156156
return PhabricatorEnv::getEnvConfig('metamta.macro.subject-prefix');
157157
}
158158

159-
protected function supportsFeed() {
159+
protected function shouldPublishFeedStory(
160+
PhabricatorLiskDAO $object,
161+
array $xactions) {
160162
return true;
161163
}
162164
}

src/applications/maniphest/editor/ManiphestTransactionEditor.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -251,19 +251,8 @@ protected function shouldSendMail(
251251
PhabricatorLiskDAO $object,
252252
array $xactions) {
253253

254-
$should_mail = true;
255-
if (count($xactions) == 1) {
256-
$xaction = head($xactions);
257-
switch ($xaction->getTransactionType()) {
258-
case ManiphestTransaction::TYPE_SUBPRIORITY:
259-
$should_mail = false;
260-
break;
261-
default:
262-
$should_mail = true;
263-
break;
264-
}
265-
}
266-
return $should_mail;
254+
$xactions = mfilter($xactions, 'shouldHide', true);
255+
return $xactions;
267256
}
268257

269258
protected function getMailSubjectPrefix() {
@@ -318,8 +307,10 @@ protected function buildMailBody(
318307
return $body;
319308
}
320309

321-
protected function supportsFeed() {
322-
return true;
310+
protected function shouldPublishFeedStory(
311+
PhabricatorLiskDAO $object,
312+
array $xactions) {
313+
return $this->shouldSendMail($object, $xactions);
323314
}
324315

325316
protected function supportsSearch() {

src/applications/maniphest/storage/ManiphestTransaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function shouldHide() {
109109
return true;
110110
}
111111

112-
return false;
112+
return parent::shouldHide();
113113
}
114114

115115
public function getActionStrength() {

src/applications/paste/editor/PhabricatorPasteEditor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ protected function buildMailTemplate(PhabricatorLiskDAO $object) {
157157
->addHeader('Thread-Topic', "P{$id}");
158158
}
159159

160-
protected function supportsFeed() {
160+
protected function shouldPublishFeedStory(
161+
PhabricatorLiskDAO $object,
162+
array $xactions) {
161163
return true;
162164
}
163165

src/applications/pholio/editor/PholioMockEditor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ protected function getMailSubjectPrefix() {
402402
return PhabricatorEnv::getEnvConfig('metamta.pholio.subject-prefix');
403403
}
404404

405-
protected function supportsFeed() {
405+
protected function shouldPublishFeedStory(
406+
PhabricatorLiskDAO $object,
407+
array $xactions) {
406408
return true;
407409
}
408410

src/applications/ponder/editor/PonderEditor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
abstract class PonderEditor
44
extends PhabricatorApplicationTransactionEditor {
55

6-
protected function supportsFeed() {
6+
protected function shouldPublishFeedStory(
7+
PhabricatorLiskDAO $object,
8+
array $xactions) {
79
return true;
810
}
911

0 commit comments

Comments
 (0)