diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 939b48a643..4dc65888b9 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -71,11 +71,11 @@ return array( 'rsrc/css/application/differential/revision-history.css' => '0e8eb855', 'rsrc/css/application/differential/revision-list.css' => 'f3c47d33', 'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55', - 'rsrc/css/application/diffusion/diffusion-history.css' => '898ed727', 'rsrc/css/application/diffusion/diffusion-icons.css' => '0c15255e', 'rsrc/css/application/diffusion/diffusion-readme.css' => '419dd5b6', 'rsrc/css/application/diffusion/diffusion-repository.css' => 'ee6f20ec', 'rsrc/css/application/diffusion/diffusion-source.css' => '750add59', + 'rsrc/css/application/diffusion/diffusion.css' => '08991f7e', 'rsrc/css/application/feed/feed.css' => 'ecd4ec57', 'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2', 'rsrc/css/application/flag/flag.css' => 'bba8f811', @@ -570,7 +570,7 @@ return array( 'differential-revision-history-css' => '0e8eb855', 'differential-revision-list-css' => 'f3c47d33', 'differential-table-of-contents-css' => 'ae4b7a55', - 'diffusion-history-css' => '898ed727', + 'diffusion-css' => '08991f7e', 'diffusion-icons-css' => '0c15255e', 'diffusion-readme-css' => '419dd5b6', 'diffusion-repository-css' => 'ee6f20ec', diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php index d8451db2db..1db5716f6c 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -17,6 +17,8 @@ final class DiffusionRepositoryController extends DiffusionController { return $response; } + require_celerity_resource('diffusion-css'); + $viewer = $this->getViewer(); $drequest = $this->getDiffusionRequest(); $repository = $drequest->getRepository(); @@ -25,11 +27,13 @@ final class DiffusionRepositoryController extends DiffusionController { $crumbs->setBorder(true); $header = $this->buildHeaderView($repository); - $curtain = $this->buildCurtain($repository); $property_table = $this->buildPropertiesTable($repository); + $actions = $this->buildActionList($repository); $description = $this->buildDescriptionView($repository); $locate_file = $this->buildLocateFile(); + $header->setActionList($actions); + // Before we do any work, make sure we're looking at a some content: we're // on a valid branch, and the repository is not empty. $page_has_content = false; @@ -88,14 +92,13 @@ final class DiffusionRepositoryController extends DiffusionController { $view = id(new PHUITwoColumnView()) ->setHeader($header) - ->setCurtain($curtain) ->setTabs($tabs) - ->setMainColumn(array( + ->setFooter(array( + $locate_file, $property_table, $description, - $locate_file, - )) - ->setFooter($content); + $content, + )); return $this->newPage() ->setTitle( @@ -236,7 +239,8 @@ final class DiffusionRepositoryController extends DiffusionController { ->setPolicyObject($repository) ->setProfileHeader(true) ->setImage($repository->getProfileImageURI()) - ->setImageEditURL('/diffusion/picture/'.$repository->getID().'/'); + ->setImageEditURL('/diffusion/picture/'.$repository->getID().'/') + ->addClass('diffusion-profile-header'); if (!$repository->isTracked()) { $header->setStatus('fa-ban', 'dark', pht('Inactive')); @@ -254,13 +258,15 @@ final class DiffusionRepositoryController extends DiffusionController { return $header; } - private function buildCurtain(PhabricatorRepository $repository) { + private function buildActionList(PhabricatorRepository $repository) { $viewer = $this->getViewer(); $edit_uri = $repository->getPathURI('manage/'); - $curtain = $this->newCurtainView($repository); + $action_view = id(new PhabricatorActionListView()) + ->setUser($viewer) + ->setObject($repository); - $curtain->addAction( + $action_view->addAction( id(new PhabricatorActionView()) ->setName(pht('Manage Repository')) ->setIcon('fa-cogs') @@ -270,14 +276,14 @@ final class DiffusionRepositoryController extends DiffusionController { $push_uri = $this->getApplicationURI( 'pushlog/?repositories='.$repository->getMonogram()); - $curtain->addAction( + $action_view->addAction( id(new PhabricatorActionView()) ->setName(pht('View Push Logs')) ->setIcon('fa-list-alt') ->setHref($push_uri)); } - return $curtain; + return $action_view; } private function buildDescriptionView(PhabricatorRepository $repository) { @@ -290,9 +296,8 @@ final class DiffusionRepositoryController extends DiffusionController { $description = new PHUIRemarkupView($viewer, $description); $view->addTextContent($description); return id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Description')) - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) - ->appendChild($view); + ->appendChild($view) + ->addClass('diffusion-profile-description'); } return null; } @@ -455,15 +460,12 @@ final class DiffusionRepositoryController extends DiffusionController { id(new AphrontFormTypeaheadControl()) ->setHardpointID('locate-control') ->setID('locate-input') - ->setLabel(pht('Locate File'))); + ->setPlaceholder(pht('Locate File'))); $form_box = id(new PHUIBoxView()) - ->appendChild($form->buildLayoutView()); - $locate_panel = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Locate File')) - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) - ->appendChild($form_box); + ->appendChild($form->buildLayoutView()) + ->addClass('diffusion-profile-locate'); } - return $locate_panel; + return $form_box; } private function buildBrowseTable( diff --git a/src/applications/diffusion/view/DiffusionBranchListView.php b/src/applications/diffusion/view/DiffusionBranchListView.php index 8d1df82dc9..1a9df42e05 100644 --- a/src/applications/diffusion/view/DiffusionBranchListView.php +++ b/src/applications/diffusion/view/DiffusionBranchListView.php @@ -23,7 +23,7 @@ final class DiffusionBranchListView extends DiffusionView { $repository = $drequest->getRepository(); $commits = $this->commits; $viewer = $this->getUser(); - require_celerity_resource('diffusion-history-css'); + require_celerity_resource('diffusion-css'); $buildables = $this->loadBuildables($commits); $have_builds = false; diff --git a/src/applications/diffusion/view/DiffusionBrowseTableView.php b/src/applications/diffusion/view/DiffusionBrowseTableView.php index bd53cf97a1..48729d0669 100644 --- a/src/applications/diffusion/view/DiffusionBrowseTableView.php +++ b/src/applications/diffusion/view/DiffusionBrowseTableView.php @@ -20,7 +20,7 @@ final class DiffusionBrowseTableView extends DiffusionView { public function render() { $request = $this->getDiffusionRequest(); $repository = $request->getRepository(); - require_celerity_resource('diffusion-history-css'); + require_celerity_resource('diffusion-css'); $base_path = trim($request->getPath(), '/'); if ($base_path) { diff --git a/src/applications/diffusion/view/DiffusionCommitListView.php b/src/applications/diffusion/view/DiffusionCommitListView.php index 4d4bcc1020..d4f20d0014 100644 --- a/src/applications/diffusion/view/DiffusionCommitListView.php +++ b/src/applications/diffusion/view/DiffusionCommitListView.php @@ -73,7 +73,7 @@ final class DiffusionCommitListView extends AphrontView { } public function render() { - require_celerity_resource('diffusion-history-css'); + require_celerity_resource('diffusion-css'); return $this->buildList(); } diff --git a/src/applications/diffusion/view/DiffusionHistoryListView.php b/src/applications/diffusion/view/DiffusionHistoryListView.php index 9dfa46cbef..8f9301c53a 100644 --- a/src/applications/diffusion/view/DiffusionHistoryListView.php +++ b/src/applications/diffusion/view/DiffusionHistoryListView.php @@ -7,7 +7,7 @@ final class DiffusionHistoryListView extends DiffusionHistoryView { $viewer = $this->getUser(); $repository = $drequest->getRepository(); - require_celerity_resource('diffusion-history-css'); + require_celerity_resource('diffusion-css'); Javelin::initBehavior('phabricator-tooltips'); $buildables = $this->loadBuildables( diff --git a/src/applications/diffusion/view/DiffusionTagListView.php b/src/applications/diffusion/view/DiffusionTagListView.php index f9030581e3..abab9003c3 100644 --- a/src/applications/diffusion/view/DiffusionTagListView.php +++ b/src/applications/diffusion/view/DiffusionTagListView.php @@ -29,7 +29,7 @@ final class DiffusionTagListView extends DiffusionView { $drequest = $this->getDiffusionRequest(); $repository = $drequest->getRepository(); $viewer = $this->getViewer(); - require_celerity_resource('diffusion-history-css'); + require_celerity_resource('diffusion-css'); $buildables = $this->loadBuildables($this->commits); diff --git a/src/view/form/control/AphrontFormTypeaheadControl.php b/src/view/form/control/AphrontFormTypeaheadControl.php index e4bee7c1ca..1e859ee132 100644 --- a/src/view/form/control/AphrontFormTypeaheadControl.php +++ b/src/view/form/control/AphrontFormTypeaheadControl.php @@ -3,6 +3,7 @@ final class AphrontFormTypeaheadControl extends AphrontFormControl { private $hardpointID; + private $placeholder; public function setHardpointID($hardpoint_id) { $this->hardpointID = $hardpoint_id; @@ -13,6 +14,11 @@ final class AphrontFormTypeaheadControl extends AphrontFormControl { return $this->hardpointID; } + public function setPlaceholder($placeholder) { + $this->placeholder = $placeholder; + return $this; + } + protected function getCustomControlClass() { return 'aphront-form-control-typeahead'; } @@ -30,6 +36,7 @@ final class AphrontFormTypeaheadControl extends AphrontFormControl { 'type' => 'text', 'name' => $this->getName(), 'value' => $this->getValue(), + 'placeholder' => $this->placeholder, 'disabled' => $this->getDisabled() ? 'disabled' : null, 'autocomplete' => 'off', 'id' => $this->getID(), diff --git a/webroot/rsrc/css/application/diffusion/diffusion-history.css b/webroot/rsrc/css/application/diffusion/diffusion.css similarity index 74% rename from webroot/rsrc/css/application/diffusion/diffusion-history.css rename to webroot/rsrc/css/application/diffusion/diffusion.css index 7339d05ac1..599f229152 100644 --- a/webroot/rsrc/css/application/diffusion/diffusion-history.css +++ b/webroot/rsrc/css/application/diffusion/diffusion.css @@ -1,7 +1,44 @@ /** - * @provides diffusion-history-css + * @provides diffusion-css */ +/* - Home Styles ------------------------------------------------------------*/ + +.diffusion-profile-header.phui-profile-header .phui-header-col3 { + vertical-align: middle; +} + +.diffusion-profile-header .phui-header-action-links a.button { + display: block; +} + +.diffusion-profile-locate .phui-form-view { + margin: 0 0 16px 0; + padding: 0; +} + +.diffusion-profile-locate .phui-form-view .aphront-form-control { + padding: 0; +} + +.diffusion-profile-locate .phui-form-view .aphront-form-input { + margin: 0; + width: 480px; +} + +.device .diffusion-profile-locate .phui-form-view .aphront-form-input { + margin: 0; + width: 100%; +} + +.diffusion-profile-description.phui-object-box { + padding: 0; +} + +.device-phone .diffusion-profile-description.phui-object-box { + padding: 0; +} + /* - List Styles ------------------------------------------------------------*/ .diffusion-history-list .phui-oi-link {