Skip to content
  • epriestley's avatar
    Pass timeline view data to comment previews, restoring Differential comment previews · 3963c86a
    epriestley authored
    Summary:
    Ref T13222. In D19918, I refactored how timelines get "view data". Today, this is always additional data about which images/changesets/diffs are visible on the current revision/commit/mock, so we can tell if inline comments should be linked to a `#anchor` on the same page (if the inline is rendered there somewhere) or to a `/D123?id=1&vs=2` full link on a different page (if it isn't), but in general this could be any sort of state information about the current page that affects how the timeline should render.
    
    Previously, comment previews did not use any specialized object code and always rendered a "generic" timeline story. This was actually a bug, but none of the code we have today cares about this (since it's all inline related, and inlines render separately) so it never impacted anything.
    
    After the `TimelineEngine` change, the preview renders with Differential-specific code. This is more correct, but we were not passing the preview the "view data" so it broke.
    
    This preview doesn't actually need the view data and we could just make it bail out if it isn't present, but pass it through for consistency and so this works like we'd expect if we do something fancier with view data in the future.
    
    Test Plan: Viewed comment and inline comment previews in Differential, saw old behavior restored.
    
    Reviewers: amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T13222
    
    Differential Revision: https://secure.phabricator.com/D19943
    3963c86a