Skip to content

Commit 550793f

Browse files
committedJan 19, 2016
Remove header gradients for flat colors
Summary: Removes header gradient images for flat, CSS controlled colors. I didn't convert the "pony" colors over, going with few options for easier theme-ability. Test Plan: Test each color choice. {F1063828} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15052
1 parent a9a5991 commit 550793f

22 files changed

+50
-183
lines changed
 

‎resources/celerity/map.php

+8-11
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
return array(
99
'names' => array(
10-
'core.pkg.css' => '9d3a79f4',
10+
'core.pkg.css' => 'c61091b0',
1111
'core.pkg.js' => '573e6664',
1212
'darkconsole.pkg.js' => 'e7393ebb',
1313
'differential.pkg.css' => '2de124c9',
@@ -32,10 +32,10 @@
3232
'rsrc/css/aphront/typeahead.css' => '0e403212',
3333
'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af',
3434
'rsrc/css/application/auth/auth.css' => '0877ed6e',
35-
'rsrc/css/application/base/main-menu-view.css' => '2f670a96',
35+
'rsrc/css/application/base/main-menu-view.css' => 'd00a795a',
3636
'rsrc/css/application/base/notification-menu.css' => 'f31c0bde',
3737
'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601',
38-
'rsrc/css/application/base/phui-theme.css' => '6b451f24',
38+
'rsrc/css/application/base/phui-theme.css' => '981a58f8',
3939
'rsrc/css/application/base/standard-page-view.css' => '7b0d68d8',
4040
'rsrc/css/application/chatlog/chatlog.css' => 'd295b020',
4141
'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4',
@@ -155,7 +155,6 @@
155155
'rsrc/css/phui/phui-workboard-view.css' => '95a54f74',
156156
'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699',
157157
'rsrc/css/sprite-login.css' => '60e8560e',
158-
'rsrc/css/sprite-main-header.css' => 'f07bbb87',
159158
'rsrc/css/sprite-menu.css' => '9dd65b92',
160159
'rsrc/css/sprite-projects.css' => 'e5ad842a',
161160
'rsrc/css/sprite-tokens.css' => '4f399012',
@@ -336,7 +335,6 @@
336335
'rsrc/image/phrequent_inactive.png' => 'bfc15a69',
337336
'rsrc/image/sprite-login-X2.png' => 'e3991e37',
338337
'rsrc/image/sprite-login.png' => '03d5af29',
339-
'rsrc/image/sprite-main-header.png' => '3673af44',
340338
'rsrc/image/sprite-menu-X2.png' => 'cfd8fca5',
341339
'rsrc/image/sprite-menu.png' => 'd7a99faa',
342340
'rsrc/image/sprite-projects-X2.png' => '853552c7',
@@ -753,7 +751,7 @@
753751
'phabricator-hovercard-view-css' => '1239cd52',
754752
'phabricator-keyboard-shortcut' => '1ae869f2',
755753
'phabricator-keyboard-shortcut-manager' => 'c1700f6f',
756-
'phabricator-main-menu-view' => '2f670a96',
754+
'phabricator-main-menu-view' => 'd00a795a',
757755
'phabricator-nav-view-css' => 'a24cb589',
758756
'phabricator-notification' => 'ccf1cbf8',
759757
'phabricator-notification-css' => '9c279160',
@@ -829,7 +827,7 @@
829827
'phui-status-list-view-css' => '888cedb8',
830828
'phui-tag-view-css' => 'e60e227b',
831829
'phui-text-css' => 'cf019f54',
832-
'phui-theme-css' => '6b451f24',
830+
'phui-theme-css' => '981a58f8',
833831
'phui-timeline-view-css' => '2efceff8',
834832
'phui-two-column-view-css' => '39ecafb1',
835833
'phui-workboard-view-css' => '95a54f74',
@@ -853,7 +851,6 @@
853851
'releeph-request-typeahead-css' => '667a48ae',
854852
'setup-issue-css' => 'db7e9c40',
855853
'sprite-login-css' => '60e8560e',
856-
'sprite-main-header-css' => 'f07bbb87',
857854
'sprite-menu-css' => '9dd65b92',
858855
'sprite-projects-css' => 'e5ad842a',
859856
'sprite-tokens-css' => '4f399012',
@@ -1054,9 +1051,6 @@
10541051
'javelin-install',
10551052
'javelin-event',
10561053
),
1057-
'2f670a96' => array(
1058-
'phui-theme-css',
1059-
),
10601054
'327a00d1' => array(
10611055
'javelin-behavior',
10621056
'javelin-stratcom',
@@ -1852,6 +1846,9 @@
18521846
'javelin-workflow',
18531847
'phabricator-drag-and-drop-file-upload',
18541848
),
1849+
'd00a795a' => array(
1850+
'phui-theme-css',
1851+
),
18551852
'd19198c8' => array(
18561853
'javelin-install',
18571854
'javelin-dom',
-174 Bytes
Binary file not shown.
-1.16 KB
Binary file not shown.

‎resources/sprite/main_header/blue.png

-401 Bytes
Binary file not shown.

‎resources/sprite/main_header/dark.png

-423 Bytes
Binary file not shown.
-171 Bytes
Binary file not shown.
-432 Bytes
Binary file not shown.
-943 Bytes
Binary file not shown.
-1.01 KB
Binary file not shown.
-269 Bytes
Binary file not shown.

‎resources/sprite/main_header/red.png

-406 Bytes
Binary file not shown.
-153 Bytes
Binary file not shown.
-421 Bytes
Binary file not shown.

‎resources/sprite/manifest/main-header.json

-70
This file was deleted.

‎scripts/celerity/generate_sprites.php

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
$sheets = array(
3030
'menu' => $generator->buildMenuSheet(),
3131
'tokens' => $generator->buildTokenSheet(),
32-
'main-header' => $generator->buildMainHeaderSheet(),
3332
'login' => $generator->buildLoginSheet(),
3433
'projects' => $generator->buildProjectsSheet(),
3534
);

‎src/applications/celerity/CeleritySpriteGenerator.php

-27
Original file line numberDiff line numberDiff line change
@@ -150,33 +150,6 @@ public function buildLoginSheet() {
150150
return $sheet;
151151
}
152152

153-
public function buildMainHeaderSheet() {
154-
$gradients = $this->getDirectoryList('main_header');
155-
$template = new PhutilSprite();
156-
157-
$sprites = array();
158-
foreach ($gradients as $gradient) {
159-
$path = $this->getPath('main_header/'.$gradient.'.png');
160-
$sprite = id(clone $template)
161-
->setName('main-header-'.$gradient)
162-
->setSourceFile($path)
163-
->setTargetCSS('.phui-theme-'.$gradient.
164-
' .phabricator-main-menu-background');
165-
$sprite->setSourceSize(6, 44);
166-
$sprites[] = $sprite;
167-
}
168-
169-
$sheet = $this->buildSheet('main-header',
170-
false,
171-
PhutilSpriteSheet::TYPE_REPEAT_X);
172-
173-
foreach ($sprites as $sprite) {
174-
$sheet->addSprite($sprite);
175-
}
176-
177-
return $sheet;
178-
}
179-
180153
private function getPath($to_path = null) {
181154
$root = dirname(phutil_get_library_root('phabricator'));
182155
return $root.'/resources/sprite/'.$to_path;

‎src/applications/config/option/PhabricatorUIConfigOptions.php

+9-6
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ public function getGroup() {
2020
}
2121

2222
public function getOptions() {
23-
$manifest = PHUIIconView::getSheetManifest('main-header');
2423
$custom_header_example =
2524
PhabricatorCustomHeaderConfigType::getExampleConfig();
2625
$experimental_link = 'https://secure.phabricator.com/T4214';
27-
$options = array();
28-
foreach (array_keys($manifest) as $sprite_name) {
29-
$key = substr($sprite_name, strlen('main-header-'));
30-
$options[$key] = $key;
31-
}
26+
$options = array(
27+
'blindigo' => 'blindigo',
28+
'light' => 'light',
29+
'red' => 'red',
30+
'blue' => 'blue',
31+
'green' => 'green',
32+
'indigo' => 'indigo',
33+
'dark' => 'dark',
34+
);
3235

3336
$example = <<<EOJSON
3437
[

‎src/view/page/menu/PhabricatorMainMenuView.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public function render() {
2727
$user = $this->user;
2828

2929
require_celerity_resource('phabricator-main-menu-view');
30-
require_celerity_resource('sprite-main-header-css');
3130

3231
$header_id = celerity_generate_unique_node_id();
3332
$menu_bar = array();
@@ -137,7 +136,7 @@ public function render() {
137136

138137
$application_menu = $this->renderApplicationMenu($bar_items);
139138
$classes = array();
140-
$classes[] = 'phabricator-main-menu sprite-main-header';
139+
$classes[] = 'phabricator-main-menu';
141140
$classes[] = 'phabricator-main-menu-background';
142141

143142
return phutil_tag(

‎webroot/rsrc/css/application/base/main-menu-view.css

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616
}
1717

1818
.phabricator-main-menu-background {
19-
min-height: 43px;
20-
background-color: #ebecee;
21-
border-bottom: 1px solid rgba(0,0,0,.1);
19+
min-height: 44px;
2220
}
2321

2422
.device-desktop .phabricator-main-menu {
25-
height: 43px;
23+
height: 44px;
2624
padding-right: 4px;
2725
}
2826

‎webroot/rsrc/css/application/base/phui-theme.css

+30-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,39 @@
22
* @provides phui-theme-css
33
*/
44

5-
.phui-theme-light button.phabricator-main-menu-search-dropdown .caret:before {
5+
/*--- Base Colors ------------------------------------------------------------*/
6+
7+
.phui-theme-blindigo .phabricator-main-menu-background {
8+
background: #41506e;
9+
}
10+
11+
.phui-theme-dark .phabricator-main-menu-background {
12+
background: #171c20;
13+
}
14+
15+
.phui-theme-indigo .phabricator-main-menu-background {
16+
background: #4a2b85;
17+
}
18+
19+
.phui-theme-red .phabricator-main-menu-background {
20+
background: #650404;
21+
}
22+
23+
.phui-theme-blue .phabricator-main-menu-background {
24+
background: #004377;
25+
}
26+
27+
.phui-theme-green .phabricator-main-menu-background {
28+
background: #124A1B;
29+
}
30+
31+
/*--- Light Colors -----------------------------------------------------------*/
32+
33+
.phui-theme-light button.phabricator-main-menu-search-dropdown .caret:before {
634
color: {$lightbluetext};
735
}
836

9-
.phui-theme-light .phabricator-main-menu-search
37+
.phui-theme-light .phabricator-main-menu-search
1038
button.phabricator-main-menu-search-dropdown .phui-icon-view {
1139
color: {$lightbluetext};
1240
text-shadow: {$whitetextshadow};

‎webroot/rsrc/css/sprite-main-header.css

-60
This file was deleted.
-1.97 KB
Binary file not shown.

0 commit comments

Comments
 (0)
Failed to load comments.