@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.

Update Conduit for new UI

Summary: View various conduit pages and update to new UI and add calls to newPage

Test Plan: View list, view method, make a call.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+69 -36
+26 -13
src/applications/conduit/controller/PhabricatorConduitAPIController.php
··· 511 511 'wide', 512 512 )); 513 513 514 - $param_panel = new PHUIObjectBoxView(); 515 - $param_panel->setHeaderText(pht('Method Parameters')); 516 - $param_panel->setTable($param_table); 514 + $param_panel = id(new PHUIObjectBoxView()) 515 + ->setHeaderText(pht('Method Parameters')) 516 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 517 + ->setTable($param_table); 517 518 518 - $result_panel = new PHUIObjectBoxView(); 519 - $result_panel->setHeaderText(pht('Method Result')); 520 - $result_panel->setTable($result_table); 519 + $result_panel = id(new PHUIObjectBoxView()) 520 + ->setHeaderText(pht('Method Result')) 521 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 522 + ->setTable($result_table); 521 523 522 524 $method_uri = $this->getApplicationURI('method/'.$method.'/'); 523 525 524 526 $crumbs = $this->buildApplicationCrumbs() 525 527 ->addTextCrumb($method, $method_uri) 526 - ->addTextCrumb(pht('Call')); 528 + ->addTextCrumb(pht('Call')) 529 + ->setBorder(true); 527 530 528 531 $example_panel = null; 529 532 if ($request && $method_implementation) { ··· 533 536 $params); 534 537 } 535 538 536 - return $this->buildApplicationPage( 537 - array( 538 - $crumbs, 539 + $title = pht('Method Call Result'); 540 + $header = id(new PHUIHeaderView()) 541 + ->setHeader($title) 542 + ->setHeaderIcon('fa-exchange'); 543 + 544 + $view = id(new PHUITwoColumnView()) 545 + ->setHeader($header) 546 + ->setFooter(array( 539 547 $param_panel, 540 548 $result_panel, 541 549 $example_panel, 542 - ), 543 - array( 544 - 'title' => pht('Method Call Result'), 545 550 )); 551 + 552 + $title = pht('Method Call Result'); 553 + 554 + return $this->newPage() 555 + ->setTitle($title) 556 + ->setCrumbs($crumbs) 557 + ->appendChild($view); 558 + 546 559 } 547 560 548 561 private function renderAPIValue($value) {
+19 -15
src/applications/conduit/controller/PhabricatorConduitConsoleController.php
··· 85 85 86 86 $header = id(new PHUIHeaderView()) 87 87 ->setUser($viewer) 88 - ->setHeader($method->getAPIMethodName()); 88 + ->setHeader($method->getAPIMethodName()) 89 + ->setHeaderIcon('fa-tty'); 89 90 90 91 $form_box = id(new PHUIObjectBoxView()) 91 92 ->setHeaderText(pht('Call Method')) 93 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 92 94 ->setForm($form); 93 95 94 - $content = array(); 95 - 96 96 $properties = $this->buildMethodProperties($method); 97 97 98 98 $info_box = id(new PHUIObjectBoxView()) 99 99 ->setHeaderText(pht('API Method: %s', $method->getAPIMethodName())) 100 100 ->setFormErrors($errors) 101 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 101 102 ->appendChild($properties); 102 103 103 - $content[] = $info_box; 104 - $content[] = $method->getMethodDocumentation(); 105 - $content[] = $form_box; 106 - $content[] = $this->renderExampleBox($method, null); 107 - 108 104 $crumbs = $this->buildApplicationCrumbs(); 109 105 $crumbs->addTextCrumb($method->getAPIMethodName()); 106 + $crumbs->setBorder(true); 110 107 111 - return $this->buildApplicationPage( 112 - array( 113 - $crumbs, 114 - $content, 115 - ), 116 - array( 117 - 'title' => $method->getAPIMethodName(), 108 + $view = id(new PHUITwoColumnView()) 109 + ->setHeader($header) 110 + ->setFooter(array( 111 + $info_box, 112 + $method->getMethodDocumentation(), 113 + $form_box, 114 + $this->renderExampleBox($method, null), 118 115 )); 116 + 117 + $title = $method->getAPIMethodName(); 118 + 119 + return $this->newPage() 120 + ->setTitle($title) 121 + ->setCrumbs($crumbs) 122 + ->appendChild($view); 119 123 } 120 124 121 125 private function buildMethodProperties(ConduitAPIMethod $method) {
+1
src/applications/conduit/controller/PhabricatorConduitController.php
··· 56 56 return id(new PHUIObjectBoxView()) 57 57 ->setHeaderText(pht('Examples')) 58 58 ->setInfoView($info_view) 59 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 59 60 ->addPropertyList($arc_example, pht('arc call-conduit')) 60 61 ->addPropertyList($curl_example, pht('cURL')) 61 62 ->addPropertyList($php_example, pht('PHP'));
+15 -8
src/applications/conduit/controller/PhabricatorConduitTokenController.php
··· 55 55 56 56 $crumbs = $this->buildApplicationCrumbs(); 57 57 $crumbs->addTextCrumb(pht('Install Certificate')); 58 + $crumbs->setBorder(true); 58 59 59 60 $object_box = id(new PHUIObjectBoxView()) 60 61 ->setHeaderText(pht('Certificate Token')) 62 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 61 63 ->setForm($form); 62 64 63 - return $this->buildApplicationPage( 64 - array( 65 - $crumbs, 66 - $object_box, 67 - ), 68 - array( 69 - 'title' => pht('Certificate Install Token'), 70 - )); 65 + $title = pht('Certificate Install Token'); 66 + 67 + $header = id(new PHUIHeaderView()) 68 + ->setHeader($title); 69 + 70 + $view = id(new PHUITwoColumnView()) 71 + ->setHeader($header) 72 + ->setFooter($object_box); 73 + 74 + return $this->newPage() 75 + ->setTitle($title) 76 + ->setCrumbs($crumbs) 77 + ->appendChild($view); 71 78 } 72 79 73 80 }
+6
src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
··· 151 151 return id(new PHUIObjectBoxView()) 152 152 ->setHeaderText(pht('Builtin and Saved Queries')) 153 153 ->setCollapsed(true) 154 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 154 155 ->appendChild($this->buildRemarkup($info)) 155 156 ->appendChild($table); 156 157 } ··· 236 237 return id(new PHUIObjectBoxView()) 237 238 ->setHeaderText(pht('Custom Query Constraints')) 238 239 ->setCollapsed(true) 240 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 239 241 ->appendChild($this->buildRemarkup($info)) 240 242 ->appendChild($table); 241 243 } ··· 342 344 return id(new PHUIObjectBoxView()) 343 345 ->setHeaderText(pht('Result Ordering')) 344 346 ->setCollapsed(true) 347 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 345 348 ->appendChild($this->buildRemarkup($orders_info)) 346 349 ->appendChild($orders_table) 347 350 ->appendChild($this->buildRemarkup($columns_info)) ··· 422 425 return id(new PHUIObjectBoxView()) 423 426 ->setHeaderText(pht('Object Fields')) 424 427 ->setCollapsed(true) 428 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 425 429 ->appendChild($this->buildRemarkup($info)) 426 430 ->appendChild($table); 427 431 } ··· 510 514 return id(new PHUIObjectBoxView()) 511 515 ->setHeaderText(pht('Attachments')) 512 516 ->setCollapsed(true) 517 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 513 518 ->appendChild($this->buildRemarkup($info)) 514 519 ->appendChild($table); 515 520 } ··· 580 585 return id(new PHUIObjectBoxView()) 581 586 ->setHeaderText(pht('Paging and Limits')) 582 587 ->setCollapsed(true) 588 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 583 589 ->appendChild($this->buildRemarkup($info)); 584 590 } 585 591
+2
src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php
··· 94 94 $boxes[] = id(new PHUIObjectBoxView()) 95 95 ->setHeaderText(pht('Transaction Types')) 96 96 ->setCollapsed(true) 97 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 97 98 ->appendChild($this->buildRemarkup($summary_info)) 98 99 ->appendChild($summary_table); 99 100 ··· 140 141 $boxes[] = id(new PHUIObjectBoxView()) 141 142 ->setHeaderText(pht('Transaction Type: %s', $type->getEditType())) 142 143 ->setCollapsed(true) 144 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 143 145 ->appendChild($this->buildRemarkup($section)) 144 146 ->appendChild($type_table); 145 147 }