Skip to content

Commit 7a6684b

Browse files
committed
Make default and hidden columns in Workboards more clear
Summary: Fixes T6469. Changes the default icon into text instead. Added the text to hidden boards and now display when reordering as well. Test Plan: Moved a bunch of columns, tested reordering. Seems more clear. {F229626} {F229627} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6469 Differential Revision: https://secure.phabricator.com/D10784
1 parent 5b490e9 commit 7a6684b

8 files changed

+54
-12
lines changed

resources/celerity/map.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
return array(
99
'names' => array(
10-
'core.pkg.css' => '74d50c3d',
10+
'core.pkg.css' => '810e8b13',
1111
'core.pkg.js' => 'cbdbd552',
1212
'darkconsole.pkg.js' => 'df001cab',
1313
'differential.pkg.css' => '8af45893',
@@ -110,7 +110,6 @@
110110
'rsrc/css/font/font-awesome.css' => '327559dd',
111111
'rsrc/css/font/font-source-sans-pro.css' => '91d53463',
112112
'rsrc/css/font/phui-font-icon-base.css' => '3dad2ae3',
113-
'rsrc/css/layout/phabricator-action-header-view.css' => '83e2cc86',
114113
'rsrc/css/layout/phabricator-crumbs-view.css' => 'a49339de',
115114
'rsrc/css/layout/phabricator-filetree-view.css' => 'fccf9f82',
116115
'rsrc/css/layout/phabricator-hovercard-view.css' => '893f4783',
@@ -120,6 +119,7 @@
120119
'rsrc/css/phui/calendar/phui-calendar-list.css' => 'c1d0ca59',
121120
'rsrc/css/phui/calendar/phui-calendar-month.css' => 'a92e47d2',
122121
'rsrc/css/phui/calendar/phui-calendar.css' => '8675968e',
122+
'rsrc/css/phui/phui-action-header-view.css' => '89c497e7',
123123
'rsrc/css/phui/phui-action-list.css' => '9ee9910a',
124124
'rsrc/css/phui/phui-box.css' => '7b3a2eed',
125125
'rsrc/css/phui/phui-button.css' => 'c7412aa1',
@@ -134,7 +134,7 @@
134134
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
135135
'rsrc/css/phui/phui-list.css' => '43ed2d93',
136136
'rsrc/css/phui/phui-object-box.css' => 'e9f7e938',
137-
'rsrc/css/phui/phui-object-item-list-view.css' => '5053dee8',
137+
'rsrc/css/phui/phui-object-item-list-view.css' => '1f710f4e',
138138
'rsrc/css/phui/phui-pinboard-view.css' => '3dd4a269',
139139
'rsrc/css/phui/phui-property-list-view.css' => '86f9df88',
140140
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
@@ -758,7 +758,7 @@
758758
'phortune-css' => '9149f103',
759759
'phrequent-css' => 'ffc185ad',
760760
'phriction-document-css' => '7d7f0071',
761-
'phui-action-header-view-css' => '83e2cc86',
761+
'phui-action-header-view-css' => '89c497e7',
762762
'phui-box-css' => '7b3a2eed',
763763
'phui-button-css' => 'c7412aa1',
764764
'phui-calendar-css' => '8675968e',
@@ -777,7 +777,7 @@
777777
'phui-info-panel-css' => '27ea50a1',
778778
'phui-list-view-css' => '43ed2d93',
779779
'phui-object-box-css' => 'e9f7e938',
780-
'phui-object-item-list-view-css' => '5053dee8',
780+
'phui-object-item-list-view-css' => '1f710f4e',
781781
'phui-pinboard-view-css' => '3dd4a269',
782782
'phui-property-list-view-css' => '86f9df88',
783783
'phui-remarkup-preview-css' => '19ad512b',

src/applications/project/controller/PhabricatorProjectBoardReorderController.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ public function processRequest() {
107107

108108
foreach ($columns as $column) {
109109
$item = id(new PHUIObjectItemView())
110-
->setHeader($column->getDisplayName());
110+
->setHeader($column->getDisplayName())
111+
->addIcon('none', $column->getDisplayType());
111112

112113
if ($column->isHidden()) {
113114
$item->setDisabled(true);

src/applications/project/controller/PhabricatorProjectBoardViewController.php

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

228228
$panel = id(new PHUIWorkpanelView())
229229
->setHeader($column->getDisplayName())
230+
->setSubHeader($column->getDisplayType())
230231
->addSigil('workpanel');
231232

232233
$header_icon = $column->getHeaderIcon();

src/applications/project/storage/PhabricatorProjectColumn.php

+11-5
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ public function getDisplayName() {
8484
return pht('Unnamed Column');
8585
}
8686

87+
public function getDisplayType() {
88+
if ($this->isDefaultColumn()) {
89+
return pht('(Default)');
90+
}
91+
if ($this->isHidden()) {
92+
return pht('(Hidden)');
93+
}
94+
95+
return null;
96+
}
97+
8798
public function getHeaderIcon() {
8899
$icon = null;
89100

@@ -92,11 +103,6 @@ public function getHeaderIcon() {
92103
$text = pht('Hidden');
93104
}
94105

95-
if ($this->isDefaultColumn()) {
96-
$icon = 'fa-archive';
97-
$text = pht('Default');
98-
}
99-
100106
if ($icon) {
101107
return id(new PHUIIconView())
102108
->setIconFont($icon)

src/view/phui/PHUIActionHeaderView.php

+17
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ final class PHUIActionHeaderView extends AphrontView {
1111
const HEADER_WHITE = 'white';
1212

1313
private $headerTitle;
14+
private $headerSubtitle;
1415
private $headerHref;
1516
private $headerIcon;
1617
private $headerSigils = array();
@@ -39,6 +40,11 @@ public function setHeaderTitle($header) {
3940
return $this;
4041
}
4142

43+
public function setHeaderSubtitle($subtitle) {
44+
$this->headerSubtitle = $subtitle;
45+
return $this;
46+
}
47+
4248
public function setHeaderHref($href) {
4349
$this->headerHref = $href;
4450
return $this;
@@ -131,6 +137,16 @@ public function render() {
131137
$this->headerTitle);
132138
}
133139

140+
$header_subtitle = null;
141+
if ($this->headerSubtitle) {
142+
$header_subtitle = phutil_tag(
143+
'span',
144+
array(
145+
'class' => 'phui-action-header-subtitle',
146+
),
147+
$this->headerSubtitle);
148+
}
149+
134150
$header = phutil_tag(
135151
'h3',
136152
array(
@@ -139,6 +155,7 @@ public function render() {
139155
array(
140156
$header_icon,
141157
$header_title,
158+
$header_subtitle,
142159
));
143160

144161
$icons = '';

src/view/phui/PHUIWorkpanelView.php

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ final class PHUIWorkpanelView extends AphrontTagView {
44

55
private $cards = array();
66
private $header;
7+
private $subheader = null;
78
private $footerAction;
89
private $headerColor = PHUIActionHeaderView::HEADER_GREY;
910
private $headerActions = array();
@@ -29,6 +30,11 @@ public function setHeader($header) {
2930
return $this;
3031
}
3132

33+
public function setSubheader($subheader) {
34+
$this->subheader = $subheader;
35+
return $this;
36+
}
37+
3238
public function setFooterAction(PHUIListItemView $footer_action) {
3339
$this->footerAction = $footer_action;
3440
return $this;
@@ -73,6 +79,7 @@ public function getTagContent() {
7379

7480
$header = id(new PHUIActionHeaderView())
7581
->setHeaderTitle($this->header)
82+
->setHeaderSubtitle($this->subheader)
7683
->setHeaderColor($this->headerColor);
7784

7885
if ($this->headerIcon) {

webroot/rsrc/css/layout/phabricator-action-header-view.css renamed to webroot/rsrc/css/phui/phui-action-header-view.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,19 @@
7272
font-weight: normal;
7373
}
7474

75-
.phui-action-header-title span {
75+
.phui-action-header-title .phui-icon-view {
7676
float: left;
7777
height: 16px;
7878
width: 16px;
7979
margin-right: 4px;
8080
}
8181

82+
.phui-action-header-title .phui-action-header-subtitle {
83+
margin-left: 4px;
84+
font-weight: normal;
85+
color: {$lightgreytext};
86+
}
87+
8288
/* - Dashboards ------------------------------------------------------------ */
8389

8490
.dashboard-panel .phui-action-header.gradient-grey-header,

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

+4
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@
271271
padding: 0 10px;
272272
}
273273

274+
ul.phui-object-item-icons {
275+
margin: 0;
276+
}
277+
274278
/* NOTE: The main content is an "overflow: hidden" div which we give a right
275279
margin so it doesn't overlap the icons. The margin is slightly larger than
276280
the width + padding of the icon div, so the icons have some space even if

0 commit comments

Comments
 (0)