@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Convert all remaining old tabs to new PHUITabGroupViews

Summary: Ref T10628. This moves everything else over. I'll clean up the cruft in the next diff.

Test Plan:
- Viewed Conduit API page, toggled tabs.
- Viewed Harbormaster build, toggled tabs.
- Viewed a Drydock lease, swapped tabs.
- Viewed a Drydock resource, swapped tabs.
- Viewed mail, swapped tabs.
- Grepped for `addPropertyList(...)`, looked for any remaining calls with a second argument.
- Also checked rSAAS for any calls, but we don't have anything there that uses tabs.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10628

Differential Revision: https://secure.phabricator.com/D16207

+136 -49
+18 -3
src/applications/conduit/controller/PhabricatorConduitController.php
··· 60 60 ->setErrors($messages) 61 61 ->setSeverity(PHUIInfoView::SEVERITY_NOTICE); 62 62 63 + $tab_group = id(new PHUITabGroupView()) 64 + ->addTab( 65 + id(new PHUITabView()) 66 + ->setName(pht('arc call-conduit')) 67 + ->setKey('arc') 68 + ->appendChild($arc_example)) 69 + ->addTab( 70 + id(new PHUITabView()) 71 + ->setName(pht('cURL')) 72 + ->setKey('curl') 73 + ->appendChild($curl_example)) 74 + ->addTab( 75 + id(new PHUITabView()) 76 + ->setName(pht('PHP')) 77 + ->setKey('php') 78 + ->appendChild($php_example)); 79 + 63 80 return id(new PHUIObjectBoxView()) 64 81 ->setHeaderText(pht('Examples')) 65 82 ->setInfoView($info_view) 66 83 ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 67 - ->addPropertyList($arc_example, pht('arc call-conduit')) 68 - ->addPropertyList($curl_example, pht('cURL')) 69 - ->addPropertyList($php_example, pht('PHP')); 84 + ->addTabGroup($tab_group); 70 85 } 71 86 72 87 private function renderExample(
+18 -3
src/applications/drydock/controller/DrydockLeaseViewController.php
··· 45 45 $locks = $this->buildLocksTab($lease->getPHID()); 46 46 $commands = $this->buildCommandsTab($lease->getPHID()); 47 47 48 + $tab_group = id(new PHUITabGroupView()) 49 + ->addTab( 50 + id(new PHUITabView()) 51 + ->setName(pht('Properties')) 52 + ->setKey('properties') 53 + ->appendChild($properties)) 54 + ->addTab( 55 + id(new PHUITabView()) 56 + ->setName(pht('Slot Locks')) 57 + ->setKey('locks') 58 + ->appendChild($locks)) 59 + ->addTab( 60 + id(new PHUITabView()) 61 + ->setName(pht('Commands')) 62 + ->setKey('commands') 63 + ->appendChild($commands)); 64 + 48 65 $object_box = id(new PHUIObjectBoxView()) 49 66 ->setHeaderText(pht('Properties')) 50 67 ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 51 - ->addPropertyList($properties, pht('Properties')) 52 - ->addPropertyList($locks, pht('Slot Locks')) 53 - ->addPropertyList($commands, pht('Commands')); 68 + ->addTabGroup($tab_group); 54 69 55 70 $view = id(new PHUITwoColumnView()) 56 71 ->setHeader($header)
+20 -4
src/applications/drydock/controller/DrydockResourceViewController.php
··· 49 49 50 50 $locks = $this->buildLocksTab($resource->getPHID()); 51 51 $commands = $this->buildCommandsTab($resource->getPHID()); 52 - $lease_box = $this->buildLeaseBox($resource); 52 + 53 + $tab_group = id(new PHUITabGroupView()) 54 + ->addTab( 55 + id(new PHUITabView()) 56 + ->setName(pht('Properties')) 57 + ->setKey('properties') 58 + ->appendChild($properties)) 59 + ->addTab( 60 + id(new PHUITabView()) 61 + ->setName(pht('Slot Locks')) 62 + ->setKey('locks') 63 + ->appendChild($locks)) 64 + ->addTab( 65 + id(new PHUITabView()) 66 + ->setName(pht('Commands')) 67 + ->setKey('commands') 68 + ->appendChild($commands)); 53 69 54 70 $object_box = id(new PHUIObjectBoxView()) 55 71 ->setHeaderText(pht('Properties')) 56 72 ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 57 - ->addPropertyList($properties, pht('Properties')) 58 - ->addPropertyList($locks, pht('Slot Locks')) 59 - ->addPropertyList($commands, pht('Commands')); 73 + ->addTabGroup($tab_group); 74 + 75 + $lease_box = $this->buildLeaseBox($resource); 60 76 61 77 $view = id(new PHUITwoColumnView()) 62 78 ->setHeader($header)
+36 -12
src/applications/harbormaster/controller/HarbormasterBuildViewController.php
··· 95 95 ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 96 96 ->setHeader($header); 97 97 98 + $tab_group = new PHUITabGroupView(); 99 + $target_box->addTabGroup($tab_group); 100 + 98 101 $property_list = new PHUIPropertyListView(); 99 102 100 103 $target_artifacts = idx($artifacts, $build_target->getPHID(), array()); ··· 178 181 179 182 $property_list->addProperty(pht('Status'), $status_view); 180 183 181 - $target_box->addPropertyList($property_list, pht('Overview')); 184 + $tab_group->addTab( 185 + id(new PHUITabView()) 186 + ->setName(pht('Overview')) 187 + ->setKey('overview') 188 + ->appendChild($property_list)); 182 189 183 190 $step = $build_target->getBuildStep(); 184 191 ··· 204 211 foreach ($details as $key => $value) { 205 212 $property_list->addProperty($key, $value); 206 213 } 207 - $target_box->addPropertyList($property_list, pht('Configuration')); 214 + $tab_group->addTab( 215 + id(new PHUITabView()) 216 + ->setName(pht('Configuration')) 217 + ->setKey('configuration') 218 + ->appendChild($property_list)); 208 219 209 220 $variables = $build_target->getVariables(); 210 - $property_list = new PHUIPropertyListView(); 211 - $property_list->addRawContent($this->buildProperties($variables)); 212 - $target_box->addPropertyList($property_list, pht('Variables')); 221 + $variables_tab = $this->buildProperties($variables); 222 + $tab_group->addTab( 223 + id(new PHUITabView()) 224 + ->setName(pht('Variables')) 225 + ->setKey('variables') 226 + ->appendChild($variables_tab)); 213 227 214 228 $artifacts_tab = $this->buildArtifacts($build_target, $target_artifacts); 215 - $property_list = new PHUIPropertyListView(); 216 - $property_list->addRawContent($artifacts_tab); 217 - $target_box->addPropertyList($property_list, pht('Artifacts')); 229 + $tab_group->addTab( 230 + id(new PHUITabView()) 231 + ->setName(pht('Artifacts')) 232 + ->setKey('artifacts') 233 + ->appendChild($artifacts_tab)); 218 234 219 235 $build_messages = idx($messages, $build_target->getPHID(), array()); 220 - $property_list = new PHUIPropertyListView(); 221 - $property_list->addRawContent($this->buildMessages($build_messages)); 222 - $target_box->addPropertyList($property_list, pht('Messages')); 236 + $messages_tab = $this->buildMessages($build_messages); 237 + $tab_group->addTab( 238 + id(new PHUITabView()) 239 + ->setName(pht('Messages')) 240 + ->setKey('messages') 241 + ->appendChild($messages_tab)); 223 242 224 243 $property_list = new PHUIPropertyListView(); 225 244 $property_list->addProperty( ··· 228 247 $property_list->addProperty( 229 248 pht('Build Target PHID'), 230 249 $build_target->getPHID()); 231 - $target_box->addPropertyList($property_list, pht('Metadata')); 250 + 251 + $tab_group->addTab( 252 + id(new PHUITabView()) 253 + ->setName(pht('Metadata')) 254 + ->setKey('metadata') 255 + ->appendChild($property_list)); 232 256 233 257 $targets[] = $target_box; 234 258
+23 -4
src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php
··· 36 36 ->addTextCrumb(pht('Mail %d', $mail->getID())) 37 37 ->setBorder(true); 38 38 39 + $tab_group = id(new PHUITabGroupView()) 40 + ->addTab( 41 + id(new PHUITabView()) 42 + ->setName(pht('Message')) 43 + ->setKey('message') 44 + ->appendChild($this->buildMessageProperties($mail))) 45 + ->addTab( 46 + id(new PHUITabView()) 47 + ->setName(pht('Headers')) 48 + ->setKey('headers') 49 + ->appendChild($this->buildHeaderProperties($mail))) 50 + ->addTab( 51 + id(new PHUITabView()) 52 + ->setName(pht('Delivery')) 53 + ->setKey('delivery') 54 + ->appendChild($this->buildDeliveryProperties($mail))) 55 + ->addTab( 56 + id(new PHUITabView()) 57 + ->setName(pht('Metadata')) 58 + ->setKey('metadata') 59 + ->appendChild($this->buildMetadataProperties($mail))); 60 + 39 61 $object_box = id(new PHUIObjectBoxView()) 40 62 ->setHeaderText(pht('Mail')) 41 63 ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 42 - ->addPropertyList($this->buildMessageProperties($mail), pht('Message')) 43 - ->addPropertyList($this->buildHeaderProperties($mail), pht('Headers')) 44 - ->addPropertyList($this->buildDeliveryProperties($mail), pht('Delivery')) 45 - ->addPropertyList($this->buildMetadataProperties($mail), pht('Metadata')); 64 + ->addTabGroup($tab_group); 46 65 47 66 $view = id(new PHUITwoColumnView()) 48 67 ->setHeader($header)
+21 -23
src/applications/uiexample/examples/PHUIPropertyListExample.php
··· 16 16 $request = $this->getRequest(); 17 17 $user = $request->getUser(); 18 18 19 - $details1 = id(new PHUIListItemView()) 20 - ->setName(pht('Details')) 21 - ->setSelected(true); 22 - 23 - $details2 = id(new PHUIListItemView()) 24 - ->setName(pht('Rainbow Info')) 25 - ->setStatusColor(PHUIListItemView::STATUS_WARN); 26 - 27 - $details3 = id(new PHUIListItemView()) 28 - ->setName(pht('Pasta Haiku')) 29 - ->setStatusColor(PHUIListItemView::STATUS_FAIL); 30 - 31 - $statustabs = id(new PHUIListView()) 32 - ->setType(PHUIListView::NAVBAR_LIST) 33 - ->addMenuItem($details1) 34 - ->addMenuItem($details2) 35 - ->addMenuItem($details3); 36 - 37 19 $view = new PHUIPropertyListView(); 38 20 39 21 $view->addProperty( ··· 54 36 'viverra. Nunc tempus tempor quam id iaculis. Maecenas lectus '. 55 37 'velit, aliquam et consequat quis, tincidunt id dolor.'); 56 38 57 - 58 39 $view2 = new PHUIPropertyListView(); 59 40 $view2->addSectionHeader(pht('Colors of the Rainbow')); 60 41 ··· 65 46 $view2->addProperty('B', pht('Blue')); 66 47 $view2->addProperty('I', pht('Indigo')); 67 48 $view2->addProperty('V', pht('Violet')); 68 - 69 49 70 50 $view3 = new PHUIPropertyListView(); 71 51 $view3->addSectionHeader(pht('Haiku About Pasta')); ··· 77 57 pht('haiku. it is very bad.'), 78 58 pht('what did you expect?'))); 79 59 60 + $details1 = id(new PHUITabView()) 61 + ->setName(pht('Details')) 62 + ->setKey('details') 63 + ->appendChild($view); 64 + 65 + $details2 = id(new PHUITabView()) 66 + ->setName(pht('Rainbow Info')) 67 + ->setKey('rainbow') 68 + ->appendChild($view2); 69 + 70 + $details3 = id(new PHUITabView()) 71 + ->setName(pht('Pasta Haiku')) 72 + ->setKey('haiku') 73 + ->appendChild($view3); 74 + 75 + $tab_group = id(new PHUITabGroupView()) 76 + ->addTab($details1) 77 + ->addTab($details2) 78 + ->addTab($details3); 79 + 80 80 $object_box1 = id(new PHUIObjectBoxView()) 81 81 ->setHeaderText(pht('%s Stackered', 'PHUIPropertyListView')) 82 - ->addPropertyList($view, $details1) 83 - ->addPropertyList($view2, $details2) 84 - ->addPropertyList($view3, $details3); 82 + ->addTabGroup($tab_group); 85 83 86 84 $edge_cases_view = new PHUIPropertyListView(); 87 85