Skip to content

Commit b6df427

Browse files
author
epriestley
committed
Add a "disabled" style
Summary: Fixes T3525. This feels way better, although it's still a little hard for me to pick out of lists with otherwise default-colored items. Test Plan: {F49910} {F49911} Reviewers: chad Reviewed By: chad CC: aran Maniphest Tasks: T3525 Differential Revision: https://secure.phabricator.com/D6435
1 parent a9690a8 commit b6df427

File tree

7 files changed

+93
-46
lines changed

7 files changed

+93
-46
lines changed

src/__celerity_resource_map__.php

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3334,7 +3334,7 @@
33343334
),
33353335
'phabricator-object-item-list-view-css' =>
33363336
array(
3337-
'uri' => '/res/fa3c7eb1/rsrc/css/layout/phabricator-object-item-list-view.css',
3337+
'uri' => '/res/a3e45d8a/rsrc/css/layout/phabricator-object-item-list-view.css',
33383338
'type' => 'css',
33393339
'requires' =>
33403340
array(
@@ -4149,7 +4149,7 @@
41494149
), array(
41504150
'packages' =>
41514151
array(
4152-
'6e2d527c' =>
4152+
'c01cebae' =>
41534153
array(
41544154
'name' => 'core.pkg.css',
41554155
'symbols' =>
@@ -4197,7 +4197,7 @@
41974197
40 => 'phabricator-property-list-view-css',
41984198
41 => 'phabricator-tag-view-css',
41994199
),
4200-
'uri' => '/res/pkg/6e2d527c/core.pkg.css',
4200+
'uri' => '/res/pkg/c01cebae/core.pkg.css',
42014201
'type' => 'css',
42024202
),
42034203
'75ccea43' =>
@@ -4391,16 +4391,16 @@
43914391
'reverse' =>
43924392
array(
43934393
'aphront-attached-file-view-css' => 'adc3c36d',
4394-
'aphront-dialog-view-css' => '6e2d527c',
4395-
'aphront-error-view-css' => '6e2d527c',
4396-
'aphront-form-view-css' => '6e2d527c',
4397-
'aphront-list-filter-view-css' => '6e2d527c',
4398-
'aphront-pager-view-css' => '6e2d527c',
4399-
'aphront-panel-view-css' => '6e2d527c',
4400-
'aphront-table-view-css' => '6e2d527c',
4401-
'aphront-tokenizer-control-css' => '6e2d527c',
4402-
'aphront-tooltip-css' => '6e2d527c',
4403-
'aphront-typeahead-control-css' => '6e2d527c',
4394+
'aphront-dialog-view-css' => 'c01cebae',
4395+
'aphront-error-view-css' => 'c01cebae',
4396+
'aphront-form-view-css' => 'c01cebae',
4397+
'aphront-list-filter-view-css' => 'c01cebae',
4398+
'aphront-pager-view-css' => 'c01cebae',
4399+
'aphront-panel-view-css' => 'c01cebae',
4400+
'aphront-table-view-css' => 'c01cebae',
4401+
'aphront-tokenizer-control-css' => 'c01cebae',
4402+
'aphront-tooltip-css' => 'c01cebae',
4403+
'aphront-typeahead-control-css' => 'c01cebae',
44044404
'differential-changeset-view-css' => 'dd27a69b',
44054405
'differential-core-view-css' => 'dd27a69b',
44064406
'differential-inline-comment-editor' => '504ca7d2',
@@ -4414,7 +4414,7 @@
44144414
'differential-table-of-contents-css' => 'dd27a69b',
44154415
'diffusion-commit-view-css' => 'c8ce2d88',
44164416
'diffusion-icons-css' => 'c8ce2d88',
4417-
'global-drag-and-drop-css' => '6e2d527c',
4417+
'global-drag-and-drop-css' => 'c01cebae',
44184418
'inline-comment-summary-css' => 'dd27a69b',
44194419
'javelin-aphlict' => '75ccea43',
44204420
'javelin-behavior' => 'a9f14d76',
@@ -4488,55 +4488,55 @@
44884488
'javelin-util' => 'a9f14d76',
44894489
'javelin-vector' => 'a9f14d76',
44904490
'javelin-workflow' => 'a9f14d76',
4491-
'lightbox-attachment-css' => '6e2d527c',
4491+
'lightbox-attachment-css' => 'c01cebae',
44924492
'maniphest-task-summary-css' => 'adc3c36d',
44934493
'maniphest-transaction-detail-css' => 'adc3c36d',
4494-
'phabricator-action-list-view-css' => '6e2d527c',
4495-
'phabricator-application-launch-view-css' => '6e2d527c',
4494+
'phabricator-action-list-view-css' => 'c01cebae',
4495+
'phabricator-application-launch-view-css' => 'c01cebae',
44964496
'phabricator-busy' => '75ccea43',
44974497
'phabricator-content-source-view-css' => 'dd27a69b',
4498-
'phabricator-core-css' => '6e2d527c',
4499-
'phabricator-crumbs-view-css' => '6e2d527c',
4498+
'phabricator-core-css' => 'c01cebae',
4499+
'phabricator-crumbs-view-css' => 'c01cebae',
45004500
'phabricator-drag-and-drop-file-upload' => '504ca7d2',
45014501
'phabricator-dropdown-menu' => '75ccea43',
45024502
'phabricator-file-upload' => '75ccea43',
4503-
'phabricator-filetree-view-css' => '6e2d527c',
4504-
'phabricator-flag-css' => '6e2d527c',
4505-
'phabricator-form-view-css' => '6e2d527c',
4506-
'phabricator-header-view-css' => '6e2d527c',
4503+
'phabricator-filetree-view-css' => 'c01cebae',
4504+
'phabricator-flag-css' => 'c01cebae',
4505+
'phabricator-form-view-css' => 'c01cebae',
4506+
'phabricator-header-view-css' => 'c01cebae',
45074507
'phabricator-hovercard' => '75ccea43',
4508-
'phabricator-jump-nav' => '6e2d527c',
4508+
'phabricator-jump-nav' => 'c01cebae',
45094509
'phabricator-keyboard-shortcut' => '75ccea43',
45104510
'phabricator-keyboard-shortcut-manager' => '75ccea43',
4511-
'phabricator-main-menu-view' => '6e2d527c',
4511+
'phabricator-main-menu-view' => 'c01cebae',
45124512
'phabricator-menu-item' => '75ccea43',
4513-
'phabricator-nav-view-css' => '6e2d527c',
4513+
'phabricator-nav-view-css' => 'c01cebae',
45144514
'phabricator-notification' => '75ccea43',
4515-
'phabricator-notification-css' => '6e2d527c',
4516-
'phabricator-notification-menu-css' => '6e2d527c',
4517-
'phabricator-object-item-list-view-css' => '6e2d527c',
4515+
'phabricator-notification-css' => 'c01cebae',
4516+
'phabricator-notification-menu-css' => 'c01cebae',
4517+
'phabricator-object-item-list-view-css' => 'c01cebae',
45184518
'phabricator-object-selector-css' => 'dd27a69b',
45194519
'phabricator-phtize' => '75ccea43',
45204520
'phabricator-prefab' => '75ccea43',
45214521
'phabricator-project-tag-css' => 'adc3c36d',
4522-
'phabricator-property-list-view-css' => '6e2d527c',
4523-
'phabricator-remarkup-css' => '6e2d527c',
4522+
'phabricator-property-list-view-css' => 'c01cebae',
4523+
'phabricator-remarkup-css' => 'c01cebae',
45244524
'phabricator-shaped-request' => '504ca7d2',
4525-
'phabricator-side-menu-view-css' => '6e2d527c',
4526-
'phabricator-standard-page-view' => '6e2d527c',
4527-
'phabricator-tag-view-css' => '6e2d527c',
4525+
'phabricator-side-menu-view-css' => 'c01cebae',
4526+
'phabricator-standard-page-view' => 'c01cebae',
4527+
'phabricator-tag-view-css' => 'c01cebae',
45284528
'phabricator-textareautils' => '75ccea43',
45294529
'phabricator-tooltip' => '75ccea43',
4530-
'phabricator-transaction-view-css' => '6e2d527c',
4531-
'phabricator-zindex-css' => '6e2d527c',
4532-
'phui-button-css' => '6e2d527c',
4533-
'phui-form-css' => '6e2d527c',
4534-
'phui-icon-view-css' => '6e2d527c',
4535-
'phui-spacing-css' => '6e2d527c',
4536-
'sprite-apps-large-css' => '6e2d527c',
4537-
'sprite-gradient-css' => '6e2d527c',
4538-
'sprite-icons-css' => '6e2d527c',
4539-
'sprite-menu-css' => '6e2d527c',
4540-
'syntax-highlighting-css' => '6e2d527c',
4530+
'phabricator-transaction-view-css' => 'c01cebae',
4531+
'phabricator-zindex-css' => 'c01cebae',
4532+
'phui-button-css' => 'c01cebae',
4533+
'phui-form-css' => 'c01cebae',
4534+
'phui-icon-view-css' => 'c01cebae',
4535+
'phui-spacing-css' => 'c01cebae',
4536+
'sprite-apps-large-css' => 'c01cebae',
4537+
'sprite-gradient-css' => 'c01cebae',
4538+
'sprite-icons-css' => 'c01cebae',
4539+
'sprite-menu-css' => 'c01cebae',
4540+
'syntax-highlighting-css' => 'c01cebae',
45414541
),
45424542
));

src/applications/config/controller/PhabricatorConfigIssueListController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ private function buildIssueList(array $issues) {
6868
$list->addItem($item);
6969
} else {
7070
$item->addIcon('none', pht('Ignored'));
71+
$item->setDisabled(true);
7172
$item->addAction(
7273
id(new PHUIListItemView())
7374
->setIcon('preview')

src/applications/search/controller/PhabricatorApplicationSearchController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ private function processEditRequest() {
262262
if ($named_query->getIsBuiltin()) {
263263
if ($named_query->getIsDisabled()) {
264264
$item->addIcon('delete-grey', pht('Disabled'));
265+
$item->setDisabled(true);
265266
} else {
266267
$item->addIcon('lock-grey', pht('Builtin'));
267268
}
268-
$item->setBarColor('grey');
269269
} else {
270270
$item->addAction(
271271
id(new PHUIListItemView())

src/applications/uiexample/examples/PhabricatorObjectItemListExample.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ public function renderExample() {
172172
->addAction(
173173
id(new PHUIListItemView())
174174
->setHref('#')
175+
->setName(pht('Moo'))
175176
->setIcon('edit')));
176177

177178
$list->addItem(
@@ -182,10 +183,12 @@ public function renderExample() {
182183
->addAction(
183184
id(new PHUIListItemView())
184185
->setHref('#')
186+
->setName(pht('Quack'))
185187
->setIcon('edit'))
186188
->addAction(
187189
id(new PHUIListItemView())
188190
->setHref('#')
191+
->setName(pht('Oink'))
189192
->setIcon('delete')));
190193

191194
$out[] = array($head, $list);
@@ -243,21 +246,31 @@ public function renderExample() {
243246

244247
$list->addItem(
245248
id(new PhabricatorObjectItemView())
249+
->setObjectName('X1')
246250
->setHeader(pht('Normal'))
247251
->setHref('#'));
248252

249253
$list->addItem(
250254
id(new PhabricatorObjectItemView())
255+
->setObjectName('X2')
251256
->setHeader(pht('Highlighted'))
252257
->setEffect('highlighted')
253258
->setHref('#'));
254259

255260
$list->addItem(
256261
id(new PhabricatorObjectItemView())
262+
->setObjectName('X3')
257263
->setHeader(pht('Selected'))
258264
->setEffect('selected')
259265
->setHref('#'));
260266

267+
$list->addItem(
268+
id(new PhabricatorObjectItemView())
269+
->setObjectName('X4')
270+
->setHeader(pht('Disabled'))
271+
->setDisabled(true)
272+
->setHref('#'));
273+
261274
$out[] = array($head, $list);
262275

263276

src/infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public function renderControl(
7373
}
7474

7575
$disabled_item->addIcon('none', pht('Disabled'));
76+
$disabled_item->setDisabled(true);
7677
$disabled_item->addAction(
7778
id(new PHUIListItemView())
7879
->setHref('#')

src/view/layout/PhabricatorObjectItemView.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ final class PhabricatorObjectItemView extends AphrontTagView {
1717
private $grippable;
1818
private $actions = array();
1919
private $headIcons = array();
20+
private $disabled;
21+
22+
public function setDisabled($disabled) {
23+
$this->disabled = $disabled;
24+
return $this;
25+
}
26+
27+
public function getDisabled() {
28+
return $this->disabled;
29+
}
2030

2131
public function addHeadIcon($icon) {
2232
$this->headIcons[] = $icon;
@@ -172,6 +182,10 @@ protected function getTagAttributes() {
172182
$item_classes[] = 'phabricator-object-item-with-'.$n.'-actions';
173183
}
174184

185+
if ($this->disabled) {
186+
$item_classes[] = 'phabricator-object-item-disabled';
187+
}
188+
175189
switch ($this->effect) {
176190
case 'highlighted':
177191
$item_classes[] = 'phabricator-object-item-highlighted';

webroot/rsrc/css/layout/phabricator-object-item-list-view.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,24 @@
358358
border-left-color: #333333;
359359
}
360360

361+
/* - Disabled ------------------------------------------------------------------
362+
363+
Disabled/inactive objects.
364+
365+
*/
366+
367+
.phabricator-object-item-disabled {
368+
border-left-color: #d7d7d7;
369+
}
370+
371+
.phabricator-object-item-disabled .phabricator-object-item-frame {
372+
border-color: #d7d7d7;
373+
}
374+
375+
.phabricator-object-item-disabled .phabricator-object-item-objname {
376+
color: #777777;
377+
}
378+
361379

362380
/* - Effects -------------------------------------------------------------------
363381

0 commit comments

Comments
 (0)