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

Move actions into Diffusion header

Summary: This moves actions into the Diffusion main header, removes the locate file box, and widens description and cloning details. Projects are not currently in this layout, but will follow up in another diff. Trying to keep these changes small and iterative.

Test Plan:
Locate some files, test actions dropdown, repository with and without description. Also tablet, mobile layouts.

{F5040026}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+76 -30
+2 -2
resources/celerity/map.php
··· 71 71 'rsrc/css/application/differential/revision-history.css' => '0e8eb855', 72 72 'rsrc/css/application/differential/revision-list.css' => 'f3c47d33', 73 73 'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55', 74 - 'rsrc/css/application/diffusion/diffusion-history.css' => '898ed727', 75 74 'rsrc/css/application/diffusion/diffusion-icons.css' => '0c15255e', 76 75 'rsrc/css/application/diffusion/diffusion-readme.css' => '419dd5b6', 77 76 'rsrc/css/application/diffusion/diffusion-repository.css' => 'ee6f20ec', 78 77 'rsrc/css/application/diffusion/diffusion-source.css' => '750add59', 78 + 'rsrc/css/application/diffusion/diffusion.css' => '08991f7e', 79 79 'rsrc/css/application/feed/feed.css' => 'ecd4ec57', 80 80 'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2', 81 81 'rsrc/css/application/flag/flag.css' => 'bba8f811', ··· 570 570 'differential-revision-history-css' => '0e8eb855', 571 571 'differential-revision-list-css' => 'f3c47d33', 572 572 'differential-table-of-contents-css' => 'ae4b7a55', 573 - 'diffusion-history-css' => '898ed727', 573 + 'diffusion-css' => '08991f7e', 574 574 'diffusion-icons-css' => '0c15255e', 575 575 'diffusion-readme-css' => '419dd5b6', 576 576 'diffusion-repository-css' => 'ee6f20ec',
+24 -22
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 17 17 return $response; 18 18 } 19 19 20 + require_celerity_resource('diffusion-css'); 21 + 20 22 $viewer = $this->getViewer(); 21 23 $drequest = $this->getDiffusionRequest(); 22 24 $repository = $drequest->getRepository(); ··· 25 27 $crumbs->setBorder(true); 26 28 27 29 $header = $this->buildHeaderView($repository); 28 - $curtain = $this->buildCurtain($repository); 29 30 $property_table = $this->buildPropertiesTable($repository); 31 + $actions = $this->buildActionList($repository); 30 32 $description = $this->buildDescriptionView($repository); 31 33 $locate_file = $this->buildLocateFile(); 34 + 35 + $header->setActionList($actions); 32 36 33 37 // Before we do any work, make sure we're looking at a some content: we're 34 38 // on a valid branch, and the repository is not empty. ··· 88 92 89 93 $view = id(new PHUITwoColumnView()) 90 94 ->setHeader($header) 91 - ->setCurtain($curtain) 92 95 ->setTabs($tabs) 93 - ->setMainColumn(array( 96 + ->setFooter(array( 97 + $locate_file, 94 98 $property_table, 95 99 $description, 96 - $locate_file, 97 - )) 98 - ->setFooter($content); 100 + $content, 101 + )); 99 102 100 103 return $this->newPage() 101 104 ->setTitle( ··· 236 239 ->setPolicyObject($repository) 237 240 ->setProfileHeader(true) 238 241 ->setImage($repository->getProfileImageURI()) 239 - ->setImageEditURL('/diffusion/picture/'.$repository->getID().'/'); 242 + ->setImageEditURL('/diffusion/picture/'.$repository->getID().'/') 243 + ->addClass('diffusion-profile-header'); 240 244 241 245 if (!$repository->isTracked()) { 242 246 $header->setStatus('fa-ban', 'dark', pht('Inactive')); ··· 254 258 return $header; 255 259 } 256 260 257 - private function buildCurtain(PhabricatorRepository $repository) { 261 + private function buildActionList(PhabricatorRepository $repository) { 258 262 $viewer = $this->getViewer(); 259 263 260 264 $edit_uri = $repository->getPathURI('manage/'); 261 - $curtain = $this->newCurtainView($repository); 265 + $action_view = id(new PhabricatorActionListView()) 266 + ->setUser($viewer) 267 + ->setObject($repository); 262 268 263 - $curtain->addAction( 269 + $action_view->addAction( 264 270 id(new PhabricatorActionView()) 265 271 ->setName(pht('Manage Repository')) 266 272 ->setIcon('fa-cogs') ··· 270 276 $push_uri = $this->getApplicationURI( 271 277 'pushlog/?repositories='.$repository->getMonogram()); 272 278 273 - $curtain->addAction( 279 + $action_view->addAction( 274 280 id(new PhabricatorActionView()) 275 281 ->setName(pht('View Push Logs')) 276 282 ->setIcon('fa-list-alt') 277 283 ->setHref($push_uri)); 278 284 } 279 285 280 - return $curtain; 286 + return $action_view; 281 287 } 282 288 283 289 private function buildDescriptionView(PhabricatorRepository $repository) { ··· 290 296 $description = new PHUIRemarkupView($viewer, $description); 291 297 $view->addTextContent($description); 292 298 return id(new PHUIObjectBoxView()) 293 - ->setHeaderText(pht('Description')) 294 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 295 - ->appendChild($view); 299 + ->appendChild($view) 300 + ->addClass('diffusion-profile-description'); 296 301 } 297 302 return null; 298 303 } ··· 455 460 id(new AphrontFormTypeaheadControl()) 456 461 ->setHardpointID('locate-control') 457 462 ->setID('locate-input') 458 - ->setLabel(pht('Locate File'))); 463 + ->setPlaceholder(pht('Locate File'))); 459 464 $form_box = id(new PHUIBoxView()) 460 - ->appendChild($form->buildLayoutView()); 461 - $locate_panel = id(new PHUIObjectBoxView()) 462 - ->setHeaderText(pht('Locate File')) 463 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 464 - ->appendChild($form_box); 465 + ->appendChild($form->buildLayoutView()) 466 + ->addClass('diffusion-profile-locate'); 465 467 } 466 - return $locate_panel; 468 + return $form_box; 467 469 } 468 470 469 471 private function buildBrowseTable(
+1 -1
src/applications/diffusion/view/DiffusionBranchListView.php
··· 23 23 $repository = $drequest->getRepository(); 24 24 $commits = $this->commits; 25 25 $viewer = $this->getUser(); 26 - require_celerity_resource('diffusion-history-css'); 26 + require_celerity_resource('diffusion-css'); 27 27 28 28 $buildables = $this->loadBuildables($commits); 29 29 $have_builds = false;
+1 -1
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 20 20 public function render() { 21 21 $request = $this->getDiffusionRequest(); 22 22 $repository = $request->getRepository(); 23 - require_celerity_resource('diffusion-history-css'); 23 + require_celerity_resource('diffusion-css'); 24 24 25 25 $base_path = trim($request->getPath(), '/'); 26 26 if ($base_path) {
+1 -1
src/applications/diffusion/view/DiffusionCommitListView.php
··· 73 73 } 74 74 75 75 public function render() { 76 - require_celerity_resource('diffusion-history-css'); 76 + require_celerity_resource('diffusion-css'); 77 77 return $this->buildList(); 78 78 } 79 79
+1 -1
src/applications/diffusion/view/DiffusionHistoryListView.php
··· 7 7 $viewer = $this->getUser(); 8 8 $repository = $drequest->getRepository(); 9 9 10 - require_celerity_resource('diffusion-history-css'); 10 + require_celerity_resource('diffusion-css'); 11 11 Javelin::initBehavior('phabricator-tooltips'); 12 12 13 13 $buildables = $this->loadBuildables(
+1 -1
src/applications/diffusion/view/DiffusionTagListView.php
··· 29 29 $drequest = $this->getDiffusionRequest(); 30 30 $repository = $drequest->getRepository(); 31 31 $viewer = $this->getViewer(); 32 - require_celerity_resource('diffusion-history-css'); 32 + require_celerity_resource('diffusion-css'); 33 33 34 34 $buildables = $this->loadBuildables($this->commits); 35 35
+7
src/view/form/control/AphrontFormTypeaheadControl.php
··· 3 3 final class AphrontFormTypeaheadControl extends AphrontFormControl { 4 4 5 5 private $hardpointID; 6 + private $placeholder; 6 7 7 8 public function setHardpointID($hardpoint_id) { 8 9 $this->hardpointID = $hardpoint_id; ··· 11 12 12 13 public function getHardpointID() { 13 14 return $this->hardpointID; 15 + } 16 + 17 + public function setPlaceholder($placeholder) { 18 + $this->placeholder = $placeholder; 19 + return $this; 14 20 } 15 21 16 22 protected function getCustomControlClass() { ··· 30 36 'type' => 'text', 31 37 'name' => $this->getName(), 32 38 'value' => $this->getValue(), 39 + 'placeholder' => $this->placeholder, 33 40 'disabled' => $this->getDisabled() ? 'disabled' : null, 34 41 'autocomplete' => 'off', 35 42 'id' => $this->getID(),
+38 -1
webroot/rsrc/css/application/diffusion/diffusion-history.css webroot/rsrc/css/application/diffusion/diffusion.css
··· 1 1 /** 2 - * @provides diffusion-history-css 2 + * @provides diffusion-css 3 3 */ 4 + 5 + /* - Home Styles ------------------------------------------------------------*/ 6 + 7 + .diffusion-profile-header.phui-profile-header .phui-header-col3 { 8 + vertical-align: middle; 9 + } 10 + 11 + .diffusion-profile-header .phui-header-action-links a.button { 12 + display: block; 13 + } 14 + 15 + .diffusion-profile-locate .phui-form-view { 16 + margin: 0 0 16px 0; 17 + padding: 0; 18 + } 19 + 20 + .diffusion-profile-locate .phui-form-view .aphront-form-control { 21 + padding: 0; 22 + } 23 + 24 + .diffusion-profile-locate .phui-form-view .aphront-form-input { 25 + margin: 0; 26 + width: 480px; 27 + } 28 + 29 + .device .diffusion-profile-locate .phui-form-view .aphront-form-input { 30 + margin: 0; 31 + width: 100%; 32 + } 33 + 34 + .diffusion-profile-description.phui-object-box { 35 + padding: 0; 36 + } 37 + 38 + .device-phone .diffusion-profile-description.phui-object-box { 39 + padding: 0; 40 + } 4 41 5 42 /* - List Styles ------------------------------------------------------------*/ 6 43