1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 23:32:40 +01:00
phorge-phorge/src/applications
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
..
almanac Cleanup some clustering rough edges 2018-12-20 11:19:19 -08:00
aphlict Add a CLI workflow for testing that notifications are being delivered 2018-12-10 16:05:53 -08:00
arcanist/conduit Remove remaining arcanist project code 2015-07-08 19:37:28 +10:00
audit Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
auth Carry MFA responses which have been "answered" but not "completed" through the MFA workflow 2018-12-20 14:46:45 -08:00
badges Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
base Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
cache Update PhabricatorLiskDAO::chunkSQL() for new %Q semantics 2018-11-13 08:59:18 -08:00
calendar Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
celerity Emit a "Content-Security-Policy" HTTP header 2018-02-27 10:17:30 -08:00
chatlog Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
conduit Use phutil_microseconds_since(...) to simplify some timing arithmetic 2018-11-08 16:46:32 -08:00
config Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
conpherence Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
console Fix some minor errors (DarkConsole warning, unstable Ferret sort) 2018-03-18 15:12:25 -07:00
countdown Use object PHIDs for "Thread-Topic" headers in mail 2018-02-08 06:21:00 -08:00
daemon Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
dashboard Make the dashboard panel datasource work properly with hundreds of panels 2018-06-28 08:54:29 -07:00
differential Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
diffusion Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
diviner Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
doorkeeper Allow Doorkeeper references to have multiple display variations (full, short, etc.) 2018-03-13 11:29:52 -07:00
draft/storage When purging drafts after a transaction edit, purge all drafts 2018-02-11 06:01:09 -08:00
drydock Replace the "Choose Subtype" radio buttons dialog with a simpler "big stuff you click" sort of UI 2018-12-10 14:59:18 -08:00
fact Remove all application callers to "putInSet()" 2018-12-12 16:41:12 -08:00
favorites Add some missing aural button labels for accessibility 2018-08-17 11:00:29 -07:00
feed Separate "feed" and "notifications" better, allow stories to appear in notifications only 2018-12-10 16:02:43 -08:00
files Fix all query warnings in "arc unit --everything" 2018-11-15 03:51:25 -08:00
flag Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
fund Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
guides Rename "PHUIDocumentViewPro" to "PHUIDocumentView" 2018-08-28 14:53:07 -07:00
harbormaster Add support for "harbormaster.target.search" 2018-11-28 13:49:27 -08:00
help Redesign header menus and search 2017-01-17 12:13:06 -08:00
herald Fix a stray qsprintf() in the Herald rules engine when recording rule application to objects 2018-12-12 11:31:36 -08:00
home Update menu item names for Applications -> Favorites 2017-09-05 19:05:03 -07:00
legalpad Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
lipsum Add "--force" and "--quickly" flags to bin/lipsum 2017-02-27 09:09:41 -08:00
macro When {meme ...} embed has no text, just use the raw file data unmodified 2018-11-06 09:40:22 -08:00
maniphest Fix another qsprintf() straggler in "Has Open Subtasks" 2018-12-13 05:17:02 -08:00
meta Modularize Repository transactions 2018-11-28 14:29:18 -08:00
metamta Remove defunct "metamta.herald.show-hints" Config option 2018-11-26 10:14:25 -08:00
multimeter Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
notification Remove obsolete "NotifyTest" feed story 2018-12-10 16:03:42 -08:00
nuance Explicitly add rel="noreferrer" to all external links 2018-02-17 17:46:11 -08:00
oauthserver Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
owners Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
packages Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
passphrase Fix spelling 2017-10-09 10:48:04 -07:00
paste Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
people Update accountadmin to use new admin empowerment code 2018-12-19 12:00:53 -08:00
phame Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
phid Truncate package names in diff table of contents views 2018-06-07 13:17:01 -07:00
phlux Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
pholio Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
phortune Fix some "%Q" behavior in PhortuneMerchantQuery 2018-11-20 07:59:57 -08:00
phpast Update phpast for new UI 2016-04-05 13:52:59 -07:00
phragment Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
phrequent Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
phriction Make it less confusing to create root-level Phriction doc 2018-12-10 14:10:18 -08:00
phurl Explicitly add rel="noreferrer" to all external links 2018-02-17 17:46:11 -08:00
policy Extend PhabricatorPolicyCodex interface to handle "interesting" policy defaults 2018-04-27 16:56:11 -07:00
ponder Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
project Update continue/break for php 7.3 2018-12-20 14:12:35 -08:00
releeph Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
remarkup/conduit phtize all the things 2015-05-22 21:16:39 +10:00
repository Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
search When waiting for long-running Harbormaster futures to resolve, close idle database connections 2018-11-21 07:53:40 -08:00
settings Upgrade sessions digests to HMAC256, retaining compatibility with old digests 2018-12-13 16:15:38 -08:00
slowvote Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
spaces Add more mail stamps: tasks, subscribers, projects, spaces 2018-02-06 04:05:46 -08:00
subscriptions Remove requireCapabilities() from ApplicationTransactionEditor and require CAN_EDIT by default 2018-08-24 17:45:56 -07:00
support/application Implement the getName method in PhabricatorApplication subclasses 2014-07-23 23:52:50 +10:00
system Update PhabricatorLiskDAO::chunkSQL() for new %Q semantics 2018-11-13 08:59:18 -08:00
tokens Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
transactions Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00
typeahead Rename "PHUIDocumentViewPro" to "PHUIDocumentView" 2018-08-28 14:53:07 -07:00
uiexample Reduce the cost of generating default user profile images 2018-03-01 16:53:17 -08:00
xhprof Allow XHProf profiles to be drag-and-dropped to upload them 2017-02-23 11:16:19 -08:00