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

Update Phabricator logo

Summary:
This updates the eye logo and removes the formal wordmark "Phabricator" as an image. Instead we'll use the new updated eye logo and plain text for "Phabricator", both of which are more friendly and less industrial.

Installs that already use the `header-logo` customization setting will need to rebuild their logo to 80px x 80px. They will then also get to use plain text to whitebox their install as they see fit.

Test Plan:
Tested new logo at desktop, tablet, and mobile sizes. Set a random instance name, saw new wordmark. Created a really long wordmark of MMMMMMMMMMMM, saw text cut off so UI doesn't break. May need some additional tweaking, but I think we covered the most edge cases here.

{F1751791, size=full}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: edibiase, bjshively, yelirekim, Korvin

Maniphest Tasks: T4214, T11096

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

+56 -160
+7 -11
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '90c46327', 10 + 'core.pkg.css' => 'f12c7d47', 11 11 'core.pkg.js' => 'b562c3db', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '3fb7f532', ··· 32 32 'rsrc/css/aphront/typeahead.css' => 'd4f16145', 33 33 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 34 34 'rsrc/css/application/auth/auth.css' => '0877ed6e', 35 - 'rsrc/css/application/base/main-menu-view.css' => 'b623169f', 35 + 'rsrc/css/application/base/main-menu-view.css' => 'a79b6e52', 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' => '027ba77e', ··· 163 163 'rsrc/css/phui/workboards/phui-workcard.css' => '0c62d7c5', 164 164 'rsrc/css/phui/workboards/phui-workpanel.css' => '92197373', 165 165 'rsrc/css/sprite-login.css' => '60e8560e', 166 - 'rsrc/css/sprite-menu.css' => '9dd65b92', 167 166 'rsrc/css/sprite-tokens.css' => '9cdfd599', 168 167 'rsrc/css/syntax/syntax-default.css' => '9923583c', 169 168 'rsrc/externals/d3/d3.min.js' => 'a11a5ff2', ··· 320 319 'rsrc/image/icon/tango/upload.png' => '7bbb7984', 321 320 'rsrc/image/icon/unsubscribe.png' => '25725013', 322 321 'rsrc/image/lightblue-header.png' => '5c168b6d', 322 + 'rsrc/image/logo/light-eye.png' => 'fcd66408', 323 323 'rsrc/image/main_texture.png' => '29a2c5ad', 324 324 'rsrc/image/menu_texture.png' => '5a17580d', 325 325 'rsrc/image/people/harding.png' => '45aa614e', ··· 343 343 'rsrc/image/resize.png' => 'fd476de4', 344 344 'rsrc/image/sprite-login-X2.png' => 'e3991e37', 345 345 'rsrc/image/sprite-login.png' => '03d5af29', 346 - 'rsrc/image/sprite-menu-X2.png' => 'cfd8fca5', 347 - 'rsrc/image/sprite-menu.png' => 'd7a99faa', 348 346 'rsrc/image/sprite-tokens-X2.png' => '804a5232', 349 347 'rsrc/image/sprite-tokens.png' => 'b41d03da', 350 348 'rsrc/image/texture/card-gradient.png' => '815f26e8', ··· 785 783 'phabricator-flag-css' => '5337623f', 786 784 'phabricator-keyboard-shortcut' => '1ae869f2', 787 785 'phabricator-keyboard-shortcut-manager' => '4a021c10', 788 - 'phabricator-main-menu-view' => 'b623169f', 786 + 'phabricator-main-menu-view' => 'a79b6e52', 789 787 'phabricator-nav-view-css' => '09f3d0db', 790 788 'phabricator-notification' => 'ccf1cbf8', 791 789 'phabricator-notification-css' => '3f6c89c9', ··· 891 889 'releeph-request-typeahead-css' => '667a48ae', 892 890 'setup-issue-css' => 'db7e9c40', 893 891 'sprite-login-css' => '60e8560e', 894 - 'sprite-menu-css' => '9dd65b92', 895 892 'sprite-tokens-css' => '9cdfd599', 896 893 'syntax-default-css' => '9923583c', 897 894 'syntax-highlighting-css' => '769d3498', ··· 1724 1721 'javelin-stratcom', 1725 1722 'javelin-dom', 1726 1723 ), 1724 + 'a79b6e52' => array( 1725 + 'phui-theme-css', 1726 + ), 1727 1727 'a80d0378' => array( 1728 1728 'javelin-behavior', 1729 1729 'javelin-stratcom', ··· 1843 1843 'javelin-stratcom', 1844 1844 'javelin-dom', 1845 1845 'javelin-util', 1846 - ), 1847 - 'b623169f' => array( 1848 - 'phui-theme-css', 1849 1846 ), 1850 1847 'b6993408' => array( 1851 1848 'javelin-behavior', ··· 2246 2243 'aphront-tooltip-css', 2247 2244 'phabricator-flag-css', 2248 2245 'phui-info-view-css', 2249 - 'sprite-menu-css', 2250 2246 'phabricator-main-menu-view', 2251 2247 'phabricator-notification-css', 2252 2248 'phabricator-notification-menu-css',
-1
resources/celerity/packages.php
··· 104 104 'aphront-tooltip-css', 105 105 'phabricator-flag-css', 106 106 'phui-info-view-css', 107 - 'sprite-menu-css', 108 107 109 108 'phabricator-main-menu-view', 110 109 'phabricator-notification-css',
-31
resources/sprite/manifest/menu.json
··· 1 - { 2 - "version": 1, 3 - "sprites": { 4 - "dark-eye": { 5 - "name": "dark-eye", 6 - "rule": ".dark-eye", 7 - "hash": "c8112e52666fa1cb509ebb2cdf3a3df5" 8 - }, 9 - "dark-logo": { 10 - "name": "dark-logo", 11 - "rule": ".dark-logo", 12 - "hash": "e3425da87e8f6737d8db0063d064cd7d" 13 - }, 14 - "light-eye": { 15 - "name": "light-eye", 16 - "rule": ".light-eye", 17 - "hash": "5b6bf7c8c10d4f7414d976f6e79ae2ff" 18 - }, 19 - "light-logo": { 20 - "name": "light-logo", 21 - "rule": ".light-logo", 22 - "hash": "bee37c0a86825ec7ded38936b1ba7b65" 23 - } 24 - }, 25 - "scales": [ 26 - 1, 27 - 2 28 - ], 29 - "header": "\/**\n * @provides sprite-menu-css\n * @generated\n *\/\n\n.sprite-menu {\n background-image: url(\/rsrc\/image\/sprite-menu.png);\n background-repeat: no-repeat;\n}\n\n@media\nonly screen and (min-device-pixel-ratio: 1.5),\nonly screen and (-webkit-min-device-pixel-ratio: 1.5),\nonly screen and (min-resolution: 1.5dppx) {\n .sprite-menu {\n background-image: url(\/rsrc\/image\/sprite-menu-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n", 30 - "type": "standard" 31 - }
resources/sprite/menu_1x/dark-eye.png

This is a binary file and will not be displayed.

resources/sprite/menu_1x/dark-logo.png

This is a binary file and will not be displayed.

resources/sprite/menu_1x/light-eye.png

This is a binary file and will not be displayed.

resources/sprite/menu_1x/light-logo.png

This is a binary file and will not be displayed.

resources/sprite/menu_2x/dark-eye.png

This is a binary file and will not be displayed.

resources/sprite/menu_2x/dark-logo.png

This is a binary file and will not be displayed.

resources/sprite/menu_2x/light-eye.png

This is a binary file and will not be displayed.

resources/sprite/menu_2x/light-logo.png

This is a binary file and will not be displayed.

-1
scripts/celerity/generate_sprites.php
··· 27 27 $generator = new CeleritySpriteGenerator(); 28 28 29 29 $sheets = array( 30 - 'menu' => $generator->buildMenuSheet(), 31 30 'tokens' => $generator->buildTokenSheet(), 32 31 'login' => $generator->buildLoginSheet(), 33 32 );
-52
src/applications/celerity/CeleritySpriteGenerator.php
··· 2 2 3 3 final class CeleritySpriteGenerator extends Phobject { 4 4 5 - public function buildMenuSheet() { 6 - $sprites = array(); 7 - 8 - $colors = array( 9 - 'dark', 10 - 'light', 11 - ); 12 - 13 - $sources = array(); 14 - foreach ($colors as $color) { 15 - $sources[$color.'-logo'] = array( 16 - 'x' => 96, 17 - 'y' => 40, 18 - 'css' => '.'.$color.'-logo', 19 - ); 20 - $sources[$color.'-eye'] = array( 21 - 'x' => 40, 22 - 'y' => 40, 23 - 'css' => '.'.$color.'-eye', 24 - ); 25 - } 26 - 27 - $scales = array( 28 - '1x' => 1, 29 - '2x' => 2, 30 - ); 31 - 32 - $template = new PhutilSprite(); 33 - foreach ($sources as $name => $spec) { 34 - $sprite = id(clone $template) 35 - ->setName($name) 36 - ->setSourceSize($spec['x'], $spec['y']) 37 - ->setTargetCSS($spec['css']); 38 - 39 - foreach ($scales as $scale_name => $scale) { 40 - $path = 'menu_'.$scale_name.'/'.$name.'.png'; 41 - $path = $this->getPath($path); 42 - 43 - $sprite->setSourceFile($path, $scale); 44 - } 45 - $sprites[] = $sprite; 46 - } 47 - 48 - $sheet = $this->buildSheet('menu', true); 49 - $sheet->setScales($scales); 50 - foreach ($sprites as $sprite) { 51 - $sheet->addSprite($sprite); 52 - } 53 - 54 - return $sheet; 55 - } 56 - 57 5 public function buildTokenSheet() { 58 6 $icons = $this->getDirectoryList('tokens_1x'); 59 7 $scales = array(
+9 -1
src/applications/config/option/PhabricatorUIConfigOptions.php
··· 69 69 " omit this if you just want a piece of text, like a copyright ". 70 70 " notice.")) 71 71 ->addExample($example, pht('Basic Example')), 72 + $this->newOption('ui.custom-wordmark', 'string', array()) 73 + ->setSummary( 74 + pht( 75 + 'Customize the text next to the logo.')) 76 + ->setDescription( 77 + pht( 78 + "Allows you to change the text (Phabricator by default) ". 79 + "next to the Phabricator logo.\n\n")), 72 80 $this->newOption( 73 81 'ui.custom-header', 74 82 'custom:PhabricatorCustomHeaderConfigType', ··· 80 88 'phid for a viewable image you have uploaded to Phabricator '. 81 89 'via the [[ /file/ | Files application]]. This image should '. 82 90 'be:'."\n". 83 - ' - 192px X 80px; while not enforced, images with these '. 91 + ' - 80px X 80px; while not enforced, images with these '. 84 92 'dimensions will look best across devices.'."\n". 85 93 ' - have view policy public if [[ '. 86 94 '/config/edit/policy.allow-public | `policy.allow-public`]] '.
+20 -14
src/view/page/menu/PhabricatorMainMenuView.php
··· 298 298 299 299 private function renderPhabricatorLogo() { 300 300 $style_logo = null; 301 + $logo = null; 301 302 $custom_header = PhabricatorEnv::getEnvConfig('ui.custom-header'); 303 + $custom_wordmark = PhabricatorEnv::getEnvConfig('ui.custom-wordmark'); 302 304 if ($custom_header) { 303 305 $cache = PhabricatorCaches::getImmutableCache(); 304 306 $cache_key_logo = 'ui.custom-header.logo-phid.v1.'.$custom_header; ··· 315 317 } 316 318 if ($logo_uri) { 317 319 $style_logo = 318 - 'background-size: 96px 40px; '. 320 + 'background-size: 40px 40px; '. 319 321 'background-position: 0px 0px; '. 320 322 'background-image: url('.$logo_uri.');'; 321 323 } 324 + 325 + $logo = phutil_tag( 326 + 'span', 327 + array( 328 + 'class' => 'phabricator-main-menu-logo', 329 + 'style' => $style_logo, 330 + ), 331 + ''); 322 332 } 323 333 324 - $color = PhabricatorEnv::getEnvConfig('ui.header-color'); 325 - if ($color == 'light') { 326 - $color = 'dark'; 327 - } else { 328 - $color = 'light'; 334 + if (!$logo) { 335 + $logo = phutil_tag( 336 + 'span', 337 + array( 338 + 'class' => 'phabricator-wordmark', 339 + ), 340 + (($custom_wordmark) ? $custom_wordmark : pht('Phabricator'))); 329 341 } 330 342 331 343 return phutil_tag( ··· 344 356 phutil_tag( 345 357 'span', 346 358 array( 347 - 'class' => 'sprite-menu phabricator-main-menu-eye '.$color.'-eye', 348 - ), 349 - ''), 350 - phutil_tag( 351 - 'span', 352 - array( 353 - 'class' => 'sprite-menu phabricator-main-menu-logo '.$color.'-logo', 354 - 'style' => $style_logo, 359 + 'class' => 'phabricator-main-menu-eye', 355 360 ), 356 361 ''), 362 + $logo, 357 363 )); 358 364 } 359 365
+20 -13
webroot/rsrc/css/application/base/main-menu-view.css
··· 41 41 } 42 42 43 43 .phabricator-main-menu-brand { 44 - display: inline-block; 45 - width: 148px; 46 44 height: 44px; 47 45 float: left; 48 - margin-right: 4px; 46 + margin-right: 6px; 49 47 padding-left: 6px; 50 48 } 51 49 52 - .phabricator-main-menu-logo { 53 - position: absolute; 54 - width: 96px; 55 - height: 40px; 56 - left: 52px; 57 - top: 2px; 58 - } 59 - 60 50 .phabricator-main-menu-eye { 61 - position: absolute; 51 + margin: 2px 0; 62 52 width: 40px; 63 53 height: 40px; 64 - top: 2px; 54 + float: left; 55 + display: block; 56 + background-image: url(/rsrc/image/logo/light-eye.png); 57 + background-size: 40px 40px; 65 58 } 66 59 67 60 .device-desktop .phabricator-main-menu-brand:hover { 68 61 background-color: rgba({$alphagrey},.2); 69 62 cursor: hand; 63 + } 64 + 65 + .device-phone .phabricator-wordmark { 66 + max-width: 112px; /* iPhone 5 limitation */ 67 + } 68 + 69 + .phabricator-wordmark { 70 + float: left; 71 + color: #fff; 72 + font-size: 18px; 73 + margin: 9px 4px 9px 6px; 74 + padding-right: 8px; 75 + max-width: 175px; 76 + overflow: hidden; 70 77 } 71 78 72 79 /* - Expand/Collapse Button ----------------------------------------------------
-36
webroot/rsrc/css/sprite-menu.css
··· 1 - /** 2 - * @provides sprite-menu-css 3 - * @generated 4 - */ 5 - 6 - .sprite-menu { 7 - background-image: url(/rsrc/image/sprite-menu.png); 8 - background-repeat: no-repeat; 9 - } 10 - 11 - @media 12 - only screen and (min-device-pixel-ratio: 1.5), 13 - only screen and (-webkit-min-device-pixel-ratio: 1.5), 14 - only screen and (min-resolution: 1.5dppx) { 15 - .sprite-menu { 16 - background-image: url(/rsrc/image/sprite-menu-X2.png); 17 - background-size: 97px 123px; 18 - } 19 - } 20 - 21 - 22 - .dark-logo { 23 - background-position: 0px 0px; 24 - } 25 - 26 - .dark-eye { 27 - background-position: 0px -82px; 28 - } 29 - 30 - .light-logo { 31 - background-position: 0px -41px; 32 - } 33 - 34 - .light-eye { 35 - background-position: -41px -82px; 36 - }
webroot/rsrc/image/logo/light-eye.png

This is a binary file and will not be displayed.

webroot/rsrc/image/sprite-menu-X2.png

This is a binary file and will not be displayed.

webroot/rsrc/image/sprite-menu.png

This is a binary file and will not be displayed.