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

Remove pro-white-background, re-style PHUIDocumentViewPro

Summary: This makes document views a little more automatic, and a little more style to the page. The Document itself remains on a pure white centered background, but footer and preceeding objects go back to the original body color. This provides a bit more depth and separation over content and definitions/comments.

Test Plan:
Tested Phriction, Diviner, Legalpad, Phame, Email Commands, HTTP Commands, with and without a footer.

{F1005853}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+49 -69
+7 -7
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '91bbffc2', 10 + 'core.pkg.css' => 'ef642419', 11 11 'core.pkg.js' => '47dc9ebb', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 36 36 'rsrc/css/application/base/notification-menu.css' => 'f31c0bde', 37 37 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', 38 38 'rsrc/css/application/base/phui-theme.css' => '6b451f24', 39 - 'rsrc/css/application/base/standard-page-view.css' => 'a1096ed4', 39 + 'rsrc/css/application/base/standard-page-view.css' => '3c99cdf4', 40 40 'rsrc/css/application/calendar/calendar-icon.css' => 'c69aa59f', 41 41 'rsrc/css/application/chatlog/chatlog.css' => 'd295b020', 42 42 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', ··· 103 103 'rsrc/css/application/slowvote/slowvote.css' => 'da0afb1b', 104 104 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 105 105 'rsrc/css/application/uiexample/example.css' => '528b19de', 106 - 'rsrc/css/core/core.css' => '78e8d7ea', 106 + 'rsrc/css/core/core.css' => 'a76cefc9', 107 107 'rsrc/css/core/remarkup.css' => '88e1ebb6', 108 108 'rsrc/css/core/syntax.css' => '9fd11da8', 109 109 'rsrc/css/core/z-index.css' => '57ddcaa2', ··· 126 126 'rsrc/css/phui/phui-box.css' => 'a5bb366d', 127 127 'rsrc/css/phui/phui-button.css' => '16020a60', 128 128 'rsrc/css/phui/phui-crumbs-view.css' => '414406b5', 129 - 'rsrc/css/phui/phui-document-pro.css' => '5f75ed99', 129 + 'rsrc/css/phui/phui-document-pro.css' => 'e0fad431', 130 130 'rsrc/css/phui/phui-document.css' => 'a4a1c3b9', 131 131 'rsrc/css/phui/phui-feed-story.css' => 'b7b26d23', 132 132 'rsrc/css/phui/phui-fontkit.css' => '9cda225e', ··· 727 727 'phabricator-busy' => '59a7976a', 728 728 'phabricator-chatlog-css' => 'd295b020', 729 729 'phabricator-content-source-view-css' => '4b8b05d4', 730 - 'phabricator-core-css' => '78e8d7ea', 730 + 'phabricator-core-css' => 'a76cefc9', 731 731 'phabricator-countdown-css' => 'e7544472', 732 732 'phabricator-dashboard-css' => 'eb458607', 733 733 'phabricator-drag-and-drop-file-upload' => 'ad10aeac', ··· 755 755 'phabricator-side-menu-view-css' => 'bec2458e', 756 756 'phabricator-slowvote-css' => 'da0afb1b', 757 757 'phabricator-source-code-view-css' => 'cbeef983', 758 - 'phabricator-standard-page-view' => 'a1096ed4', 758 + 'phabricator-standard-page-view' => '3c99cdf4', 759 759 'phabricator-textareautils' => '5c93c52c', 760 760 'phabricator-title' => 'df5e11d2', 761 761 'phabricator-tooltip' => '1d298e3a', ··· 790 790 'phui-calendar-month-css' => '476be7e0', 791 791 'phui-crumbs-view-css' => '414406b5', 792 792 'phui-document-view-css' => 'a4a1c3b9', 793 - 'phui-document-view-pro-css' => '5f75ed99', 793 + 'phui-document-view-pro-css' => 'e0fad431', 794 794 'phui-feed-story-css' => 'b7b26d23', 795 795 'phui-font-icon-base-css' => 'ecbbb4c2', 796 796 'phui-fontkit-css' => '9cda225e',
+2 -3
src/applications/diviner/controller/DivinerAtomController.php
··· 75 75 $document = id(new PHUIDocumentViewPro()) 76 76 ->setBook($book->getTitle(), $group_name) 77 77 ->setHeader($header) 78 - ->addClass('diviner-view') 79 - ->setPropertyList($prop_list); 78 + ->addClass('diviner-view'); 80 79 81 80 if ($atom) { 82 81 $this->buildDefined($properties, $symbol); ··· 243 242 array( 244 243 $crumbs, 245 244 $document, 245 + $prop_list, 246 246 ), 247 247 array( 248 248 'title' => $symbol->getTitle(), 249 - 'class' => 'pro-white-background', 250 249 )); 251 250 } 252 251
-1
src/applications/diviner/controller/DivinerBookController.php
··· 111 111 ), 112 112 array( 113 113 'title' => $book->getTitle(), 114 - 'class' => 'pro-white-background', 115 114 )); 116 115 } 117 116
-1
src/applications/diviner/controller/DivinerMainController.php
··· 79 79 ), 80 80 array( 81 81 'title' => pht('Documentation Books'), 82 - 'class' => 'pro-white-background', 83 82 )); 84 83 } 85 84 }
-1
src/applications/legalpad/controller/LegalpadDocumentSignController.php
··· 331 331 ), 332 332 array( 333 333 'title' => $title, 334 - 'class' => 'pro-white-background', 335 334 'pageObjects' => array($document->getPHID()), 336 335 )); 337 336 }
-1
src/applications/meta/controller/PhabricatorApplicationEmailCommandsController.php
··· 147 147 ), 148 148 array( 149 149 'title' => $title, 150 - 'class' => 'pro-white-background', 151 150 )); 152 151 153 152 }
+4 -10
src/applications/phame/controller/post/PhamePostViewController.php
··· 49 49 ->addActionLink($action_button); 50 50 51 51 $document = id(new PHUIDocumentViewPro()) 52 - ->setHeader($header) 53 - ->setPropertyList($properties); 52 + ->setHeader($header); 54 53 55 54 if ($post->isDraft()) { 56 55 $document->appendChild( ··· 94 93 $timeline = phutil_tag_div('phui-document-view-pro-box', $timeline); 95 94 96 95 $add_comment = $this->buildCommentForm($post); 96 + $add_comment = phutil_tag_div('mlb mlt', $add_comment); 97 97 98 98 return $this->newPage() 99 99 ->setTitle($post->getTitle()) 100 - ->addClass('pro-white-background') 101 100 ->setPageObjectPHIDs(array($post->getPHID())) 102 101 ->setCrumbs($crumbs) 103 102 ->appendChild( 104 103 array( 105 104 $document, 105 + $properties, 106 106 $timeline, 107 107 $add_comment, 108 108 )); ··· 209 209 private function buildCommentForm(PhamePost $post) { 210 210 $viewer = $this->getViewer(); 211 211 212 - $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); 213 - 214 - $add_comment_header = $is_serious 215 - ? pht('Add Comment') 216 - : pht('Derp Text'); 217 - 218 212 $draft = PhabricatorDraft::newFromUserAndKey( 219 213 $viewer, $post->getPHID()); 220 214 ··· 222 216 ->setUser($viewer) 223 217 ->setObjectPHID($post->getPHID()) 224 218 ->setDraft($draft) 225 - ->setHeaderText($add_comment_header) 219 + ->setHeaderText(pht('Add Comment')) 226 220 ->setAction($this->getApplicationURI('post/comment/'.$post->getID().'/')) 227 221 ->setSubmitButtonName(pht('Add Comment')); 228 222
+1 -2
src/applications/phriction/controller/PhrictionDocumentController.php
··· 216 216 217 217 $page_content = id(new PHUIDocumentViewPro()) 218 218 ->setHeader($header) 219 - ->setPropertyList($prop_list) 220 219 ->setToc($toc) 221 220 ->appendChild( 222 221 array( ··· 229 228 array( 230 229 $crumbs->render(), 231 230 $page_content, 231 + $prop_list, 232 232 $children, 233 233 ), 234 234 array( 235 235 'pageObjects' => array($document->getPHID()), 236 236 'title' => $page_title, 237 - 'class' => 'pro-white-background', 238 237 )); 239 238 240 239 }
-1
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 860 860 return $controller->newPage() 861 861 ->setTitle(pht('HTTP Parameters')) 862 862 ->setCrumbs($crumbs) 863 - ->addClass('pro-white-background') 864 863 ->appendChild($document); 865 864 } 866 865
+8 -19
src/view/phui/PHUIDocumentViewPro.php
··· 6 6 private $bookname; 7 7 private $bookdescription; 8 8 private $fluid; 9 - private $propertyList; 10 9 private $toc; 11 10 12 11 public function setHeader(PHUIHeaderView $header) { ··· 26 25 return $this; 27 26 } 28 27 29 - public function setPropertyList($view) { 30 - $this->propertyList = $view; 31 - return $this; 32 - } 33 - 34 28 public function setToc($toc) { 35 29 $this->toc = $toc; 36 30 return $this; ··· 39 33 protected function getTagAttributes() { 40 34 $classes = array(); 41 35 36 + $classes[] = 'phui-document-container'; 42 37 if ($this->fluid) { 43 38 $classes[] = 'phui-document-fluid'; 44 39 } 45 40 46 41 return array( 47 - 'class' => $classes, 42 + 'class' => implode(' ', $classes), 48 43 ); 49 44 } 50 45 ··· 118 113 ), 119 114 $content_inner); 120 115 121 - $view = phutil_tag( 122 - 'div', 123 - array( 124 - 'class' => implode(' ', $classes), 125 - ), 126 - $content); 127 - 128 - $list = null; 129 - if ($this->propertyList) { 130 - $list = phutil_tag_div('phui-document-properties', $this->propertyList); 131 - } 116 + return phutil_tag( 117 + 'div', 118 + array( 119 + 'class' => implode(' ', $classes), 120 + ), 121 + $content); 132 122 133 - return array($view, $list); 134 123 } 135 124 136 125 }
+2 -2
webroot/rsrc/css/application/base/standard-page-view.css
··· 19 19 20 20 .phabricator-standard-page-footer { 21 21 text-align: right; 22 - margin: 4px 16px; 22 + margin: 32px 16px 16px; 23 23 padding: 12px 0; 24 - border-top: 1px solid {$lightgreyborder}; 24 + border-top: 1px solid rgba(71, 87, 120, 0.20); 25 25 color: {$greytext}; 26 26 } 27 27
-4
webroot/rsrc/css/core/core.css
··· 173 173 height: 2px; 174 174 background: {$sky}; 175 175 } 176 - 177 - html body.pro-white-background { 178 - background-color: white; 179 - }
+25 -17
webroot/rsrc/css/phui/phui-document-pro.css
··· 2 2 * @provides phui-document-view-pro-css 3 3 */ 4 4 5 - .phui-document-view.phui-document-view-pro, 5 + .phui-document-view.phui-document-view-pro { 6 + max-width: 800px; 7 + padding: 16px 16px 64px 16px; 8 + margin: 0 auto; 9 + } 10 + 11 + .phui-document-container { 12 + background-color: #fff; 13 + position: relative; 14 + border-bottom: 1px solid #dedee1; 15 + } 16 + 6 17 .phui-document-view-pro-box, 7 18 .phui-document-properties { 8 19 max-width: 800px; 9 - padding: 0 16px; 10 - position: relative; 11 - margin: 16px auto; 20 + margin: 0 auto; 12 21 } 13 22 14 - .phui-document-properties { 15 - max-width: 768px; 16 - background-color: {$lightgreybackground}; 23 + .phui-property-list-section { 24 + max-width: 800px; 17 25 margin: 16px auto; 18 - border-radius: 3px; 19 26 } 20 27 21 - .device .phui-document-properties { 28 + .device .phui-property-list-section { 22 29 margin: 0 8px 16px; 23 30 } 24 31 ··· 29 36 30 37 .phui-document-view-pro .phui-document-toc { 31 38 position: absolute; 32 - top: 18px; 39 + top: 34px; 33 40 left: -36px; 34 41 } 35 42 ··· 49 56 position: absolute; 50 57 z-index: 30; 51 58 background-color: #fff; 52 - top: 38px; 59 + top: 52px; 53 60 left: -44px; 54 61 } 55 62 ··· 131 138 132 139 133 140 .phui-document-view-pro-box .phui-timeline-view { 134 - padding: 0; 141 + padding: 16px 0 0 0; 135 142 background: none; 143 + border-top: 1px solid rgba(71, 87, 120, 0.20); 136 144 } 137 145 138 146 .phui-document-view-pro-box .phui-timeline-image { ··· 157 165 } 158 166 159 167 .phui-document-view-pro-box .phui-timeline-title { 160 - border-radius: 3px; 161 - background-color: {$lightgreybackground}; 168 + border-top-right-radius: 3px; 169 + border-top-left-radius: 3px; 170 + background-color: #fff; 171 + border-bottom: 1px solid #F1F1F4; 162 172 } 163 173 164 174 .phui-document-view-pro-box .phui-timeline-title-with-icon { ··· 171 181 172 182 .phui-document-view-pro-box .phui-timeline-major-event .phui-timeline-content 173 183 .phui-timeline-core-content { 174 - padding-bottom: 24px; 184 + 175 185 } 176 186 177 187 .phui-document-view-pro-box .phui-object-box { 178 - background-color: {$lightgreybackground}; 179 - border: none; 180 188 margin: 0; 181 189 } 182 190