Page MenuHomePhabricator

D16209.diff
No OneTemporary

D16209.diff

diff --git a/src/applications/differential/controller/DifferentialController.php b/src/applications/differential/controller/DifferentialController.php
--- a/src/applications/differential/controller/DifferentialController.php
+++ b/src/applications/differential/controller/DifferentialController.php
@@ -28,8 +28,8 @@
$viewer = $this->getViewer();
$toc_view = id(new PHUIDiffTableOfContentsListView())
- ->setUser($viewer)
- ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
+ ->setViewer($viewer)
+ ->setBare(true);
$have_owners = PhabricatorApplication::isClassInstalledForViewer(
'PhabricatorOwnersApplication',
diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -292,7 +292,7 @@
'/differential/comment/inline/edit/'.$revision->getID().'/');
}
- $diff_history = id(new DifferentialRevisionUpdateHistoryView())
+ $history = id(new DifferentialRevisionUpdateHistoryView())
->setUser($viewer)
->setDiffs($diffs)
->setSelectedVersusDiffID($diff_vs)
@@ -300,7 +300,7 @@
->setSelectedWhitespace($whitespace)
->setCommitsForLinks($commits_for_links);
- $local_view = id(new DifferentialLocalCommitsView())
+ $local_table = id(new DifferentialLocalCommitsView())
->setUser($viewer)
->setLocalCommits(idx($props, 'local:commits'))
->setCommitsForLinks($commits_for_links);
@@ -324,6 +324,36 @@
$visible_changesets,
$target->loadCoverageMap($viewer));
+ $tab_group = id(new PHUITabGroupView())
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Files'))
+ ->setKey('files')
+ ->appendChild($toc_view))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('History'))
+ ->setKey('history')
+ ->appendChild($history))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Commits'))
+ ->setKey('commits')
+ ->appendChild($local_table));
+
+ if ($other_view) {
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Similar'))
+ ->setKey('similar')
+ ->appendChild($other_view));
+ }
+
+ $tab_view = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Revision Contents'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
+ ->addTabGroup($tab_group);
+
$comment_form = null;
if (!$viewer_is_anonymous) {
$comment_form = $this->buildCommentForm($revision, $field_list);
@@ -348,15 +378,16 @@
'The content of this revision is hidden until the author has '.
'signed all of the required legal agreements.'));
} else {
- $footer[] =
- array(
- $diff_history,
- $warning,
- $local_view,
- $toc_view,
- $other_view,
- $changeset_view,
- );
+ $anchor = id(new PhabricatorAnchorView())
+ ->setAnchorName('toc')
+ ->setNavigationMarker(true);
+
+ $footer[] = array(
+ $anchor,
+ $warning,
+ $tab_view,
+ $changeset_view,
+ );
}
if ($comment_form) {
@@ -870,9 +901,9 @@
->setHeader(pht('Recent Similar Revisions'));
$view = id(new DifferentialRevisionListView())
- ->setHeader($header)
->setRevisions($revisions)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
+ ->setNoBox(true)
->setUser($viewer);
$phids = $view->getRequiredHandlePHIDs();
diff --git a/src/applications/differential/view/DifferentialLocalCommitsView.php b/src/applications/differential/view/DifferentialLocalCommitsView.php
--- a/src/applications/differential/view/DifferentialLocalCommitsView.php
+++ b/src/applications/differential/view/DifferentialLocalCommitsView.php
@@ -125,10 +125,7 @@
$headers[] = pht('Date');
$table->setHeaders($headers);
- return id(new PHUIObjectBoxView())
- ->setHeaderText(pht('Local Commits'))
- ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
- ->setTable($table);
+ return $table;
}
private static function formatCommit($commit) {
diff --git a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
--- a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
+++ b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php
@@ -303,10 +303,7 @@
$show_diff,
));
- return id(new PHUIObjectBoxView())
- ->setHeaderText(pht('Revision Update History'))
- ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
- ->setTable($content);
+ return $content;
}
const STAR_NONE = 'none';
diff --git a/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php b/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php
--- a/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php
+++ b/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php
@@ -7,6 +7,7 @@
private $header;
private $infoView;
private $background;
+ private $bare;
public function addItem(PHUIDiffTableOfContentsItemView $item) {
$this->items[] = $item;
@@ -38,6 +39,15 @@
return $this;
}
+ public function setBare($bare) {
+ $this->bare = $bare;
+ return $this;
+ }
+
+ public function getBare() {
+ return $this->bare;
+ }
+
public function render() {
$this->requireResource('differential-core-view-css');
$this->requireResource('differential-table-of-contents-css');
@@ -160,6 +170,10 @@
->setAnchorName('toc')
->setNavigationMarker(true);
+ if ($this->bare) {
+ return $table;
+ }
+
$header = id(new PHUIHeaderView())
->setHeader(pht('Table of Contents'));

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 21, 8:38 AM (4 d, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7309338
Default Alt Text
D16209.diff (5 KB)

Event Timeline