Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13995081
D16207.id38984.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
11 KB
Referenced Files
None
Subscribers
None
D16207.id38984.diff
View Options
diff --git a/src/applications/conduit/controller/PhabricatorConduitController.php b/src/applications/conduit/controller/PhabricatorConduitController.php
--- a/src/applications/conduit/controller/PhabricatorConduitController.php
+++ b/src/applications/conduit/controller/PhabricatorConduitController.php
@@ -60,13 +60,28 @@
->setErrors($messages)
->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
+ $tab_group = id(new PHUITabGroupView())
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('arc call-conduit'))
+ ->setKey('arc')
+ ->appendChild($arc_example))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('cURL'))
+ ->setKey('curl')
+ ->appendChild($curl_example))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('PHP'))
+ ->setKey('php')
+ ->appendChild($php_example));
+
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Examples'))
->setInfoView($info_view)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
- ->addPropertyList($arc_example, pht('arc call-conduit'))
- ->addPropertyList($curl_example, pht('cURL'))
- ->addPropertyList($php_example, pht('PHP'));
+ ->addTabGroup($tab_group);
}
private function renderExample(
diff --git a/src/applications/drydock/controller/DrydockLeaseViewController.php b/src/applications/drydock/controller/DrydockLeaseViewController.php
--- a/src/applications/drydock/controller/DrydockLeaseViewController.php
+++ b/src/applications/drydock/controller/DrydockLeaseViewController.php
@@ -45,12 +45,27 @@
$locks = $this->buildLocksTab($lease->getPHID());
$commands = $this->buildCommandsTab($lease->getPHID());
+ $tab_group = id(new PHUITabGroupView())
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Properties'))
+ ->setKey('properties')
+ ->appendChild($properties))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Slot Locks'))
+ ->setKey('locks')
+ ->appendChild($locks))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Commands'))
+ ->setKey('commands')
+ ->appendChild($commands));
+
$object_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Properties'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
- ->addPropertyList($properties, pht('Properties'))
- ->addPropertyList($locks, pht('Slot Locks'))
- ->addPropertyList($commands, pht('Commands'));
+ ->addTabGroup($tab_group);
$view = id(new PHUITwoColumnView())
->setHeader($header)
diff --git a/src/applications/drydock/controller/DrydockResourceViewController.php b/src/applications/drydock/controller/DrydockResourceViewController.php
--- a/src/applications/drydock/controller/DrydockResourceViewController.php
+++ b/src/applications/drydock/controller/DrydockResourceViewController.php
@@ -49,14 +49,30 @@
$locks = $this->buildLocksTab($resource->getPHID());
$commands = $this->buildCommandsTab($resource->getPHID());
- $lease_box = $this->buildLeaseBox($resource);
+
+ $tab_group = id(new PHUITabGroupView())
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Properties'))
+ ->setKey('properties')
+ ->appendChild($properties))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Slot Locks'))
+ ->setKey('locks')
+ ->appendChild($locks))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Commands'))
+ ->setKey('commands')
+ ->appendChild($commands));
$object_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Properties'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
- ->addPropertyList($properties, pht('Properties'))
- ->addPropertyList($locks, pht('Slot Locks'))
- ->addPropertyList($commands, pht('Commands'));
+ ->addTabGroup($tab_group);
+
+ $lease_box = $this->buildLeaseBox($resource);
$view = id(new PHUITwoColumnView())
->setHeader($header)
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
@@ -95,6 +95,9 @@
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setHeader($header);
+ $tab_group = new PHUITabGroupView();
+ $target_box->addTabGroup($tab_group);
+
$property_list = new PHUIPropertyListView();
$target_artifacts = idx($artifacts, $build_target->getPHID(), array());
@@ -178,7 +181,11 @@
$property_list->addProperty(pht('Status'), $status_view);
- $target_box->addPropertyList($property_list, pht('Overview'));
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Overview'))
+ ->setKey('overview')
+ ->appendChild($property_list));
$step = $build_target->getBuildStep();
@@ -204,22 +211,34 @@
foreach ($details as $key => $value) {
$property_list->addProperty($key, $value);
}
- $target_box->addPropertyList($property_list, pht('Configuration'));
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Configuration'))
+ ->setKey('configuration')
+ ->appendChild($property_list));
$variables = $build_target->getVariables();
- $property_list = new PHUIPropertyListView();
- $property_list->addRawContent($this->buildProperties($variables));
- $target_box->addPropertyList($property_list, pht('Variables'));
+ $variables_tab = $this->buildProperties($variables);
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Variables'))
+ ->setKey('variables')
+ ->appendChild($variables_tab));
$artifacts_tab = $this->buildArtifacts($build_target, $target_artifacts);
- $property_list = new PHUIPropertyListView();
- $property_list->addRawContent($artifacts_tab);
- $target_box->addPropertyList($property_list, pht('Artifacts'));
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Artifacts'))
+ ->setKey('artifacts')
+ ->appendChild($artifacts_tab));
$build_messages = idx($messages, $build_target->getPHID(), array());
- $property_list = new PHUIPropertyListView();
- $property_list->addRawContent($this->buildMessages($build_messages));
- $target_box->addPropertyList($property_list, pht('Messages'));
+ $messages_tab = $this->buildMessages($build_messages);
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Messages'))
+ ->setKey('messages')
+ ->appendChild($messages_tab));
$property_list = new PHUIPropertyListView();
$property_list->addProperty(
@@ -228,7 +247,12 @@
$property_list->addProperty(
pht('Build Target PHID'),
$build_target->getPHID());
- $target_box->addPropertyList($property_list, pht('Metadata'));
+
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Metadata'))
+ ->setKey('metadata')
+ ->appendChild($property_list));
$targets[] = $target_box;
diff --git a/src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php b/src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php
--- a/src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php
+++ b/src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php
@@ -36,13 +36,32 @@
->addTextCrumb(pht('Mail %d', $mail->getID()))
->setBorder(true);
+ $tab_group = id(new PHUITabGroupView())
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Message'))
+ ->setKey('message')
+ ->appendChild($this->buildMessageProperties($mail)))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Headers'))
+ ->setKey('headers')
+ ->appendChild($this->buildHeaderProperties($mail)))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Delivery'))
+ ->setKey('delivery')
+ ->appendChild($this->buildDeliveryProperties($mail)))
+ ->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Metadata'))
+ ->setKey('metadata')
+ ->appendChild($this->buildMetadataProperties($mail)));
+
$object_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Mail'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
- ->addPropertyList($this->buildMessageProperties($mail), pht('Message'))
- ->addPropertyList($this->buildHeaderProperties($mail), pht('Headers'))
- ->addPropertyList($this->buildDeliveryProperties($mail), pht('Delivery'))
- ->addPropertyList($this->buildMetadataProperties($mail), pht('Metadata'));
+ ->addTabGroup($tab_group);
$view = id(new PHUITwoColumnView())
->setHeader($header)
diff --git a/src/applications/uiexample/examples/PHUIPropertyListExample.php b/src/applications/uiexample/examples/PHUIPropertyListExample.php
--- a/src/applications/uiexample/examples/PHUIPropertyListExample.php
+++ b/src/applications/uiexample/examples/PHUIPropertyListExample.php
@@ -16,24 +16,6 @@
$request = $this->getRequest();
$user = $request->getUser();
- $details1 = id(new PHUIListItemView())
- ->setName(pht('Details'))
- ->setSelected(true);
-
- $details2 = id(new PHUIListItemView())
- ->setName(pht('Rainbow Info'))
- ->setStatusColor(PHUIListItemView::STATUS_WARN);
-
- $details3 = id(new PHUIListItemView())
- ->setName(pht('Pasta Haiku'))
- ->setStatusColor(PHUIListItemView::STATUS_FAIL);
-
- $statustabs = id(new PHUIListView())
- ->setType(PHUIListView::NAVBAR_LIST)
- ->addMenuItem($details1)
- ->addMenuItem($details2)
- ->addMenuItem($details3);
-
$view = new PHUIPropertyListView();
$view->addProperty(
@@ -54,7 +36,6 @@
'viverra. Nunc tempus tempor quam id iaculis. Maecenas lectus '.
'velit, aliquam et consequat quis, tincidunt id dolor.');
-
$view2 = new PHUIPropertyListView();
$view2->addSectionHeader(pht('Colors of the Rainbow'));
@@ -66,7 +47,6 @@
$view2->addProperty('I', pht('Indigo'));
$view2->addProperty('V', pht('Violet'));
-
$view3 = new PHUIPropertyListView();
$view3->addSectionHeader(pht('Haiku About Pasta'));
@@ -77,11 +57,29 @@
pht('haiku. it is very bad.'),
pht('what did you expect?')));
+ $details1 = id(new PHUITabView())
+ ->setName(pht('Details'))
+ ->setKey('details')
+ ->appendChild($view);
+
+ $details2 = id(new PHUITabView())
+ ->setName(pht('Rainbow Info'))
+ ->setKey('rainbow')
+ ->appendChild($view2);
+
+ $details3 = id(new PHUITabView())
+ ->setName(pht('Pasta Haiku'))
+ ->setKey('haiku')
+ ->appendChild($view3);
+
+ $tab_group = id(new PHUITabGroupView())
+ ->addTab($details1)
+ ->addTab($details2)
+ ->addTab($details3);
+
$object_box1 = id(new PHUIObjectBoxView())
->setHeaderText(pht('%s Stackered', 'PHUIPropertyListView'))
- ->addPropertyList($view, $details1)
- ->addPropertyList($view2, $details2)
- ->addPropertyList($view3, $details3);
+ ->addTabGroup($tab_group);
$edge_cases_view = new PHUIPropertyListView();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 24, 10:31 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6734437
Default Alt Text
D16207.id38984.diff (11 KB)
Attached To
Mode
D16207: Convert all remaining old tabs to new PHUITabGroupViews
Attached
Detach File
Event Timeline
Log In to Comment