1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-27 07:50:57 +01:00

[Redesign] Add Table, Collapse support to ObjectBox

Summary: Converts most all tables to be directly set via `setTable` to an ObjectBox. I think this path is more flexible design wise, as we can change the box based on children, and not just CSS. We also already do this with PropertyList, Forms, ObjectList, and Header. `setCollapsed` is added to ObjectBox to all children objects to bleed to the edges (like diffs).

Test Plan: I did a grep of `appendChild($table)` as well as searches for `PHUIObjectBoxView`, also with manual opening of hundreds of files. I'm sure I missed 5-8 places. If you just appendChild($table) nothing breaks, it just looks a little funny.

Reviewers: epriestley, btrahan

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12955
This commit is contained in:
Chad Little 2015-05-20 12:43:34 -07:00
parent 667159eb07
commit a4784e03ff
66 changed files with 126 additions and 100 deletions

View file

@ -176,7 +176,7 @@ abstract class AlmanacController
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
protected function addLockMessage(PHUIObjectBoxView $box, $message) {

View file

@ -141,7 +141,7 @@ final class AlmanacDeviceEditController
$box = id(new PHUIObjectBoxView())
->setValidationException($validation_exception)
->setHeaderText($title)
->appendChild($form);
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
if ($is_new) {

View file

@ -139,7 +139,7 @@ final class AlmanacDeviceViewController
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
private function buildSSHKeysTable(AlmanacDevice $device) {
@ -200,7 +200,7 @@ final class AlmanacDeviceViewController
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
@ -249,7 +249,7 @@ final class AlmanacDeviceViewController
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Bound Services'))
->appendChild($table);
->setTable($table);
}

View file

@ -132,7 +132,7 @@ final class AlmanacInterfaceEditController
$box = id(new PHUIObjectBoxView())
->setValidationException($validation_exception)
->setHeaderText($title)
->appendChild($form);
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($device->getName(), $device_uri);

View file

@ -120,7 +120,7 @@ final class AlmanacNetworkEditController
$box = id(new PHUIObjectBoxView())
->setValidationException($validation_exception)
->setHeaderText($title)
->appendChild($form);
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
if ($is_new) {

View file

@ -238,7 +238,7 @@ final class AlmanacServiceEditController
$box = id(new PHUIObjectBoxView())
->setFormErrors($errors)
->setHeaderText($title)
->appendChild($form);
->setForm($form);
return $this->buildApplicationPage(
array(

View file

@ -141,7 +141,7 @@ final class AlmanacServiceViewController
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
}

View file

@ -94,7 +94,7 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider {
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
public function getDescriptionForCreate() {

View file

@ -104,6 +104,6 @@ final class PhabricatorAuthInviteSearchEngine
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Email Invitations'))
->appendChild($table);
->setTable($table);
}
}

View file

@ -29,10 +29,14 @@ final class PhabricatorChatLogChannelListController
->buildApplicationCrumbs()
->addTextCrumb(pht('Channel List'), $this->getApplicationURI());
$box = id(new PHUIObjectBoxView())
->setHeaderText('Channel List')
->setObjectList($list);
return $this->buildApplicationPage(
array(
$crumbs,
$list,
$box,
),
array(
'title' => pht('Channel List'),

View file

@ -566,11 +566,11 @@ final class PhabricatorConduitAPIController
$param_panel = new PHUIObjectBoxView();
$param_panel->setHeaderText(pht('Method Parameters'));
$param_panel->appendChild($param_table);
$param_panel->setTable($param_table);
$result_panel = new PHUIObjectBoxView();
$result_panel->setHeaderText(pht('Method Result'));
$result_panel->appendChild($result_table);
$result_panel->setTable($result_table);
$method_uri = $this->getApplicationURI('method/'.$method.'/');

View file

@ -86,7 +86,7 @@ final class PhabricatorConduitConsoleController
$form_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Call Method'))
->appendChild($form);
->setForm($form);
$content = array();
@ -129,7 +129,7 @@ final class PhabricatorConduitConsoleController
));
$content[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('Builtin Orders'))
->appendChild($table);
->setTable($table);
$columns = $query->getOrderableColumns();
@ -154,7 +154,7 @@ final class PhabricatorConduitConsoleController
));
$content[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('Column Orders'))
->appendChild($table);
->setTable($table);
}
$crumbs = $this->buildApplicationCrumbs();

View file

@ -37,7 +37,7 @@ final class PhabricatorConduitLogController
$table = $this->renderCallTable($calls, $conns);
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Call Logs'))
->appendChild($table);
->setTable($table);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Call Logs'));

View file

@ -108,7 +108,7 @@ final class PhabricatorConduitTokensSettingsPanel
$panel = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
return $panel;
}

View file

@ -57,7 +57,7 @@ final class PhabricatorConfigAllController
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Current Settings'));
$panel->appendChild($table);
$panel->setTable($table);
$versions = $this->loadVersions();

View file

@ -92,7 +92,7 @@ final class PhabricatorConfigCacheController
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Data Cache'))
->addPropertyList($properties)
->appendChild($table);
->setTable($table);
}
private function renderCommonProperties(

View file

@ -150,7 +150,7 @@ final class PhabricatorConfigDatabaseIssueController
$table_box = id(new PHUIObjectBoxView())
->setHeader($this->buildHeaderWithDocumentationLink($title))
->setFormErrors($errors)
->appendChild($table);
->setTable($table);
$nav = $this->buildSideNavView();
$nav->selectFilter('dbissue/');

View file

@ -165,12 +165,15 @@ final class PhabricatorConfigDatabaseStatusController
),
$comp->getIssues());
$box = id(new PHUIObjectBoxView())
$prop_box = id(new PHUIObjectBoxView())
->setHeader($this->buildHeaderWithDocumentationLink($title))
->addPropertyList($properties)
->appendChild($table);
->addPropertyList($properties);
return $this->buildResponse($title, $box);
$table_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Databases'))
->setTable($table);
return $this->buildResponse($title, array($prop_box, $table_box));
}
private function renderDatabase(
@ -219,7 +222,7 @@ final class PhabricatorConfigDatabaseStatusController
null,
));
$title = pht('Database Status: %s', $database_name);
$title = pht('Database: %s', $database_name);
$actual_database = $actual->getDatabase($database_name);
if ($actual_database) {
@ -260,12 +263,15 @@ final class PhabricatorConfigDatabaseStatusController
),
$database->getIssues());
$box = id(new PHUIObjectBoxView())
$prop_box = id(new PHUIObjectBoxView())
->setHeader($this->buildHeaderWithDocumentationLink($title))
->addPropertyList($properties)
->appendChild($table);
->addPropertyList($properties);
return $this->buildResponse($title, $box);
$table_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Database Status'))
->setTable($table);
return $this->buildResponse($title, array($prop_box, $table_box));
}
private function renderTable(
@ -443,7 +449,7 @@ final class PhabricatorConfigDatabaseStatusController
null,
));
$title = pht('Database Status: %s.%s', $database_name, $table_name);
$title = pht('Database: %s.%s', $database_name, $table_name);
if ($actual_table) {
$actual_collation = $actual_table->getCollation();
@ -470,13 +476,19 @@ final class PhabricatorConfigDatabaseStatusController
),
$table->getIssues());
$box = id(new PHUIObjectBoxView())
$prop_box = id(new PHUIObjectBoxView())
->setHeader($this->buildHeaderWithDocumentationLink($title))
->addPropertyList($properties)
->appendChild($table_view)
->appendChild($keys_view);
->addPropertyList($properties);
return $this->buildResponse($title, $box);
$table_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Database'))
->setTable($table_view);
$key_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Keys'))
->setTable($keys_view);
return $this->buildResponse($title, array($prop_box, $table_box, $key_box));
}
private function renderColumn(

View file

@ -28,25 +28,25 @@ final class PhabricatorConfigIssueListController
$setup_issues[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('Important Setup Issues'))
->setColor(PHUIObjectBoxView::COLOR_RED)
->appendChild($important);
->setObjectList($important);
}
if ($php) {
$setup_issues[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('PHP Setup Issues'))
->appendChild($php);
->setObjectList($php);
}
if ($mysql) {
$setup_issues[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('MySQL Setup Issues'))
->appendChild($mysql);
->setObjectList($mysql);
}
if ($other) {
$setup_issues[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('Other Setup Issues'))
->appendChild($other);
->setObjectList($other);
}
if (empty($setup_issues)) {

View file

@ -18,7 +18,7 @@ final class PhabricatorConfigListController
$core = id(new PHUIObjectBoxView())
->setHeaderText($title)
->appendChild($core_list);
->setObjectList($core_list);
$apps = id(new PHUIObjectBoxView())
->setHeaderText(pht('Applications Configuration'))

View file

@ -130,7 +130,7 @@ final class DifferentialDiffViewController extends DifferentialController {
$prop_box = id(new PHUIObjectBoxView())
->setHeader($property_head)
->addPropertyList($property_view)
->appendChild($form);
->setForm($form);
return $this->buildApplicationPage(
array(

View file

@ -250,6 +250,7 @@ final class DifferentialChangesetListView extends AphrontView {
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
->setCollapsed(true)
->appendChild($content);
return $object_box;

View file

@ -195,7 +195,7 @@ final class DifferentialRevisionListView extends AphrontView {
if ($this->header && !$this->noBox) {
$list->setFlush(true);
$list = id(new PHUIObjectBoxView())
->appendChild($list);
->setObjectList($list);
if ($this->header instanceof PHUIHeaderView) {
$list->setHeader($this->header);

View file

@ -307,7 +307,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Revision Update History'))
->setFlush(true)
->appendChild($content);
->setTable($content);
}
const STAR_NONE = 'none';

View file

@ -53,7 +53,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController {
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Facts'));
$panel->appendChild($table);
$panel->setTable($table);
$chart_form = $this->buildChartForm();

View file

@ -87,7 +87,7 @@ final class PhabricatorFilesApplicationStorageEnginePanel
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Storage Engines'))
->appendChild($table);
->setTable($table);
return $box;
}

View file

@ -57,7 +57,7 @@ final class FundInitiativeViewController
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($properties);
->addPropertyList($properties);
$timeline = $this->buildTransactionTimeline(

View file

@ -143,7 +143,7 @@ final class FundBackerSearchEngine
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Backers'))
->appendChild($table);
->setTable($table);
}
}

View file

@ -284,7 +284,7 @@ final class LegalpadDocumentSignatureSearchEngine
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
if (!$this->document) {
$policy_notice = id(new PHUIInfoView())

View file

@ -173,7 +173,7 @@ final class ManiphestBatchEditController extends ManiphestController {
$task_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Selected Tasks'))
->appendChild($list);
->setObjectList($list);
$form_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Batch Editor'))

View file

@ -272,7 +272,7 @@ final class ManiphestReportController extends ManiphestController {
if ($caption) {
$panel->setInfoView($caption);
}
$panel->appendChild($table);
$panel->setTable($table);
$tokens = array();
if ($handle) {
@ -653,7 +653,7 @@ final class ManiphestReportController extends ManiphestController {
$panel = new PHUIObjectBoxView();
$panel->setHeaderText($header);
$panel->appendChild($table);
$panel->setTable($table);
$tokens = array();
if ($project_handle) {

View file

@ -341,7 +341,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
$comment_box = id(new PHUIObjectBoxView())
->setFlush(true)
->setHeaderText($comment_header)
->appendChild($comment_form);
->setForm($comment_form);
$timeline->setQuoteTargetID('transaction-comments');
$timeline->setQuoteRef($object_name);
}

View file

@ -56,7 +56,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
return $box;
}
@ -175,7 +175,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
$title = $application->getName();

View file

@ -235,7 +235,7 @@ final class MultimeterSampleController extends MultimeterController {
'Samples (%s - %s)',
phabricator_datetime($ago, $viewer),
phabricator_datetime($now, $viewer)))
->appendChild($table);
->setTable($table);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(

View file

@ -135,7 +135,7 @@ final class PhabricatorOAuthServerAuthorizationsSettingsPanel
$panel = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
return $panel;
}

View file

@ -129,7 +129,7 @@ final class PhabricatorOwnersDetailController
->setText(pht('Edit Package')));
$panel->setHeader($header);
$panel->appendChild($table);
$panel->setTable($table);
$key = 'package/'.$package->getID();
$this->setSideNavFilter($key);

View file

@ -330,7 +330,7 @@ final class PhabricatorOwnersListController
$panel = new PHUIObjectBoxView();
$panel->setHeaderText($header);
$panel->appendChild($table);
$panel->setTable($table);
return $panel;
}

View file

@ -72,7 +72,7 @@ final class PhabricatorPeopleCreateController
$box = id(new PHUIObjectBoxView())
->setHeaderText($title)
->appendChild($form);
->setForm($form);
return $this->buildApplicationPage(
array(

View file

@ -163,7 +163,7 @@ final class PhabricatorPeopleInviteSendController
->setErrors($confirm_errors)
->setSeverity($severity))
->setHeaderText(pht('Confirm Invites'))
->appendChild($invite_table)
->setTable($invite_table)
->appendChild($confirm_form);
}
@ -203,7 +203,7 @@ final class PhabricatorPeopleInviteSendController
? pht('Revise Invites')
: pht('Invite Users'))
->setFormErrors($errors)
->appendChild($form);
->setForm($form);
return $this->buildApplicationPage(
array(

View file

@ -188,6 +188,6 @@ final class PhabricatorPeopleLogSearchEngine
return id(new PHUIObjectBoxView())
->setHeaderText(pht('User Activity Logs'))
->appendChild($table);
->setTable($table);
}
}

View file

@ -120,7 +120,7 @@ final class PhortuneAccountEditController extends PhortuneController {
$box = id(new PHUIObjectBoxView())
->setHeaderText($title)
->setValidationException($validation_exception)
->appendChild($form);
->setForm($form);
return $this->buildApplicationPage(
array(

View file

@ -175,7 +175,7 @@ final class PhortuneAccountViewController extends PhortuneController {
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($list);
->setObjectList($list);
}
private function buildInvoicesSection(
@ -207,7 +207,7 @@ final class PhortuneAccountViewController extends PhortuneController {
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
private function buildPurchaseHistorySection(PhortuneAccount $account) {
@ -258,7 +258,7 @@ final class PhortuneAccountViewController extends PhortuneController {
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
private function buildChargeHistorySection(PhortuneAccount $account) {
@ -302,7 +302,7 @@ final class PhortuneAccountViewController extends PhortuneController {
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
private function buildSubscriptionsSection(PhortuneAccount $account) {
@ -338,7 +338,7 @@ final class PhortuneAccountViewController extends PhortuneController {
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
}
protected function buildApplicationCrumbs() {

View file

@ -113,7 +113,7 @@ final class PhortuneCartCheckoutController
$cart_box = id(new PHUIObjectBoxView())
->setFormErrors($errors)
->setHeaderText(pht('Cart Contents'))
->appendChild($cart_table);
->setTable($cart_table);
$title = $cart->getName();

View file

@ -146,8 +146,8 @@ final class PhortuneCartViewController
$cart_box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($properties)
->appendChild($cart_table);
->addPropertyList($properties)
->setTable($cart_table);
if ($errors) {
$cart_box->setFormErrors($errors);
@ -180,7 +180,7 @@ final class PhortuneCartViewController
$charges = id(new PHUIObjectBoxView())
->setHeaderText(pht('Charges'))
->appendChild($charges_table);
->setTable($charges_table);
$account = $cart->getAccount();

View file

@ -164,7 +164,7 @@ final class PhortuneMerchantEditController
$box = id(new PHUIObjectBoxView())
->setValidationException($validation_exception)
->setHeaderText($title)
->appendChild($form);
->setForm($form);
return $this->buildApplicationPage(
array(

View file

@ -231,7 +231,7 @@ final class PhortuneMerchantInvoiceCreateController
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('New Invoice'))
->setFormErrors($errors)
->appendChild($form);
->setForm($form);
return $this->buildApplicationPage(
array(

View file

@ -50,7 +50,7 @@ final class PhortuneMerchantViewController
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($properties);
->addPropertyList($properties);
$timeline = $this->buildTransactionTimeline(
$merchant,
@ -293,7 +293,7 @@ final class PhortuneMerchantViewController
return id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($provider_list);
->setObjectList($provider_list);
}

View file

@ -65,7 +65,7 @@ final class PhortunePaymentMethodEditController
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Edit Payment Method'))
->appendChild($form);
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($account->getName(), $account_uri);

View file

@ -229,6 +229,6 @@ final class PhortuneCartSearchEngine
return id(new PHUIObjectBoxView())
->setHeaderText($header)
->appendChild($table);
->setTable($table);
}
}

View file

@ -129,6 +129,6 @@ final class PhortuneChargeSearchEngine
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Charges'))
->appendChild($table);
->setTable($table);
}
}

View file

@ -160,6 +160,6 @@ final class PhortuneSubscriptionSearchEngine
return id(new PHUIObjectBoxView())
->setHeaderText($header)
->appendChild($table);
->setTable($table);
}
}

View file

@ -149,7 +149,7 @@ final class PhrictionDiffController extends PhrictionController {
'a',
array(
'href' => $uri->alter('l', $l - 1)->alter('r', $r - 1),
'class' => 'button',
'class' => 'button simple',
),
pht("\xC2\xAB Previous Change"));
} else {
@ -168,7 +168,7 @@ final class PhrictionDiffController extends PhrictionController {
'a',
array(
'href' => $uri->alter('l', $l + 1)->alter('r', $r + 1),
'class' => 'button',
'class' => 'button simple',
),
pht("Next Change \xC2\xBB"));
} else {
@ -206,6 +206,7 @@ final class PhrictionDiffController extends PhrictionController {
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
->setCollapsed(true)
->appendChild($output);
return $this->buildApplicationPage(

View file

@ -83,7 +83,7 @@ final class PhabricatorRepositoryListController
$header->addActionLink($button);
}
$panel->setHeader($header);
$panel->appendChild($table);
$panel->setTable($table);
$projects = id(new PhabricatorRepositoryArcanistProject())->loadAll();
@ -145,7 +145,7 @@ final class PhabricatorRepositoryListController
$project_panel = new PHUIObjectBoxView();
$project_panel->setHeaderText(pht('Arcanist Projects'));
$project_panel->appendChild($project_table);
$project_panel->setTable($project_table);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Repository List'));

View file

@ -56,7 +56,7 @@ final class PhabricatorActivitySettingsPanel extends PhabricatorSettingsPanel {
$panel = id(new PHUIObjectBoxView())
->setHeaderText(pht('Account Activity Logs'))
->appendChild($table);
->setTable($table);
$pager_box = id(new PHUIBoxView())
->addMargin(PHUI::MARGIN_LARGE)

View file

@ -147,7 +147,7 @@ final class PhabricatorEmailAddressesSettingsPanel
$header->addActionLink($button);
}
$view->setHeader($header);
$view->appendChild($table);
$view->setTable($table);
return $view;
}

View file

@ -135,11 +135,11 @@ final class PhabricatorExternalAccountsSettingsPanel
$linked_box = id(new PHUIObjectBoxView())
->setHeader($linked_head)
->appendChild($linked);
->setObjectList($linked);
$linkable_box = id(new PHUIObjectBoxView())
->setHeader($linkable_head)
->appendChild($linkable);
->setObjectList($linkable);
return array(
$linked_box,

View file

@ -188,7 +188,7 @@ final class PhabricatorHomePreferencesSettingsPanel
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($list);
->setObjectList($list);
return $box;
}

View file

@ -129,7 +129,7 @@ final class PhabricatorMultiFactorSettingsPanel
$header->addActionLink($create_button);
$panel->setHeader($header);
$panel->appendChild($table);
$panel->setTable($table);
return $panel;
}

View file

@ -71,7 +71,7 @@ final class PhabricatorSSHKeysSettingsPanel extends PhabricatorSettingsPanel {
$header->addActionLink($upload_button);
$panel->setHeader($header);
$panel->appendChild($table);
$panel->setTable($table);
return $panel;
}

View file

@ -138,7 +138,7 @@ final class PhabricatorSessionsSettingsPanel extends PhabricatorSettingsPanel {
$panel = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
return $panel;
}

View file

@ -91,7 +91,7 @@ final class PhabricatorTokensSettingsPanel extends PhabricatorSettingsPanel {
$panel = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($table);
->setTable($table);
return $panel;
}

View file

@ -117,7 +117,7 @@ final class PhabricatorXHProfProfileSymbolView
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('XHProf Profile'));
$panel->appendChild($table);
$panel->setTable($table);
return $panel->render();
}

View file

@ -134,7 +134,7 @@ final class PhabricatorXHProfProfileTopLevelView
}
$panel->setHeader($header);
$panel->appendChild($table);
$panel->setTable($table);
return $panel->render();
}

View file

@ -150,7 +150,7 @@ final class PHUIObjectBoxView extends AphrontView {
$this->objectList = $list;
return $this;
}
public function setTable($table) {
$this->collapsed = true;
$this->table = $table;
@ -306,7 +306,7 @@ final class PHUIObjectBoxView extends AphrontView {
if ($this->color) {
$content->addClass('phui-object-box-'.$this->color);
}
if ($this->collapsed) {
$content->addClass('phui-object-box-collapsed');
}

View file

@ -204,7 +204,7 @@ span.single-display-line-content {
}
.aphront-table-view tr.highlighted {
background: #fcf8e2;
background: #fdf9e4;
}
.aphront-table-view tr.alt-highlighted {

View file

@ -37,6 +37,14 @@ div.phui-object-box.phui-object-box-flush {
margin: 12px 0 0 0;
}
.phui-object-box.phui-object-box-collapsed
.phui-header-shell + .phui-info-view {
margin: 0;
border-radius: 0;
border: 0;
border-bottom: 1px solid {$thinblueborder};
}
.device-phone .phui-object-box {
margin: 8px 8px 0 8px;
}