Page MenuHomePhabricator

D12955.diff
No OneTemporary

D12955.diff

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
@@ -837,9 +837,7 @@
$viewer = $this->getViewer();
$header = id(new PHUIHeaderView())
- ->setHeader(pht('Similar Open Revisions'))
- ->setSubheader(
- pht('Recently updated open revisions affecting the same files.'));
+ ->setHeader(pht('Recent Similar Open Revisions'));
$view = id(new DifferentialRevisionListView())
->setHeader($header)
diff --git a/src/applications/differential/view/DifferentialDiffTableOfContentsView.php b/src/applications/differential/view/DifferentialDiffTableOfContentsView.php
--- a/src/applications/differential/view/DifferentialDiffTableOfContentsView.php
+++ b/src/applications/differential/view/DifferentialDiffTableOfContentsView.php
@@ -251,8 +251,8 @@
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Table of Contents'))
+ ->setTable($table)
->appendChild($anchor)
- ->appendChild($table)
->appendChild($buttons);
}
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
@@ -130,7 +130,7 @@
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Local Commits'))
- ->appendChild($table);
+ ->setTable($table);
}
private static function formatCommit($commit) {
diff --git a/src/applications/diffusion/controller/DiffusionBranchTableController.php b/src/applications/diffusion/controller/DiffusionBranchTableController.php
--- a/src/applications/diffusion/controller/DiffusionBranchTableController.php
+++ b/src/applications/diffusion/controller/DiffusionBranchTableController.php
@@ -47,7 +47,7 @@
$panel = id(new PHUIObjectBoxView())
->setHeaderText(pht('Branches'))
- ->appendChild($view);
+ ->setTable($view);
$content = $panel;
}
diff --git a/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php b/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php
@@ -59,7 +59,7 @@
$browse_panel = new PHUIObjectBoxView();
$browse_panel->setHeaderText($drequest->getPath(), '/');
- $browse_panel->appendChild($browse_table);
+ $browse_panel->setTable($browse_table);
$content[] = $browse_panel;
}
diff --git a/src/applications/diffusion/controller/DiffusionBrowseSearchController.php b/src/applications/diffusion/controller/DiffusionBrowseSearchController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseSearchController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseSearchController.php
@@ -103,7 +103,7 @@
$box = id(new PHUIObjectBoxView())
->setHeaderText($header)
- ->appendChild($table);
+ ->setTable($table);
$pager_box = id(new PHUIBoxView())
->addMargin(PHUI::MARGIN_LARGE)
diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php
--- a/src/applications/diffusion/controller/DiffusionCommitController.php
+++ b/src/applications/diffusion/controller/DiffusionCommitController.php
@@ -261,7 +261,7 @@
$header->addActionLink($button);
}
- $change_panel->appendChild($change_table);
+ $change_panel->setTable($change_table);
$change_panel->setHeader($header);
$content[] = $change_panel;
@@ -918,7 +918,7 @@
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Merged Changes'));
- $panel->appendChild($history_table);
+ $panel->setTable($history_table);
if ($caption) {
$panel->setInfoView($caption);
}
diff --git a/src/applications/diffusion/controller/DiffusionExternalController.php b/src/applications/diffusion/controller/DiffusionExternalController.php
--- a/src/applications/diffusion/controller/DiffusionExternalController.php
+++ b/src/applications/diffusion/controller/DiffusionExternalController.php
@@ -132,7 +132,7 @@
$content = new PHUIObjectBoxView();
$content->setHeaderText(pht('Multiple Matching Commits'));
$content->setInfoView($caption);
- $content->appendChild($table);
+ $content->setTable($table);
}
return $this->buildApplicationPage(
diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php
--- a/src/applications/diffusion/controller/DiffusionHistoryController.php
+++ b/src/applications/diffusion/controller/DiffusionHistoryController.php
@@ -59,7 +59,7 @@
$history_panel = new PHUIObjectBoxView();
$history_panel->setHeaderText(pht('History'));
- $history_panel->appendChild($history_table);
+ $history_panel->setTable($history_table);
$content[] = $history_panel;
diff --git a/src/applications/diffusion/controller/DiffusionLintController.php b/src/applications/diffusion/controller/DiffusionLintController.php
--- a/src/applications/diffusion/controller/DiffusionLintController.php
+++ b/src/applications/diffusion/controller/DiffusionLintController.php
@@ -122,7 +122,7 @@
$content[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('Lint'))
- ->appendChild($table);
+ ->setTable($table);
$title = array('Lint');
$crumbs = $this->buildCrumbs(
diff --git a/src/applications/diffusion/controller/DiffusionLintDetailsController.php b/src/applications/diffusion/controller/DiffusionLintDetailsController.php
--- a/src/applications/diffusion/controller/DiffusionLintDetailsController.php
+++ b/src/applications/diffusion/controller/DiffusionLintDetailsController.php
@@ -74,7 +74,7 @@
$content[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('Lint Details'))
- ->appendChild($table);
+ ->setTable($table);
$crumbs = $this->buildCrumbs(
array(
diff --git a/src/applications/diffusion/controller/DiffusionPushEventViewController.php b/src/applications/diffusion/controller/DiffusionPushEventViewController.php
--- a/src/applications/diffusion/controller/DiffusionPushEventViewController.php
+++ b/src/applications/diffusion/controller/DiffusionPushEventViewController.php
@@ -43,7 +43,7 @@
$commits_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Pushed Commits'))
- ->appendChild($commits_table);
+ ->setTable($commits_table);
$logs = $event->getLogs();
@@ -54,7 +54,7 @@
$update_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('All Pushed Updates'))
- ->appendChild($updates_table);
+ ->setTable($updates_table);
return $this->buildApplicationPage(
array(
diff --git a/src/applications/diffusion/controller/DiffusionRefTableController.php b/src/applications/diffusion/controller/DiffusionRefTableController.php
--- a/src/applications/diffusion/controller/DiffusionRefTableController.php
+++ b/src/applications/diffusion/controller/DiffusionRefTableController.php
@@ -127,7 +127,7 @@
$content = id(new PHUIObjectBoxView())
->setHeaderText(pht('Ref "%s"', $ref_name))
- ->appendChild($table);
+ ->setTable($table);
$crumbs = $this->buildCrumbs(array());
$crumbs->addTextCrumb(pht('Refs'));
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php
@@ -397,7 +397,7 @@
$header->addActionLink($button);
$panel->setHeader($header);
- $panel->appendChild($table);
+ $panel->setTable($table);
return $panel;
}
@@ -572,7 +572,7 @@
->setHeader(pht('Recent Commits'))
->addActionLink($button);
$panel->setHeader($header);
- $panel->appendChild($history_table);
+ $panel->setTable($history_table);
return $panel;
}
@@ -658,7 +658,7 @@
$browse_panel->appendChild($form_box);
}
- $browse_panel->appendChild($browse_table);
+ $browse_panel->setTable($browse_table);
return $browse_panel;
}
diff --git a/src/applications/diffusion/controller/DiffusionSymbolController.php b/src/applications/diffusion/controller/DiffusionSymbolController.php
--- a/src/applications/diffusion/controller/DiffusionSymbolController.php
+++ b/src/applications/diffusion/controller/DiffusionSymbolController.php
@@ -132,7 +132,7 @@
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Similar Symbols'));
- $panel->appendChild($table);
+ $panel->setTable($table);
return $this->buildApplicationPage(
$panel,
diff --git a/src/view/phui/PHUIObjectBoxView.php b/src/view/phui/PHUIObjectBoxView.php
--- a/src/view/phui/PHUIObjectBoxView.php
+++ b/src/view/phui/PHUIObjectBoxView.php
@@ -16,6 +16,8 @@
private $metadata;
private $actionListID;
private $objectList;
+ private $table;
+ private $collapsed = false;
private $tabs = array();
private $propertyLists = array();
@@ -148,6 +150,17 @@
$this->objectList = $list;
return $this;
}
+
+ public function setTable($table) {
+ $this->collapsed = true;
+ $this->table = $table;
+ return $this;
+ }
+
+ public function setCollapsed($collapsed) {
+ $this->collapsed = $collapsed;
+ return $this;
+ }
public function setValidationException(
PhabricatorApplicationTransactionValidationException $ex = null) {
@@ -280,6 +293,7 @@
$tabs,
$tab_lists,
$property_lists,
+ $this->table,
$this->renderChildren(),
))
->setBorder(true)
@@ -292,6 +306,10 @@
if ($this->color) {
$content->addClass('phui-object-box-'.$this->color);
}
+
+ if ($this->collapsed) {
+ $content->addClass('phui-object-box-collapsed');
+ }
if ($this->tabs) {
$content->addSigil('phui-object-box');
diff --git a/webroot/rsrc/css/aphront/table-view.css b/webroot/rsrc/css/aphront/table-view.css
--- a/webroot/rsrc/css/aphront/table-view.css
+++ b/webroot/rsrc/css/aphront/table-view.css
@@ -208,7 +208,7 @@
}
.aphront-table-view tr.alt-highlighted {
- background: #fcf2bb;
+ background: {$sh-yellowbackground};
}
.aphront-table-view tr.no-data td {
diff --git a/webroot/rsrc/css/phui/phui-object-box.css b/webroot/rsrc/css/phui/phui-object-box.css
--- a/webroot/rsrc/css/phui/phui-object-box.css
+++ b/webroot/rsrc/css/phui/phui-object-box.css
@@ -7,6 +7,14 @@
padding: 12px 12px 4px 12px;
}
+.phui-object-box.phui-object-box-collapsed {
+ padding: 12px 0 0 0;
+}
+
+.phui-object-box.phui-object-box-collapsed .phui-header-shell {
+ padding: 0 4px 4px 16px;
+}
+
div.phui-object-box.phui-object-box-flush {
margin-top: 0;
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 17, 2:15 AM (21 h, 10 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6997892
Default Alt Text
D12955.diff (11 KB)

Event Timeline