1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-04 20:52:43 +01:00
phorge-phorge/src/applications/differential/storage
epriestley 6c43d1d52c Remove "willRenderTimeline()" from ApplicationTransactionInterface
Summary:
Depends on D19914. Ref T11351. Some of the Phoilo rabbit holes go very deep.

`PhabricatorApplicationTransactionInterface` currently requires you to implement `willRenderTimeline()`. Almost every object just implements this as `return $timeline`; only Pholio, Diffusion, and Differential specialize it. In all cases, they are specializing it mostly to render inline comments.

The actual implementations are a bit of a weird mess and the way the data is threaded through the call stack is weird and not very modern.

Try to clean this up:

  - Stop requiring `willRenderTimeline()` to be implemented.
  - Stop requiring `getApplicationTransactionViewObject()` to be implemented (only the three above, plus Legalpad, implement this, and Legalpad's implementation is a no-op). These two methods are inherently pretty coupled for almost any reasonable thing you might want to do with the timeline.
  - Simplify the handling of "renderdata" and call it "View Data". This is additional information about the current view of the transaction timeline that is required to render it correctly. This is only used in Differential, to decide if we can link an inline comment to an anchor on the same page or should link it to another page. We could perhaps do this on the client instead, but having this data doesn't seem inherently bad to me.
  - If objects want to customize timeline rendering, they now implement `PhabricatorTimelineInterface` and provide a `TimelineEngine` which gets a nice formal stack.

This leaves a lot of empty `willRenderTimeline()` implementations hanging around. I'll remove these in the next change, it's just going to be deleting a couple dozen copies of an identical empty method implementation.

Test Plan:
  - Viewed audits, revisions, and mocks with inline comments.
  - Used "Show Older" to page a revision back in history (this is relevant for "View Data").
  - Grepped for symbols: willRenderTimeline, getApplicationTransactionViewObject, Legalpad classes.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T11351

Differential Revision: https://secure.phabricator.com/D19918
2018-12-20 14:55:07 -08:00
..
__tests__ Completely remove the legacy hunk table 2018-02-10 16:12:50 -08:00
DifferentialAffectedPath.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
DifferentialChangeset.php When showing a diff-of-diffs, hide files which didn't get any more changes and have no inlines 2018-05-16 17:18:53 -07:00
DifferentialCustomFieldNumericIndex.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialCustomFieldStorage.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialCustomFieldStringIndex.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialDAO.php Delete license headers from files 2012-11-05 11:16:51 -08:00
DifferentialDiff.php Separate changeset analysis code from DifferentialDiff and provide a standalone rebuild-changesets workflow 2018-05-16 17:17:28 -07:00
DifferentialDiffProperty.php Fix almost all remaining schemata issues 2014-10-01 08:18:36 -07:00
DifferentialDiffTransaction.php Differential - make DifferentialDiffEditor into a real transaction editor. 2014-11-18 15:32:23 -08:00
DifferentialHiddenComment.php Allow inline comments to be individually hidden 2015-05-27 10:28:38 -07:00
DifferentialHunk.php Add an "--auto" flag to "bin/differential migrate-hunk" 2018-04-16 12:27:26 -07:00
DifferentialInlineComment.php Build a page for viewing all inline comments 2017-06-12 11:31:20 -07:00
DifferentialReviewer.php Allow custom actions in Differential to explicitly override "accept" stickiness 2018-03-12 17:10:43 -07:00
DifferentialRevision.php Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
DifferentialSchemaSpec.php Add "persistence" types (data, cache, or index) to tables, and tweak what "storage dump" dumps 2017-10-04 12:09:33 -07:00
DifferentialTransaction.php Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
DifferentialTransactionComment.php Make inline comment preview and submission mostly work on EditEngine 2016-12-31 10:10:29 -08:00