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

Provide some more context hints for repository URIs

Summary: Ref T10923. This provides a little guidance about hosted vs observed, and points at the `diffusion.ssh-*` options.

Test Plan: Poked around in the web UI, saw useful guidance.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10923

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

+54 -2
+18 -1
src/applications/diffusion/editor/DiffusionURIEditEngine.php
··· 83 83 protected function buildCustomEditFields($object) { 84 84 $viewer = $this->getViewer(); 85 85 86 + $uri_instructions = null; 86 87 if ($object->isBuiltin()) { 87 88 $is_builtin = true; 88 89 $uri_value = (string)$object->getDisplayURI(); 90 + 91 + switch ($object->getBuiltinProtocol()) { 92 + case PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH: 93 + $uri_instructions = pht( 94 + " - Configure [[ %s | %s ]] to change the SSH username.\n". 95 + " - Configure [[ %s | %s ]] to change the SSH host.\n". 96 + " - Configure [[ %s | %s ]] to change the SSH port.", 97 + '/config/edit/diffusion.ssh-user/', 98 + 'diffusion.ssh-user', 99 + '/config/edit/diffusion.ssh-host/', 100 + 'diffusion.ssh-host', 101 + '/config/edit/diffusion.ssh-port/', 102 + 'diffusion.ssh-port'); 103 + break; 104 + } 89 105 } else { 90 106 $is_builtin = false; 91 107 $uri_value = $object->getURI(); ··· 118 134 ->setConduitTypeDescription(pht('New repository URI.')) 119 135 ->setIsRequired(!$is_builtin) 120 136 ->setIsLocked($is_builtin) 121 - ->setValue($uri_value), 137 + ->setValue($uri_value) 138 + ->setControlInstructions($uri_instructions), 122 139 id(new PhabricatorSelectEditField()) 123 140 ->setKey('io') 124 141 ->setLabel(pht('I/O Type'))
+1 -1
src/applications/diffusion/management/DiffusionRepositoryDocumentationManagementPanel.php
··· 14 14 } 15 15 16 16 public function getManagementPanelIcon() { 17 - return 'fa-book bluegrey'; 17 + return 'fa-book'; 18 18 } 19 19 20 20 public function buildManagementPanelContent() {
+20
src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php
··· 113 113 ->setTag('a') 114 114 ->setText(pht('Documentation'))); 115 115 116 + $messages = array(); 117 + if ($repository->isHosted()) { 118 + $messages[] = array( 119 + id(new PHUIIconView())->setIcon('fa-folder'), 120 + ' ', 121 + pht('Phabricator is hosting this repository.'), 122 + ); 123 + } else { 124 + $messages[] = array( 125 + id(new PHUIIconView())->setIcon('fa-download'), 126 + ' ', 127 + pht('This repository is hosted remotely. Phabricator is observing it.'), 128 + ); 129 + } 130 + 131 + $info_view = id(new PHUIInfoView()) 132 + ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 133 + ->setErrors($messages); 134 + 116 135 return id(new PHUIObjectBoxView()) 117 136 ->setHeader($header) 137 + ->setInfoView($info_view) 118 138 ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 119 139 ->setTable($table); 120 140 }
+15
src/applications/transactions/editfield/PhabricatorEditField.php
··· 16 16 private $isRequired; 17 17 private $previewPanel; 18 18 private $controlID; 19 + private $controlInstructions; 19 20 20 21 private $description; 21 22 private $conduitDescription; ··· 272 273 return $this->previewPanel; 273 274 } 274 275 276 + public function setControlInstructions($control_instructions) { 277 + $this->controlInstructions = $control_instructions; 278 + return $this; 279 + } 280 + 281 + public function getControlInstructions() { 282 + return $this->controlInstructions; 283 + } 284 + 275 285 protected function newControl() { 276 286 throw new PhutilMethodNotImplementedException(); 277 287 } ··· 356 366 $control 357 367 ->setError(pht('Locked')); 358 368 } 369 + } 370 + 371 + $instructions = $this->getControlInstructions(); 372 + if (strlen($instructions)) { 373 + $form->appendRemarkupInstructions($instructions); 359 374 } 360 375 361 376 $form->appendControl($control);