From 023cfbb23af36b7f15be86a1f5950b62d68b246d Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 22 Feb 2016 11:48:44 -0800 Subject: [PATCH] Restrict PropertyListView width to just DocumentProView Summary: Fixes T10409. Long term need to build a proper "PageEngine" of sorts for layouts not needing special magic. For now this just affects a few applications. Test Plan: View Diffusion, Phriction, Phame, Legalpad, Diviner. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T10409 Differential Revision: https://secure.phabricator.com/D15328 --- resources/celerity/map.php | 8 ++++---- .../diviner/controller/DivinerAtomController.php | 2 ++ .../controller/post/PhamePostViewController.php | 1 + .../controller/PhrictionDocumentController.php | 1 + webroot/rsrc/css/application/phame/phame.css | 3 +-- webroot/rsrc/css/phui/phui-document-pro.css | 13 ++++++++++--- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index b632ba7d1e..7e039dde0c 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -81,7 +81,7 @@ return array( 'rsrc/css/application/owners/owners-path-editor.css' => '2f00933b', 'rsrc/css/application/paste/paste.css' => 'a5157c48', 'rsrc/css/application/people/people-profile.css' => '2473d929', - 'rsrc/css/application/phame/phame.css' => '4ca6fd6c', + 'rsrc/css/application/phame/phame.css' => '737792d6', 'rsrc/css/application/pholio/pholio-edit.css' => '3ad9d1ee', 'rsrc/css/application/pholio/pholio-inline-comments.css' => '8e545e49', 'rsrc/css/application/pholio/pholio.css' => 'ca89d380', @@ -127,7 +127,7 @@ return array( 'rsrc/css/phui/phui-button.css' => 'edf464e9', 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 'rsrc/css/phui/phui-crumbs-view.css' => '79d536e5', - 'rsrc/css/phui/phui-document-pro.css' => 'a8872307', + 'rsrc/css/phui/phui-document-pro.css' => '92d5b648', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', 'rsrc/css/phui/phui-document.css' => '9c71d2bf', 'rsrc/css/phui/phui-feed-story.css' => '04aec08f', @@ -790,7 +790,7 @@ return array( 'phabricator-uiexample-reactor-sendclass' => '1def2711', 'phabricator-uiexample-reactor-sendproperties' => 'b1f0ccee', 'phabricator-zindex-css' => '5b6fcf3f', - 'phame-css' => '4ca6fd6c', + 'phame-css' => '737792d6', 'pholio-css' => 'ca89d380', 'pholio-edit-css' => '3ad9d1ee', 'pholio-inline-comments-css' => '8e545e49', @@ -812,7 +812,7 @@ return array( 'phui-crumbs-view-css' => '79d536e5', 'phui-document-summary-view-css' => '9ca48bdf', 'phui-document-view-css' => '9c71d2bf', - 'phui-document-view-pro-css' => 'a8872307', + 'phui-document-view-pro-css' => '92d5b648', 'phui-feed-story-css' => '04aec08f', 'phui-font-icon-base-css' => 'ecbbb4c2', 'phui-fontkit-css' => '9cda225e', diff --git a/src/applications/diviner/controller/DivinerAtomController.php b/src/applications/diviner/controller/DivinerAtomController.php index 46506ff317..1785ae6741 100644 --- a/src/applications/diviner/controller/DivinerAtomController.php +++ b/src/applications/diviner/controller/DivinerAtomController.php @@ -238,6 +238,8 @@ final class DivinerAtomController extends DivinerController { $document->setToc($side); } + $prop_list = phutil_tag_div('phui-document-view-pro-box', $prop_list); + return $this->buildApplicationPage( array( $crumbs, diff --git a/src/applications/phame/controller/post/PhamePostViewController.php b/src/applications/phame/controller/post/PhamePostViewController.php index a4231cc1ac..5579e82656 100644 --- a/src/applications/phame/controller/post/PhamePostViewController.php +++ b/src/applications/phame/controller/post/PhamePostViewController.php @@ -136,6 +136,7 @@ final class PhamePostViewController $document->setFoot($next_view); $crumbs = $this->buildApplicationCrumbs(); + $properties = phutil_tag_div('phui-document-view-pro-box', $properties); $page = $this->newPage() ->setTitle($post->getTitle()) diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php index 7dae0fad03..360c0fbf3f 100644 --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -218,6 +218,7 @@ final class PhrictionDocumentController $prop_list = new PHUIPropertyGroupView(); $prop_list->addPropertyList($properties); } + $prop_list = phutil_tag_div('phui-document-view-pro-box', $prop_list); $page_content = id(new PHUIDocumentViewPro()) ->setHeader($header) diff --git a/webroot/rsrc/css/application/phame/phame.css b/webroot/rsrc/css/application/phame/phame.css index 299474fee1..d4fdeafff0 100644 --- a/webroot/rsrc/css/application/phame/phame.css +++ b/webroot/rsrc/css/application/phame/phame.css @@ -30,9 +30,8 @@ position: absolute; } -.phame-blog-description + .phui-property-list-section { +.phame-blog-description + .phui-document-view-pro-box { border-top: 1px solid rgba({$alphablue}, 0.20); - padding-top: 16px; } .phame-home-view .phui-document-view.phui-document-view-pro { diff --git a/webroot/rsrc/css/phui/phui-document-pro.css b/webroot/rsrc/css/phui/phui-document-pro.css index 138eec0955..c77ffa77e2 100644 --- a/webroot/rsrc/css/phui/phui-document-pro.css +++ b/webroot/rsrc/css/phui/phui-document-pro.css @@ -20,15 +20,22 @@ margin: 0 auto; } -.phui-property-list-section { - max-width: 800px; +.device .phui-document-view-pro-box { + margin: 0 8px; +} + +.phui-document-view-pro-box .phui-property-list-section { margin: 16px auto; } -.device .phui-property-list-section { +.device .phui-document-view-pro-box .phui-property-list-section { margin: 0 8px 16px; } +.device .phui-document-view-pro-box .phui-property-list-container { + padding: 24px 0 0 0; +} + .device-phone .phui-document-view.phui-document-view-pro { padding: 0 8px; margin: 0 auto;