Convert commits to use unified table of contents
Summary:
Fixes T2183. We now use the same rendering element in both places.
Intentional changes:
- Package highlighting is out, coming back to both apps in next diff.
- removed redundant-feeling "Change" link. The information is now shown with a character ("M", "V", etc.) and the page is a click away under "History". Clicking the path also jumps you to substantially similar content. (We could restore it fairly easily, I just think it's probably the least useful thing in the table right now.)
Test Plan: Viewed a bunch of commits in Diffusion.
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T2183
Differential Revision: https://secure.phabricator.com/D13910
This commit is contained in:
@@ -1036,34 +1036,4 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||
return $view;
|
||||
}
|
||||
|
||||
private function buildTableOfContents(
|
||||
array $changesets,
|
||||
array $visible_changesets,
|
||||
array $coverage) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$toc_view = id(new PHUIDiffTableOfContentsListView())
|
||||
->setUser($viewer);
|
||||
|
||||
foreach ($changesets as $changeset_id => $changeset) {
|
||||
$is_visible = isset($visible_changesets[$changeset_id]);
|
||||
$anchor = $changeset->getAnchorName();
|
||||
|
||||
$filename = $changeset->getFilename();
|
||||
$coverage_id = 'differential-mcoverage-'.md5($filename);
|
||||
|
||||
$item = id(new PHUIDiffTableOfContentsItemView())
|
||||
->setChangeset($changeset)
|
||||
->setIsVisible($is_visible)
|
||||
->setAnchor($anchor)
|
||||
->setCoverage(idx($coverage, $filename))
|
||||
->setCoverageID($coverage_id);
|
||||
|
||||
$toc_view->addItem($item);
|
||||
}
|
||||
|
||||
return $toc_view;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user