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

Replace action sprite with FontAwesome

Summary: Replaces the action icons in action headers with FontAwesome

Test Plan:
- grep SPRITE_ACTIONS
- grep sprite-actions
- Replace on UIExamples
- Replace on Workboards
- Replace on Dashboards
- Replace on FeedStories

{F157840}
{F157841}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

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

+86 -534
+9 -13
resources/celerity/map.php
··· 7 7 return array( 8 8 'names' => 9 9 array( 10 - 'core.pkg.css' => '865102d6', 10 + 'core.pkg.css' => '3445a3a7', 11 11 'core.pkg.js' => 'ab0d6d3d', 12 12 'darkconsole.pkg.js' => 'ca8671ce', 13 13 'differential.pkg.css' => '382ca868', ··· 113 113 'rsrc/css/diviner/diviner-shared.css' => '38813222', 114 114 'rsrc/css/font/font-awesome.css' => '73d075c3', 115 115 'rsrc/css/font/font-source-sans-pro.css' => '91d53463', 116 - 'rsrc/css/font/phui-font-icon-base.css' => '74cfb6a9', 117 - 'rsrc/css/layout/phabricator-action-header-view.css' => '0c333cad', 116 + 'rsrc/css/font/phui-font-icon-base.css' => '3b2f9260', 117 + 'rsrc/css/layout/phabricator-action-header-view.css' => '40134802', 118 118 'rsrc/css/layout/phabricator-action-list-view.css' => 'dcd9875f', 119 119 'rsrc/css/layout/phabricator-crumbs-view.css' => '6a23399c', 120 120 'rsrc/css/layout/phabricator-filetree-view.css' => 'a8c86ace', ··· 128 128 'rsrc/css/phui/phui-box.css' => '7b3a2eed', 129 129 'rsrc/css/phui/phui-button.css' => '3dbdbf0d', 130 130 'rsrc/css/phui/phui-document.css' => '3b078dc0', 131 - 'rsrc/css/phui/phui-feed-story.css' => '3a59c2cf', 131 + 'rsrc/css/phui/phui-feed-story.css' => '37216a85', 132 132 'rsrc/css/phui/phui-fontkit.css' => 'de84aa4a', 133 133 'rsrc/css/phui/phui-form-view.css' => '867463b4', 134 134 'rsrc/css/phui/phui-form.css' => 'b78ec020', 135 135 'rsrc/css/phui/phui-header-view.css' => '689dbc38', 136 - 'rsrc/css/phui/phui-icon.css' => 'ef701b9b', 136 + 'rsrc/css/phui/phui-icon.css' => 'cdcf2aca', 137 137 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', 138 138 'rsrc/css/phui/phui-list.css' => 'ce29d035', 139 139 'rsrc/css/phui/phui-object-box.css' => 'ce92d8ec', ··· 148 148 'rsrc/css/phui/phui-timeline-view.css' => '15ff2a9f', 149 149 'rsrc/css/phui/phui-workboard-view.css' => '2bf82d00', 150 150 'rsrc/css/phui/phui-workpanel-view.css' => 'fddd97bf', 151 - 'rsrc/css/sprite-actions.css' => '969ad0e5', 152 151 'rsrc/css/sprite-apps-large.css' => '76d8716b', 153 152 'rsrc/css/sprite-apps-xlarge.css' => 'db66c878', 154 153 'rsrc/css/sprite-apps.css' => '600df7dd', ··· 308 307 'rsrc/image/phrequent_inactive.png' => 'bfc15a69', 309 308 'rsrc/image/search-white.png' => '64cc0d45', 310 309 'rsrc/image/search.png' => '82625a7e', 311 - 'rsrc/image/sprite-actions-X2.png' => '7dfd5652', 312 - 'rsrc/image/sprite-actions.png' => '2ddd18c3', 313 310 'rsrc/image/sprite-apps-X2.png' => '55b68035', 314 311 'rsrc/image/sprite-apps-large-X2.png' => 'becb43e7', 315 312 'rsrc/image/sprite-apps-large.png' => '6c673dd5', ··· 691 688 'paste-css' => 'aa1767d1', 692 689 'path-typeahead' => 'f7fc67ec', 693 690 'people-profile-css' => 'ba7b2762', 694 - 'phabricator-action-header-view-css' => '0c333cad', 691 + 'phabricator-action-header-view-css' => '40134802', 695 692 'phabricator-action-list-view-css' => 'dcd9875f', 696 693 'phabricator-application-launch-view-css' => 'd290ba21', 697 694 'phabricator-busy' => '6453c869', ··· 761 758 'phui-calendar-list-css' => 'c1d0ca59', 762 759 'phui-calendar-month-css' => 'a92e47d2', 763 760 'phui-document-view-css' => '3b078dc0', 764 - 'phui-feed-story-css' => '3a59c2cf', 765 - 'phui-font-icon-base-css' => '74cfb6a9', 761 + 'phui-feed-story-css' => '37216a85', 762 + 'phui-font-icon-base-css' => '3b2f9260', 766 763 'phui-fontkit-css' => 'de84aa4a', 767 764 'phui-form-css' => 'b78ec020', 768 765 'phui-form-view-css' => '867463b4', 769 766 'phui-header-view-css' => '689dbc38', 770 - 'phui-icon-view-css' => 'ef701b9b', 767 + 'phui-icon-view-css' => 'cdcf2aca', 771 768 'phui-info-panel-css' => '27ea50a1', 772 769 'phui-list-view-css' => 'ce29d035', 773 770 'phui-object-box-css' => 'ce92d8ec', ··· 800 797 'releeph-request-differential-create-dialog' => '8d8b92cd', 801 798 'releeph-request-typeahead-css' => '667a48ae', 802 799 'setup-issue-css' => '69e640e7', 803 - 'sprite-actions-css' => '969ad0e5', 804 800 'sprite-apps-css' => '600df7dd', 805 801 'sprite-apps-large-css' => '76d8716b', 806 802 'sprite-apps-xlarge-css' => 'db66c878',
-206
resources/sprite/manifest/actions.json
··· 1 - { 2 - "version" : 1, 3 - "sprites" : { 4 - "actions-close-dark" : { 5 - "name" : "actions-close-dark", 6 - "rule" : ".actions-close-dark, .device-desktop .actions-close-grey.phui-icon-view:hover", 7 - "hash" : "dc370e5777e6ac4ca06bc72adffea903" 8 - }, 9 - "actions-close-grey" : { 10 - "name" : "actions-close-grey", 11 - "rule" : ".actions-close-grey", 12 - "hash" : "557249561ccfd1c44ce8b5ff52938195" 13 - }, 14 - "actions-close-white" : { 15 - "name" : "actions-close-white", 16 - "rule" : ".actions-close-white", 17 - "hash" : "07ee0398d250301db4773a43a31ef2fa" 18 - }, 19 - "actions-down-dark" : { 20 - "name" : "actions-down-dark", 21 - "rule" : ".actions-down-dark, .device-desktop .actions-down-grey.phui-icon-view:hover", 22 - "hash" : "56e0299b481c8cbd1104d4d06a9ad60f" 23 - }, 24 - "actions-down-grey" : { 25 - "name" : "actions-down-grey", 26 - "rule" : ".actions-down-grey", 27 - "hash" : "62021593f80189ead4c16dbb6496eff9" 28 - }, 29 - "actions-down-white" : { 30 - "name" : "actions-down-white", 31 - "rule" : ".actions-down-white", 32 - "hash" : "fbf8553693281e156a864cc10c90811c" 33 - }, 34 - "actions-flag-dark" : { 35 - "name" : "actions-flag-dark", 36 - "rule" : ".actions-flag-dark, .device-desktop .actions-flag-grey.phui-icon-view:hover", 37 - "hash" : "c6d1f2054109fa35c61791ba6c8b3b4e" 38 - }, 39 - "actions-flag-grey" : { 40 - "name" : "actions-flag-grey", 41 - "rule" : ".actions-flag-grey", 42 - "hash" : "f283ebb54b50a4dd4df6c968c327b1ae" 43 - }, 44 - "actions-flag-white" : { 45 - "name" : "actions-flag-white", 46 - "rule" : ".actions-flag-white", 47 - "hash" : "e4ac2df6b75607b4a41a7be3a232340d" 48 - }, 49 - "actions-heart-dark" : { 50 - "name" : "actions-heart-dark", 51 - "rule" : ".actions-heart-dark, .device-desktop .actions-heart-grey.phui-icon-view:hover", 52 - "hash" : "51063df4f5317c40fd3bbe55683c2eb8" 53 - }, 54 - "actions-heart-grey" : { 55 - "name" : "actions-heart-grey", 56 - "rule" : ".actions-heart-grey", 57 - "hash" : "dc21c4569280ee297f556cc08a366f9a" 58 - }, 59 - "actions-heart-white" : { 60 - "name" : "actions-heart-white", 61 - "rule" : ".actions-heart-white", 62 - "hash" : "5652d7ad050e93ef3795e8f3d535b0af" 63 - }, 64 - "actions-move-dark" : { 65 - "name" : "actions-move-dark", 66 - "rule" : ".actions-move-dark, .device-desktop .actions-move-grey.phui-icon-view:hover", 67 - "hash" : "849975a0f7d870b2098b5df97a262e32" 68 - }, 69 - "actions-move-grey" : { 70 - "name" : "actions-move-grey", 71 - "rule" : ".actions-move-grey", 72 - "hash" : "9f880792fcd0728a263685cf83c4c4ef" 73 - }, 74 - "actions-move-white" : { 75 - "name" : "actions-move-white", 76 - "rule" : ".actions-move-white", 77 - "hash" : "0baa80bc68e08ee62a2ea00939d701dd" 78 - }, 79 - "actions-new-dark" : { 80 - "name" : "actions-new-dark", 81 - "rule" : ".actions-new-dark, .device-desktop .actions-new-grey.phui-icon-view:hover", 82 - "hash" : "75f7db365f28cac6e8e4bef6582db4d5" 83 - }, 84 - "actions-new-grey" : { 85 - "name" : "actions-new-grey", 86 - "rule" : ".actions-new-grey", 87 - "hash" : "edd7f1d803dc7c4991e484315e1690cd" 88 - }, 89 - "actions-new-white" : { 90 - "name" : "actions-new-white", 91 - "rule" : ".actions-new-white", 92 - "hash" : "dded791b1ec55c32710845a1338bd31d" 93 - }, 94 - "actions-search-dark" : { 95 - "name" : "actions-search-dark", 96 - "rule" : ".actions-search-dark, .device-desktop .actions-search-grey.phui-icon-view:hover", 97 - "hash" : "90e71b95196672296a329a9d2ba54b6f" 98 - }, 99 - "actions-search-grey" : { 100 - "name" : "actions-search-grey", 101 - "rule" : ".actions-search-grey", 102 - "hash" : "041d1033d4500972791cc7cf752ed250" 103 - }, 104 - "actions-search-white" : { 105 - "name" : "actions-search-white", 106 - "rule" : ".actions-search-white", 107 - "hash" : "8bfe4fb8c44c302c676d8b42740dfbe4" 108 - }, 109 - "actions-settings-dark" : { 110 - "name" : "actions-settings-dark", 111 - "rule" : ".actions-settings-dark, .device-desktop .actions-settings-grey.phui-icon-view:hover", 112 - "hash" : "45a4a5f926b84dadffe036cb7cbda166" 113 - }, 114 - "actions-settings-grey" : { 115 - "name" : "actions-settings-grey", 116 - "rule" : ".actions-settings-grey", 117 - "hash" : "73db9b654d8287d8e15be5bef8d72d89" 118 - }, 119 - "actions-settings-white" : { 120 - "name" : "actions-settings-white", 121 - "rule" : ".actions-settings-white", 122 - "hash" : "ade04349a27cf2c223e8f4e7fea52cf1" 123 - }, 124 - "actions-star-dark" : { 125 - "name" : "actions-star-dark", 126 - "rule" : ".actions-star-dark, .device-desktop .actions-star-grey.phui-icon-view:hover", 127 - "hash" : "ca65f112d09fed7854bb013de6e78323" 128 - }, 129 - "actions-star-grey" : { 130 - "name" : "actions-star-grey", 131 - "rule" : ".actions-star-grey", 132 - "hash" : "23894980dd42da92451c355c844250c6" 133 - }, 134 - "actions-star-white" : { 135 - "name" : "actions-star-white", 136 - "rule" : ".actions-star-white", 137 - "hash" : "fd709f3e1bebb17364bbfac7c0b8aaa5" 138 - }, 139 - "actions-tag-dark" : { 140 - "name" : "actions-tag-dark", 141 - "rule" : ".actions-tag-dark, .device-desktop .actions-tag-grey.phui-icon-view:hover", 142 - "hash" : "7ca0e9df25c74a09e5111a8ce578c7fe" 143 - }, 144 - "actions-tag-grey" : { 145 - "name" : "actions-tag-grey", 146 - "rule" : ".actions-tag-grey", 147 - "hash" : "02d0bb07ce65a12a8e653c7cced7e72d" 148 - }, 149 - "actions-tag-white" : { 150 - "name" : "actions-tag-white", 151 - "rule" : ".actions-tag-white", 152 - "hash" : "dac6bff0b839a3430fda3de4a5c44bfd" 153 - }, 154 - "actions-token-dark" : { 155 - "name" : "actions-token-dark", 156 - "rule" : ".actions-token-dark, .device-desktop .actions-token-grey.phui-icon-view:hover", 157 - "hash" : "4c289b5175df8375fc286127f47ddad9" 158 - }, 159 - "actions-token-grey" : { 160 - "name" : "actions-token-grey", 161 - "rule" : ".actions-token-grey", 162 - "hash" : "93a9c3b4786480fd44ba4f17610f3926" 163 - }, 164 - "actions-token-white" : { 165 - "name" : "actions-token-white", 166 - "rule" : ".actions-token-white", 167 - "hash" : "075f3f28279e73b793b612a61f4b1a07" 168 - }, 169 - "actions-up-dark" : { 170 - "name" : "actions-up-dark", 171 - "rule" : ".actions-up-dark, .device-desktop .actions-up-grey.phui-icon-view:hover", 172 - "hash" : "e7f3352316b07244babe7a3ebab82132" 173 - }, 174 - "actions-up-grey" : { 175 - "name" : "actions-up-grey", 176 - "rule" : ".actions-up-grey", 177 - "hash" : "a52ff86b194bf68f220668ba60013c0c" 178 - }, 179 - "actions-up-white" : { 180 - "name" : "actions-up-white", 181 - "rule" : ".actions-up-white", 182 - "hash" : "e42262ba18632de2d3dfdab8c83324e6" 183 - }, 184 - "actions-wrench-dark" : { 185 - "name" : "actions-wrench-dark", 186 - "rule" : ".actions-wrench-dark, .device-desktop .actions-wrench-grey.phui-icon-view:hover", 187 - "hash" : "aac832965a14438c2c161cdf347dfed7" 188 - }, 189 - "actions-wrench-grey" : { 190 - "name" : "actions-wrench-grey", 191 - "rule" : ".actions-wrench-grey", 192 - "hash" : "1b27d1fe1776af2808503c6d3e842855" 193 - }, 194 - "actions-wrench-white" : { 195 - "name" : "actions-wrench-white", 196 - "rule" : ".actions-wrench-white", 197 - "hash" : "fbb09cf182d70c99c74c360ce87724a2" 198 - } 199 - }, 200 - "scales" : [ 201 - 1, 202 - 2 203 - ], 204 - "header" : "\/**\n * @provides sprite-actions-css\n * @generated\n *\/\n\n.sprite-actions {\n background-image: url(\/rsrc\/image\/sprite-actions.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) {\n .sprite-actions {\n background-image: url(\/rsrc\/image\/sprite-actions-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n", 205 - "type" : "standard" 206 - }
-1
scripts/celerity/generate_sprites.php
··· 30 30 'remarkup' => $generator->buildRemarkupSheet(), 31 31 'menu' => $generator->buildMenuSheet(), 32 32 'apps' => $generator->buildAppsSheet(), 33 - 'actions' => $generator->buildActionsSheet(), 34 33 'minicons' => $generator->buildMiniconsSheet(), 35 34 'conpherence' => $generator->buildConpherenceSheet(), 36 35 'apps-large' => $generator->buildAppsLargeSheet(),
+1 -2
src/applications/conpherence/controller/ConpherenceWidgetController.php
··· 66 66 67 67 $widgets = array(); 68 68 $new_icon = id(new PHUIIconView()) 69 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 70 - ->setSpriteIcon('new-grey') 69 + ->setIconFont('fa-plus') 71 70 ->setHref($this->getWidgetURI()) 72 71 ->setMetadata(array('widget' => null)) 73 72 ->addSigil('conpherence-widget-adder');
+2 -4
src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
··· 229 229 $edit_uri->setQueryParam('dashboardID', $dashboard_id); 230 230 } 231 231 $action_edit = id(new PHUIIconView()) 232 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 233 - ->setSpriteIcon('settings-grey') 232 + ->setIconFont('fa-pencil') 234 233 ->setHref((string) $edit_uri); 235 234 $header->addAction($action_edit); 236 235 ··· 239 238 '/dashboard/removepanel/'.$dashboard_id.'/')) 240 239 ->setQueryParam('panelPHID', $panel->getPHID()); 241 240 $action_remove = id(new PHUIIconView()) 242 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 243 - ->setSpriteIcon('close-grey') 241 + ->setIconFont('fa-trash-o') 244 242 ->setHref((string) $uri) 245 243 ->setWorkflow(true); 246 244 $header->addAction($action_remove);
+1 -2
src/applications/project/controller/PhabricatorProjectBoardViewController.php
··· 165 165 $panel->setEditURI('column/'.$column->getID().'/'); 166 166 } 167 167 $panel->setHeaderAction(id(new PHUIIconView()) 168 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 169 - ->setSpriteIcon('new-grey') 168 + ->setIconFont('fa-plus') 170 169 ->setHref('/maniphest/task/create/') 171 170 ->addSigil('column-add-task') 172 171 ->setMetadata(
+3 -6
src/applications/uiexample/examples/PHUIFeedStoryExample.php
··· 66 66 $text = hsprintf('<strong><a>harding (Tom Harding)</a></strong> awarded '. 67 67 '<a>M10: Workboards</a> a token.'); 68 68 $action1 = id(new PHUIIconView()) 69 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 70 - ->setSpriteIcon('token-grey') 69 + ->setIconFont('fa-trophy bluegrey') 71 70 ->setHref('#'); 72 71 $token = 73 72 id(new PHUIIconView()) ··· 87 86 $text = hsprintf('<strong><a>wgharding (Warren Harding)</a></strong> '. 88 87 'asked a new question.'); 89 88 $action1 = id(new PHUIIconView()) 90 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 91 - ->setSpriteIcon('up-grey') 89 + ->setIconFont('fa-chevron-up bluegrey') 92 90 ->setHref('#'); 93 91 $action2 = id(new PHUIIconView()) 94 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 95 - ->setSpriteIcon('down-grey') 92 + ->setIconFont('fa-chevron-down bluegrey') 96 93 ->setHref('#'); 97 94 $story4 = id(new PHUIFeedStoryView()) 98 95 ->setTitle($text)
-24
src/applications/uiexample/examples/PHUIIconExample.php
··· 578 578 ->setSpriteSheet(PHUIIconView::SPRITE_PAYMENTS) 579 579 ->setSpriteIcon('googlecheckout'); 580 580 581 - $actions = array( 582 - 'settings-grey', 583 - 'heart-grey', 584 - 'tag-grey', 585 - 'new-grey', 586 - 'search-grey', 587 - 'move-grey'); 588 - $actionview = array(); 589 - foreach ($actions as $action) { 590 - $actionview[] = id(new PHUIIconView()) 591 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 592 - ->setSpriteIcon($action) 593 - ->setHref('#'); 594 - } 595 - 596 581 $tokens = array( 597 582 'like-1', 598 583 'like-2', ··· 628 613 ->appendChild($ficons) 629 614 ->addMargin(PHUI::MARGIN_LARGE); 630 615 631 - $layout1 = id(new PHUIBoxView()) 632 - ->appendChild($actionview) 633 - ->addMargin(PHUI::MARGIN_MEDIUM); 634 - 635 616 $layout2 = id(new PHUIBoxView()) 636 617 ->appendChild(array($person1, $person2, $person3)) 637 618 ->addMargin(PHUI::MARGIN_MEDIUM); ··· 668 649 ->setHeaderText(pht('Colors and Transforms')) 669 650 ->appendChild($layout_cicons); 670 651 671 - $wrap1 = id(new PHUIObjectBoxView()) 672 - ->setHeaderText(pht('Action Icons!')) 673 - ->appendChild($layout1); 674 - 675 652 $wrap2 = id(new PHUIObjectBoxView()) 676 653 ->setHeaderText(pht('People!')) 677 654 ->appendChild(array($layout2, $layout2a)); ··· 696 673 array( 697 674 $fontawesome, 698 675 $transforms, 699 - $wrap1, 700 676 $wrap2, 701 677 $wrap3, 702 678 $wrap4,
+7 -14
src/applications/uiexample/examples/PhabricatorActionHeaderExample.php
··· 106 106 ->setHeader(pht('With Action Icons')); 107 107 108 108 $action1 = new PHUIIconView(); 109 - $action1->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS); 110 - $action1->setSpriteIcon('settings-grey'); 109 + $action1->setIconFont('fa-cog'); 111 110 $action1->setHref('#'); 112 111 113 112 $action2 = new PHUIIconView(); 114 - $action2->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS); 115 - $action2->setSpriteIcon('heart-white'); 113 + $action1->setIconFont('fa-heart'); 116 114 $action2->setHref('#'); 117 115 118 116 $action3 = new PHUIIconView(); 119 - $action3->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS); 120 - $action3->setSpriteIcon('tag-white'); 117 + $action1->setIconFont('fa-tag'); 121 118 $action3->setHref('#'); 122 119 123 120 $action4 = new PHUIIconView(); 124 - $action4->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS); 125 - $action4->setSpriteIcon('new-white'); 121 + $action4->setIconFont('fa-plus'); 126 122 $action4->setHref('#'); 127 123 128 124 $action5 = new PHUIIconView(); 129 - $action5->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS); 130 - $action5->setSpriteIcon('search-white'); 125 + $action5->setIconFont('fa-search'); 131 126 $action5->setHref('#'); 132 127 133 128 $action6 = new PHUIIconView(); 134 - $action6->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS); 135 - $action6->setSpriteIcon('move-white'); 129 + $action6->setIconFont('fa-arrows'); 136 130 $action6->setHref('#'); 137 131 138 132 $header1 = id(new PhabricatorActionHeaderView()) ··· 200 194 ->setName('Closed'); 201 195 202 196 $action1 = new PHUIIconView(); 203 - $action1->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS); 204 - $action1->setSpriteIcon('flag-grey'); 197 + $action1->setIconFont('fa-flag'); 205 198 $action1->setHref('#'); 206 199 207 200 $header1 = id(new PhabricatorActionHeaderView())
+1 -60
src/infrastructure/celerity/CeleritySpriteGenerator.php
··· 46 46 return $sheet; 47 47 } 48 48 49 - public function buildActionsSheet() { 50 - $icons = $this->getDirectoryList('actions_white_1x'); 51 - 52 - $colors = array( 53 - 'dark', 54 - 'grey', 55 - 'white', 56 - ); 57 - 58 - $scales = array( 59 - '1x' => 1, 60 - '2x' => 2, 61 - ); 62 - 63 - $template = id(new PhutilSprite()) 64 - ->setSourceSize(24, 24); 65 - 66 - $sprites = array(); 67 - foreach ($colors as $color) { 68 - foreach ($icons as $icon) { 69 - $prefix = 'actions_'; 70 - if (strlen($color)) { 71 - $prefix .= $color.'_'; 72 - } 73 - 74 - $suffix = ''; 75 - if (strlen($color)) { 76 - $suffix = '-'.$color; 77 - } 78 - 79 - $sprite = id(clone $template) 80 - ->setName('actions-'.$icon.$suffix); 81 - 82 - $tcss = array(); 83 - $tcss[] = '.actions-'.$icon.$suffix; 84 - if ($color == 'dark') { 85 - $tcss[] = '.device-desktop '. 86 - '.actions-'.$icon.'-grey.phui-icon-view:hover'; 87 - } 88 - 89 - $sprite->setTargetCSS(implode(', ', $tcss)); 90 - 91 - foreach ($scales as $scale_key => $scale) { 92 - $path = $this->getPath($prefix.$scale_key.'/'.$icon.'.png'); 93 - $sprite->setSourceFile($path, $scale); 94 - } 95 - $sprites[] = $sprite; 96 - } 97 - } 98 - 99 - $sheet = $this->buildSheet('actions', true); 100 - $sheet->setScales($scales); 101 - foreach ($sprites as $sprite) { 102 - $sheet->addSprite($sprite); 103 - } 104 - 105 - return $sheet; 106 - } 107 - 108 - public function buildMiniconsSheet() { 49 + public function buildMiniconsSheet() { 109 50 $icons = $this->getDirectoryList('minicons_white_1x'); 110 51 111 52 $colors = array(
+37 -15
src/view/layout/PhabricatorActionHeaderView.php
··· 2 2 3 3 final class PhabricatorActionHeaderView extends AphrontView { 4 4 5 - const ICON_GREY = 'grey'; 6 - const ICON_WHITE = 'white'; 7 - 8 5 const HEADER_GREY = 'grey'; 9 6 const HEADER_DARK_GREY = 'dark-grey'; 10 7 const HEADER_BLUE = 'blue'; ··· 18 15 private $headerIcon; 19 16 private $headerSigils = array(); 20 17 private $actions = array(); 21 - private $iconColor = PhabricatorActionHeaderView::ICON_GREY; 22 18 private $headerColor; 19 + private $tag = null; 23 20 private $dropdown; 24 21 25 22 public function setDropdown($dropdown) { ··· 33 30 } 34 31 35 32 public function setTag(PHUITagView $tag) { 36 - $this->actions[] = $tag; 33 + $this->tag = $tag; 37 34 return $this; 38 35 } 39 36 ··· 57 54 return $this; 58 55 } 59 56 60 - public function setIconColor($color) { 61 - $this->iconColor = $color; 62 - return $this; 63 - } 64 - 65 57 public function setHeaderColor($color) { 66 58 $this->headerColor = $color; 67 59 return $this; 68 60 } 69 61 62 + private function getIconColor() { 63 + switch ($this->headerColor) { 64 + case self::HEADER_GREY: 65 + return 'lightgreytext'; 66 + case self::HEADER_DARK_GREY: 67 + return 'lightgreytext'; 68 + case self::HEADER_BLUE: 69 + return 'white'; 70 + case self::HEADER_GREEN: 71 + return 'white'; 72 + case self::HEADER_RED: 73 + return 'white'; 74 + case self::HEADER_YELLOW: 75 + return 'white'; 76 + case self::HEADER_LIGHTBLUE: 77 + return 'bluegrey'; 78 + } 79 + } 80 + 70 81 public function render() { 71 82 72 83 require_celerity_resource('phabricator-action-header-view-css'); ··· 84 95 } 85 96 86 97 $action_list = array(); 87 - foreach ($this->actions as $action) { 98 + if (nonempty($this->actions)) { 99 + foreach ($this->actions as $action) { 100 + $action->addClass($this->getIconColor()); 101 + $action_list[] = phutil_tag( 102 + 'li', 103 + array( 104 + 'class' => 'phabricator-action-header-icon-item' 105 + ), 106 + $action); 107 + } 108 + } 109 + 110 + if ($this->tag) { 88 111 $action_list[] = phutil_tag( 89 112 'li', 90 113 array( 91 114 'class' => 'phabricator-action-header-icon-item' 92 115 ), 93 - $action); 116 + $this->tag); 94 117 } 95 118 96 - $header_icon = ''; 119 + $header_icon = null; 97 120 if ($this->headerIcon) { 98 121 require_celerity_resource('sprite-minicons-css'); 99 122 $header_icon = phutil_tag( ··· 126 149 $header_title)); 127 150 128 151 $icons = ''; 129 - if (!empty($action_list)) { 130 - $classes[] = 'phabricator-action-header-icon-'.$this->iconColor; 152 + if (nonempty($action_list)) { 131 153 $icons = phutil_tag( 132 154 'ul', 133 155 array(
-2
src/view/phui/PHUIIconView.php
··· 3 3 final class PHUIIconView extends AphrontTagView { 4 4 5 5 const SPRITE_MINICONS = 'minicons'; 6 - const SPRITE_ACTIONS = 'actions'; 7 6 const SPRITE_APPS = 'apps'; 8 7 const SPRITE_TOKENS = 'tokens'; 9 8 const SPRITE_PAYMENTS = 'payments'; 10 - const SPRITE_ICONS = 'icons'; 11 9 const SPRITE_LOGIN = 'login'; 12 10 const SPRITE_PROJECTS = 'projects'; 13 11 const SPRITE_BUTTONBAR = 'buttonbar';
+1 -2
src/view/phui/PHUIWorkpanelView.php
··· 62 62 $header_edit = null; 63 63 if ($this->editURI) { 64 64 $header_edit = id(new PHUIIconView()) 65 - ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) 66 - ->setSpriteIcon('settings-grey') 65 + ->setIconFont('fa-pencil') 67 66 ->setHref($this->editURI); 68 67 } 69 68 $header = id(new PhabricatorActionHeaderView())
+11
webroot/rsrc/css/font/phui-font-icon-base.css
··· 144 144 .phui-icon-view.grey { 145 145 color: {$lightgreytext}; 146 146 } 147 + 148 + /* Hovers */ 149 + 150 + .device-desktop a.phui-icon-view.lightgreytext:hover, 151 + .device-desktop a.phui-icon-view.grey:hover { 152 + color: {$darkgreytext}; 153 + } 154 + 155 + .device-desktop a.phui-icon-view.bluegrey:hover { 156 + color: {$darkbluetext}; 157 + }
+6 -3
webroot/rsrc/css/layout/phabricator-action-header-view.css
··· 14 14 font-weight: bold; 15 15 line-height: 15px; 16 16 padding: 8px 0; 17 - text-shadow: 0 1px 1px #fff; 18 17 white-space: nowrap; 18 + -webkit-font-smoothing: antialiased; 19 19 } 20 20 21 21 .gradient-lightblue-header .phabricator-action-header-title { ··· 29 29 30 30 .phabricator-action-header-icon-item { 31 31 float: right; 32 - padding-left: 2px; 32 + padding-left: 4px; 33 33 } 34 34 35 35 .phabricator-action-header-icon-item .phui-icon-view { 36 36 display: inline-block; 37 + font-size: 18px; 38 + margin: 4px 0; 39 + height: 18px; 40 + width: 18px; 37 41 } 38 42 39 43 .phabricator-action-header-icon-item .phui-tag-view { ··· 53 57 .gradient-blue-header .phabricator-action-header-link, 54 58 .gradient-yellow-header .phabricator-action-header-link { 55 59 color: #fff; 56 - text-shadow: 0 -1px 1px rgba(0,0,0,.7); 57 60 } 58 61 59 62 .phabricator-action-header-icon-list .phui-tag-view {
+3
webroot/rsrc/css/phui/phui-feed-story.css
··· 84 84 .phui-feed-story-action-item { 85 85 float: right; 86 86 padding-left: 2px; 87 + height: 18px; 88 + width: 18px; 89 + font-size: 18px; 87 90 } 88 91 89 92 .phui-feed-story-action-list .phui-icon-view {
+4 -5
webroot/rsrc/css/phui/phui-icon.css
··· 12 12 width: 16px; 13 13 } 14 14 15 - .phui-icon-view.sprite-actions { 16 - height: 24px; 17 - width: 24px; 18 - } 19 - 20 15 .phui-icon-view.sprite-apps, 21 16 .phui-icon-view.sprite-buttonbar { 22 17 height: 14px; ··· 54 49 .phui-icon-has-text:before { 55 50 margin-right: 8px; 56 51 } 52 + 53 + a.phui-icon-view:hover { 54 + text-decoration: none; 55 + }
-175
webroot/rsrc/css/sprite-actions.css
··· 1 - /** 2 - * @provides sprite-actions-css 3 - * @generated 4 - */ 5 - 6 - .sprite-actions { 7 - background-image: url(/rsrc/image/sprite-actions.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 - .sprite-actions { 15 - background-image: url(/rsrc/image/sprite-actions-X2.png); 16 - background-size: 150px 175px; 17 - } 18 - } 19 - 20 - 21 - .actions-close-dark, .device-desktop .actions-close-grey.phui-icon-view:hover { 22 - background-position: 0px 0px; 23 - } 24 - 25 - .actions-down-dark, .device-desktop .actions-down-grey.phui-icon-view:hover { 26 - background-position: -25px 0px; 27 - } 28 - 29 - .actions-flag-dark, .device-desktop .actions-flag-grey.phui-icon-view:hover { 30 - background-position: -50px 0px; 31 - } 32 - 33 - .actions-heart-dark, .device-desktop .actions-heart-grey.phui-icon-view:hover { 34 - background-position: -75px 0px; 35 - } 36 - 37 - .actions-move-dark, .device-desktop .actions-move-grey.phui-icon-view:hover { 38 - background-position: -100px 0px; 39 - } 40 - 41 - .actions-new-dark, .device-desktop .actions-new-grey.phui-icon-view:hover { 42 - background-position: -125px 0px; 43 - } 44 - 45 - .actions-search-dark, .device-desktop .actions-search-grey.phui-icon-view:hover { 46 - background-position: 0px -25px; 47 - } 48 - 49 - .actions-settings-dark, .device-desktop .actions-settings-grey.phui-icon-view:hover { 50 - background-position: -25px -25px; 51 - } 52 - 53 - .actions-star-dark, .device-desktop .actions-star-grey.phui-icon-view:hover { 54 - background-position: -50px -25px; 55 - } 56 - 57 - .actions-tag-dark, .device-desktop .actions-tag-grey.phui-icon-view:hover { 58 - background-position: -75px -25px; 59 - } 60 - 61 - .actions-token-dark, .device-desktop .actions-token-grey.phui-icon-view:hover { 62 - background-position: -100px -25px; 63 - } 64 - 65 - .actions-up-dark, .device-desktop .actions-up-grey.phui-icon-view:hover { 66 - background-position: -125px -25px; 67 - } 68 - 69 - .actions-wrench-dark, .device-desktop .actions-wrench-grey.phui-icon-view:hover { 70 - background-position: 0px -50px; 71 - } 72 - 73 - .actions-close-grey { 74 - background-position: -25px -50px; 75 - } 76 - 77 - .actions-down-grey { 78 - background-position: -50px -50px; 79 - } 80 - 81 - .actions-flag-grey { 82 - background-position: -75px -50px; 83 - } 84 - 85 - .actions-heart-grey { 86 - background-position: -100px -50px; 87 - } 88 - 89 - .actions-move-grey { 90 - background-position: -125px -50px; 91 - } 92 - 93 - .actions-new-grey { 94 - background-position: 0px -75px; 95 - } 96 - 97 - .actions-search-grey { 98 - background-position: -25px -75px; 99 - } 100 - 101 - .actions-settings-grey { 102 - background-position: -50px -75px; 103 - } 104 - 105 - .actions-star-grey { 106 - background-position: -75px -75px; 107 - } 108 - 109 - .actions-tag-grey { 110 - background-position: -100px -75px; 111 - } 112 - 113 - .actions-token-grey { 114 - background-position: -125px -75px; 115 - } 116 - 117 - .actions-up-grey { 118 - background-position: 0px -100px; 119 - } 120 - 121 - .actions-wrench-grey { 122 - background-position: -25px -100px; 123 - } 124 - 125 - .actions-close-white { 126 - background-position: -50px -100px; 127 - } 128 - 129 - .actions-down-white { 130 - background-position: -75px -100px; 131 - } 132 - 133 - .actions-flag-white { 134 - background-position: -100px -100px; 135 - } 136 - 137 - .actions-heart-white { 138 - background-position: -125px -100px; 139 - } 140 - 141 - .actions-move-white { 142 - background-position: 0px -125px; 143 - } 144 - 145 - .actions-new-white { 146 - background-position: -25px -125px; 147 - } 148 - 149 - .actions-search-white { 150 - background-position: -50px -125px; 151 - } 152 - 153 - .actions-settings-white { 154 - background-position: -75px -125px; 155 - } 156 - 157 - .actions-star-white { 158 - background-position: -100px -125px; 159 - } 160 - 161 - .actions-tag-white { 162 - background-position: -125px -125px; 163 - } 164 - 165 - .actions-token-white { 166 - background-position: 0px -150px; 167 - } 168 - 169 - .actions-up-white { 170 - background-position: -25px -150px; 171 - } 172 - 173 - .actions-wrench-white { 174 - background-position: -50px -150px; 175 - }
webroot/rsrc/image/sprite-actions-X2.png

This is a binary file and will not be displayed.

webroot/rsrc/image/sprite-actions.png

This is a binary file and will not be displayed.