Skip to content

Commit 41ef682

Browse files
committed
Make ObjectItem default as "Card"
Summary: This went smoother than expeced. Makes the rounded Card the default, also tweaked selected state a little. Test Plan: Test UIExamples, Maniphest, Home, Differential, Harbormaster, Audit. Everything seems normal {F163971} {F163973} Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9408
1 parent 3219039 commit 41ef682

20 files changed

+22
-72
lines changed

resources/celerity/map.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
return array(
88
'names' =>
99
array(
10-
'core.pkg.css' => '73e14ee6',
10+
'core.pkg.css' => '703a28a5',
1111
'core.pkg.js' => '9c9c8442',
1212
'darkconsole.pkg.js' => 'ca8671ce',
1313
'differential.pkg.css' => '4a93db37',
@@ -135,7 +135,7 @@
135135
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
136136
'rsrc/css/phui/phui-list.css' => '43ed2d93',
137137
'rsrc/css/phui/phui-object-box.css' => 'ce92d8ec',
138-
'rsrc/css/phui/phui-object-item-list-view.css' => '31d6da4e',
138+
'rsrc/css/phui/phui-object-item-list-view.css' => '52a438e2',
139139
'rsrc/css/phui/phui-pinboard-view.css' => '874c22f9',
140140
'rsrc/css/phui/phui-property-list-view.css' => '2f7199e8',
141141
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
@@ -762,7 +762,7 @@
762762
'phui-info-panel-css' => '27ea50a1',
763763
'phui-list-view-css' => '43ed2d93',
764764
'phui-object-box-css' => 'ce92d8ec',
765-
'phui-object-item-list-view-css' => '31d6da4e',
765+
'phui-object-item-list-view-css' => '52a438e2',
766766
'phui-pinboard-view-css' => '874c22f9',
767767
'phui-property-list-view-css' => '2f7199e8',
768768
'phui-remarkup-preview-css' => '19ad512b',

src/applications/audit/view/PhabricatorAuditListView.php

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ public function buildList() {
103103
$rowc = array();
104104

105105
$list = new PHUIObjectItemListView();
106-
$list->setCards(true);
107106
foreach ($this->commits as $commit) {
108107
$commit_phid = $commit->getPHID();
109108
$commit_handle = $this->getHandle($commit_phid);

src/applications/config/controller/PhabricatorConfigIssueListController.php

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public function processRequest() {
4545
private function buildIssueList(array $issues) {
4646
assert_instances_of($issues, 'PhabricatorSetupIssue');
4747
$list = new PHUIObjectItemListView();
48-
$list->setCards(true);
4948
$ignored_items = array();
5049

5150
foreach ($issues as $issue) {

src/applications/daemon/view/PhabricatorDaemonLogListView.php

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public function render() {
1818
}
1919

2020
$list = id(new PHUIObjectItemListView())
21-
->setCards(true)
2221
->setFlush(true);
2322
foreach ($this->daemonLogs as $log) {
2423
$id = $log->getID();

src/applications/differential/view/DifferentialRevisionListView.php

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public function render() {
7575
$this->requireResource('aphront-tooltip-css');
7676

7777
$list = new PHUIObjectItemListView();
78-
$list->setCards(true);
7978

8079
foreach ($this->revisions as $revision) {
8180
$item = id(new PHUIObjectItemView())

src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php

-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ protected function renderResultList(
185185
$viewer = $this->requireViewer();
186186

187187
$list = new PHUIObjectItemListView();
188-
$list->setCards(true);
189188
foreach ($buildables as $buildable) {
190189
$id = $buildable->getID();
191190

src/applications/herald/query/HeraldRuleSearchEngine.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ protected function renderResultList(
173173
$content_type_map = HeraldAdapter::getEnabledAdapterMap($viewer);
174174

175175
$list = id(new PHUIObjectItemListView())
176-
->setUser($viewer)
177-
->setCards(true);
176+
->setUser($viewer);
178177
foreach ($rules as $rule) {
179178
$id = $rule->getID();
180179

src/applications/herald/query/HeraldTranscriptSearchEngine.php

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ protected function renderResultList(
108108
$viewer = $this->requireViewer();
109109

110110
$list = new PHUIObjectItemListView();
111-
$list->setCards(true);
112111
foreach ($transcripts as $xscript) {
113112
$view_href = phutil_tag(
114113
'a',

src/applications/herald/view/HeraldRuleEditHistoryView.php

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public function setHandles(array $handles) {
2323
public function render() {
2424
$list = new PHUIObjectItemListView();
2525
$list->setFlush(true);
26-
$list->setCards(true);
2726

2827
foreach ($this->edits as $edit) {
2928
$name = nonempty($edit->getRuleName(), 'Unknown Rule');

src/applications/home/controller/PhabricatorHomeQuickCreateController.php

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public function processRequest() {
99
$items = $this->getCurrentApplication()->loadAllQuickCreateItems($viewer);
1010

1111
$list = id(new PHUIObjectItemListView())
12-
->setCards(true)
1312
->setUser($viewer);
1413

1514
foreach ($items as $item) {

src/applications/maniphest/view/ManiphestTaskListView.php

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public function render() {
3636
$handles = $this->handles;
3737

3838
$list = new PHUIObjectItemListView();
39-
$list->setCards(true);
4039
$list->setFlush(true);
4140

4241
$status_map = ManiphestTaskStatus::getTaskStatusMap();

src/applications/phriction/controller/PhrictionDiffController.php

-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ private function renderComparisonTable(array $content) {
260260
$handles = $this->loadViewerHandles($phids);
261261

262262
$list = new PHUIObjectItemListView();
263-
$list->setCards(true);
264263
$list->setFlush(true);
265264

266265
$first = true;

src/applications/phriction/controller/PhrictionHistoryController.php

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public function processRequest() {
4040
$handles = $this->loadViewerHandles($author_phids);
4141

4242
$list = new PHUIObjectItemListView();
43-
$list->setCards(true);
4443
$list->setFlush(true);
4544

4645
foreach ($history as $content) {

src/applications/project/controller/PhabricatorProjectBoardViewController.php

-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ public function processRequest() {
173173

174174
$cards = id(new PHUIObjectItemListView())
175175
->setUser($viewer)
176-
->setCards(true)
177176
->setFlush(true)
178177
->setAllowEmptyList(true)
179178
->addSigil('project-column')

src/applications/repository/query/PhabricatorRepositorySearchEngine.php

-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ protected function renderResultList(
234234
$viewer = $this->requireViewer();;
235235

236236
$list = new PHUIObjectItemListView();
237-
$list->setCards(true);
238237
foreach ($repositories as $repository) {
239238
$id = $repository->getID();
240239

src/applications/settings/panel/PhabricatorSettingsPanelExternalAccounts.php

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public function processRequest(AphrontRequest $request) {
3535

3636
$linked = id(new PHUIObjectItemListView())
3737
->setUser($viewer)
38-
->setCards(true)
3938
->setFlush(true)
4039
->setNoDataString(pht('You have no linked accounts.'));
4140

@@ -99,7 +98,6 @@ public function processRequest(AphrontRequest $request) {
9998

10099
$linkable = id(new PHUIObjectItemListView())
101100
->setUser($viewer)
102-
->setCards(true)
103101
->setFlush(true)
104102
->setNoDataString(
105103
pht('Your account is linked with all available providers.'));

src/applications/uiexample/examples/PHUIObjectItemListExample.php

-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public function renderExample() {
113113
$head = id(new PHUIHeaderView())
114114
->setHeader(pht('Card List'));
115115
$list = new PHUIObjectItemListView();
116-
$list->setCards(true);
117116

118117
$list->addItem(
119118
id(new PHUIObjectItemView())
@@ -161,7 +160,6 @@ public function renderExample() {
161160
$head = id(new PHUIHeaderView())
162161
->setHeader(pht('Grippable List'));
163162
$list = new PHUIObjectItemListView();
164-
$list->setCards(true);
165163

166164
$list->addItem(
167165
id(new PHUIObjectItemView())

src/applications/uiexample/examples/PHUIWorkboardExample.php

-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ public function renderExample() {
1515
/* List 1 */
1616

1717
$list = new PHUIObjectItemListView();
18-
$list->setCards(true);
1918
$list->setFlush(true);
2019

2120
$list->addItem(
@@ -43,7 +42,6 @@ public function renderExample() {
4342
/* List 2 */
4443

4544
$list2 = new PHUIObjectItemListView();
46-
$list2->setCards(true);
4745
$list2->setFlush(true);
4846

4947
$list2->addItem(
@@ -58,7 +56,6 @@ public function renderExample() {
5856
/* List 3 */
5957

6058
$list3 = new PHUIObjectItemListView();
61-
$list3->setCards(true);
6259
$list3->setFlush(true);
6360

6461
$list3->addItem(
@@ -100,7 +97,6 @@ public function renderExample() {
10097
->setBarColor('orange'));
10198

10299
$panel = id(new PHUIWorkpanelView())
103-
->setCards($list)
104100
->setHeader('Business Stuff')
105101
->setFooterAction(
106102
id(new PHUIListItemView())
@@ -109,11 +105,9 @@ public function renderExample() {
109105
->setHref('/maniphest/task/create/'));
110106

111107
$panel2 = id(new PHUIWorkpanelView())
112-
->setCards($list2)
113108
->setHeader('Under Duress');
114109

115110
$panel3 = id(new PHUIWorkpanelView())
116-
->setCards($list3)
117111
->setHeader('Spicy Thai Chicken');
118112

119113
$board = id(new PHUIWorkboardView())

src/view/phui/PHUIObjectItemListView.php

+1-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ final class PHUIObjectItemListView extends AphrontTagView {
66
private $items;
77
private $pager;
88
private $stackable;
9-
private $cards;
109
private $noDataString;
1110
private $flush;
1211
private $plain;
@@ -58,11 +57,6 @@ public function setStackable($stackable) {
5857
return $this;
5958
}
6059

61-
public function setCards($cards) {
62-
$this->cards = $cards;
63-
return $this;
64-
}
65-
6660
public function setStates($states) {
6761
$this->states = $states;
6862
return $this;
@@ -79,11 +73,9 @@ protected function getTagAttributes() {
7973
if ($this->stackable) {
8074
$classes[] = 'phui-object-list-stackable';
8175
}
82-
if ($this->cards) {
83-
$classes[] = 'phui-object-list-cards';
84-
}
8576
if ($this->states) {
8677
$classes[] = 'phui-object-list-states';
78+
$classes[] = 'phui-object-list-stackable';
8779
}
8880
if ($this->flush) {
8981
$classes[] = 'phui-object-list-flush';

webroot/rsrc/css/phui/phui-object-item-list-view.css

+17-35
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@
3434
}
3535

3636
.phui-object-item {
37-
background: #fff;
3837
border-style: solid;
3938
border-color: {$lightgreyborder};
40-
border-width: 0 0 0 4px;
4139
margin: 5px 0;
4240
overflow: hidden;
41+
border-radius: 3px;
42+
border-left-width: 6px;
43+
background: #f0f0f0 url('/rsrc/image/texture/card-gradient.png') repeat-x;
44+
margin-bottom: 4px;
4345
}
4446

4547
.phui-object-item .phui-icon-view {
@@ -54,9 +56,6 @@
5456
position: relative;
5557
min-height: 29px;
5658
overflow: hidden;
57-
}
58-
59-
.phui-object-list-cards .phui-object-item-frame {
6059
border-bottom-right-radius: 3px;
6160
border-top-right-radius: 3px;
6261
}
@@ -187,10 +186,16 @@
187186
.phui-object-item-list-view.phui-object-list-stackable
188187
.phui-object-item {
189188
margin: -1px 0 0 0;
189+
border-radius: 0;
190+
border-left-width: 1px;
191+
background: #fff;
192+
}
193+
194+
.phui-object-list-stackable .phui-object-item-frame {
195+
border-radius: 0;
190196
}
191197

192198
.phui-object-list-stackable .phui-object-item {
193-
border-left-width: 1px;
194199
}
195200

196201
.device-desktop .phui-object-list-stackable
@@ -435,14 +440,18 @@
435440
background: {$lightyellow};
436441
}
437442

438-
.phui-object-list-cards
439-
.phui-object-item.phui-object-item-highlighted {
443+
.phui-object-item.phui-object-item-highlighted {
440444
background-image: linear-gradient(to bottom, rgb(253, 255, 221), rgb(243, 245, 206));
441445
background-image: -webkit-linear-gradient(top, rgb(253, 255, 221), rgb(243, 245, 206));
442446
}
443447

444448
.phui-object-item-selected {
445449
background: {$lightblue};
450+
border-left-color: {$blue};
451+
}
452+
453+
.phui-object-item-selected .phui-object-item-frame {
454+
border-color: {$blue};
446455
}
447456

448457

@@ -531,33 +540,6 @@
531540
font-size: 13px;
532541
}
533542

534-
/* - Card List -----------------------------------------------------------------
535-
536-
Rounded card list.
537-
538-
*/
539-
540-
/* Hard to sprite since we can't have other sprites appearing in tall cells */
541-
.phui-object-list-cards .phui-object-item {
542-
border-radius: 3px;
543-
border-left-width: 6px;
544-
background: #f0f0f0 url('/rsrc/image/texture/card-gradient.png') repeat-x;
545-
margin-bottom: 4px;
546-
}
547-
548-
.phui-object-list-cards .phui-object-item-frame {
549-
min-height: 50px;
550-
}
551-
552-
.phui-object-list-cards .phui-object-item-selected {
553-
background: #bfdcff;
554-
}
555-
556-
.phui-object-list-cards .phui-object-item-selected
557-
.phui-object-item-frame {
558-
border-color: #99ccff;
559-
}
560-
561543

562544
/* - Draggable List ------------------------------------------------------------
563545

0 commit comments

Comments
 (0)