Revisions and Commits
These cases aren't closely related.
The calling code expects PhabricatorTransaction->getBodyForFeed() to return a rendered HTML body, but many applications (Phame, Pholio, Ponder) return raw remarkup instead.
Phame, at least, also summarizes inconsistently -- it uses PhutilUTF8StringTruncator, while comments use PhabricatorMarkupEngine::summarize().
We should probably provide a getRemarkupBodyForFeed() or similar instead, and have getBodyForFeed() call this by default (as it already extracts comment bodies) and handle summarization itself, then convert applications to use the new method.
I explicitly didn't markup Diviner since I think this page will take like 6 minutes to render if we markup all the snippets and I didn't want to deal with finding a solution when I wrote it. I still don't have a particularly good solution. My concern about the rendering time may be unwarranted.
To move forward, we should split this into two tasks:
- One for getBodyForFeed(), which is straightforward and can be implemented today.
- One for Diviner, which is unrelated and probably has a solution involving product changes (don't show the summaries, or paginate differently, or something) rather than a purely technical one.
There isn't really one, all the applications that do it right are doing comments, and you can't do the same thing they're doing very easily. Audit does something but it's a mess. It should really just get restructured, I think.
You might be able to just return new PHUIRemarkupView(...) and get away with it. That'll be a bit inefficient but that's probably fine for now.