Differential D9375 Diff 24738 src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
| Show First 20 Lines • Show All 1,859 Lines • ▼ Show 20 Lines | $template | ||||
| ->setFrom($this->getActingAsPHID()) | ->setFrom($this->getActingAsPHID()) | ||||
| ->setSubjectPrefix($this->getMailSubjectPrefix()) | ->setSubjectPrefix($this->getMailSubjectPrefix()) | ||||
| ->setVarySubjectPrefix('['.$action.']') | ->setVarySubjectPrefix('['.$action.']') | ||||
| ->setThreadID($this->getMailThreadID($object), $this->getIsNewObject()) | ->setThreadID($this->getMailThreadID($object), $this->getIsNewObject()) | ||||
| ->setRelatedPHID($object->getPHID()) | ->setRelatedPHID($object->getPHID()) | ||||
| ->setExcludeMailRecipientPHIDs($this->getExcludeMailRecipientPHIDs()) | ->setExcludeMailRecipientPHIDs($this->getExcludeMailRecipientPHIDs()) | ||||
| ->setMailTags($mail_tags) | ->setMailTags($mail_tags) | ||||
| ->setIsBulk(true) | ->setIsBulk(true) | ||||
| ->setBody($body->render()); | ->setBody($body->render()) | ||||
| ->setHTMLBody($body->renderHTML()); | |||||
| foreach ($body->getAttachments() as $attachment) { | foreach ($body->getAttachments() as $attachment) { | ||||
| $template->addAttachment($attachment); | $template->addAttachment($attachment); | ||||
| } | } | ||||
| $herald_xscript = $this->getHeraldTranscript(); | $herald_xscript = $this->getHeraldTranscript(); | ||||
| if ($herald_xscript) { | if ($herald_xscript) { | ||||
| $herald_header = $herald_xscript->getXHeraldRulesHeader(); | $herald_header = $herald_xscript->getXHeraldRulesHeader(); | ||||
| ▲ Show 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | foreach ($xactions as $xaction) { | ||||
| if ($xaction->shouldHideForMail($xactions)) { | if ($xaction->shouldHideForMail($xactions)) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $header = $xaction->getTitleForMail(); | $header = $xaction->getTitleForMail(); | ||||
| if ($header !== null) { | if ($header !== null) { | ||||
| $headers[] = $header; | $headers[] = $header; | ||||
| } | } | ||||
epriestley: Not all transactions have colors, this sometimes produces `style="color:"`.
The transaction… | |||||
Not Done Inline ActionsYeah, it's pretty crude but was necessary for us due to the long list of actions Phabricator sends ("X added a reviewer: X", "X added a subscriber: X", "X accepted your review"). talshiri: Yeah, it's pretty crude but was necessary for us due to the long list of actions Phabricator… | |||||
| $comment = $xaction->getBodyForMail(); | $comment = $xaction->getBodyForMail(); | ||||
| if ($comment !== null) { | if ($comment !== null) { | ||||
| $comments[] = $comment; | $comments[] = $comment; | ||||
| } | } | ||||
| } | } | ||||
| $body = new PhabricatorMetaMTAMailBody(); | $body = new PhabricatorMetaMTAMailBody(); | ||||
| $body->addRawSection(implode("\n", $headers)); | $body->addRawSection(implode("\n", $headers)); | ||||
Not Done Inline ActionsUse phutil_implode_html(). epriestley: Use `phutil_implode_html()`. | |||||
| foreach ($comments as $comment) { | foreach ($comments as $comment) { | ||||
| $body->addRawSection($comment); | $body->addRawSection($comment); | ||||
| } | } | ||||
| if ($object instanceof PhabricatorCustomFieldInterface) { | if ($object instanceof PhabricatorCustomFieldInterface) { | ||||
| $field_list = PhabricatorCustomField::getObjectFields( | $field_list = PhabricatorCustomField::getObjectFields( | ||||
| $object, | $object, | ||||
| PhabricatorCustomField::ROLE_TRANSACTIONMAIL); | PhabricatorCustomField::ROLE_TRANSACTIONMAIL); | ||||
| ▲ Show 20 Lines • Show All 370 Lines • Show Last 20 Lines | |||||
Not all transactions have colors, this sometimes produces style="color:".
The transaction colors are not all HTML colors.
This also seems super annoying, design-wise. Let's just drop it and we can find some more tasteful approach later (like a colored bullet)?