Skip to content

Commit ba7ac39

Browse files
committed
Move people box on project pages
Summary: This removes the people box and adds a members property list item it's place. We may want some show/hide/see all if a project has more than //n// members, but these seems more reasonable than previous layout. Test Plan: Tested a project with and without members, grepped for removed CSS, and tested mobile and desktop layouts. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7870
1 parent 234123b commit ba7ac39

File tree

5 files changed

+74
-208
lines changed

5 files changed

+74
-208
lines changed

src/__celerity_resource_map__.php

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,7 +3504,7 @@
35043504
),
35053505
'phabricator-profile-css' =>
35063506
array(
3507-
'uri' => '/res/c1f72695/rsrc/css/application/profile/profile-view.css',
3507+
'uri' => '/res/ad614d5f/rsrc/css/application/profile/profile-view.css',
35083508
'type' => 'css',
35093509
'requires' =>
35103510
array(
@@ -3965,7 +3965,7 @@
39653965
),
39663966
'phui-object-item-list-view-css' =>
39673967
array(
3968-
'uri' => '/res/6637c8f0/rsrc/css/phui/phui-object-item-list-view.css',
3968+
'uri' => '/res/ba048e0a/rsrc/css/phui/phui-object-item-list-view.css',
39693969
'type' => 'css',
39703970
'requires' =>
39713971
array(
@@ -4380,7 +4380,7 @@
43804380
), array(
43814381
'packages' =>
43824382
array(
4383-
'5d75f7b6' =>
4383+
'8d147927' =>
43844384
array(
43854385
'name' => 'core.pkg.css',
43864386
'symbols' =>
@@ -4429,7 +4429,7 @@
44294429
41 => 'phabricator-tag-view-css',
44304430
42 => 'phui-list-view-css',
44314431
),
4432-
'uri' => '/res/pkg/5d75f7b6/core.pkg.css',
4432+
'uri' => '/res/pkg/8d147927/core.pkg.css',
44334433
'type' => 'css',
44344434
),
44354435
'2c1dba03' =>
@@ -4621,15 +4621,15 @@
46214621
),
46224622
'reverse' =>
46234623
array(
4624-
'aphront-dialog-view-css' => '5d75f7b6',
4625-
'aphront-error-view-css' => '5d75f7b6',
4626-
'aphront-list-filter-view-css' => '5d75f7b6',
4627-
'aphront-pager-view-css' => '5d75f7b6',
4628-
'aphront-panel-view-css' => '5d75f7b6',
4629-
'aphront-table-view-css' => '5d75f7b6',
4630-
'aphront-tokenizer-control-css' => '5d75f7b6',
4631-
'aphront-tooltip-css' => '5d75f7b6',
4632-
'aphront-typeahead-control-css' => '5d75f7b6',
4624+
'aphront-dialog-view-css' => '8d147927',
4625+
'aphront-error-view-css' => '8d147927',
4626+
'aphront-list-filter-view-css' => '8d147927',
4627+
'aphront-pager-view-css' => '8d147927',
4628+
'aphront-panel-view-css' => '8d147927',
4629+
'aphront-table-view-css' => '8d147927',
4630+
'aphront-tokenizer-control-css' => '8d147927',
4631+
'aphront-tooltip-css' => '8d147927',
4632+
'aphront-typeahead-control-css' => '8d147927',
46334633
'differential-changeset-view-css' => '9244273c',
46344634
'differential-core-view-css' => '9244273c',
46354635
'differential-inline-comment-editor' => '92f459f0',
@@ -4643,7 +4643,7 @@
46434643
'differential-table-of-contents-css' => '9244273c',
46444644
'diffusion-commit-view-css' => '7aa115b4',
46454645
'diffusion-icons-css' => '7aa115b4',
4646-
'global-drag-and-drop-css' => '5d75f7b6',
4646+
'global-drag-and-drop-css' => '8d147927',
46474647
'inline-comment-summary-css' => '9244273c',
46484648
'javelin-aphlict' => '2c1dba03',
46494649
'javelin-behavior' => '3e3be199',
@@ -4718,56 +4718,56 @@
47184718
'javelin-util' => '3e3be199',
47194719
'javelin-vector' => '3e3be199',
47204720
'javelin-workflow' => '3e3be199',
4721-
'lightbox-attachment-css' => '5d75f7b6',
4721+
'lightbox-attachment-css' => '8d147927',
47224722
'maniphest-task-summary-css' => '49898640',
4723-
'phabricator-action-list-view-css' => '5d75f7b6',
4724-
'phabricator-application-launch-view-css' => '5d75f7b6',
4723+
'phabricator-action-list-view-css' => '8d147927',
4724+
'phabricator-application-launch-view-css' => '8d147927',
47254725
'phabricator-busy' => '2c1dba03',
47264726
'phabricator-content-source-view-css' => '9244273c',
4727-
'phabricator-core-css' => '5d75f7b6',
4728-
'phabricator-crumbs-view-css' => '5d75f7b6',
4727+
'phabricator-core-css' => '8d147927',
4728+
'phabricator-crumbs-view-css' => '8d147927',
47294729
'phabricator-drag-and-drop-file-upload' => '92f459f0',
47304730
'phabricator-dropdown-menu' => '2c1dba03',
47314731
'phabricator-file-upload' => '2c1dba03',
4732-
'phabricator-filetree-view-css' => '5d75f7b6',
4733-
'phabricator-flag-css' => '5d75f7b6',
4732+
'phabricator-filetree-view-css' => '8d147927',
4733+
'phabricator-flag-css' => '8d147927',
47344734
'phabricator-hovercard' => '2c1dba03',
4735-
'phabricator-jump-nav' => '5d75f7b6',
4735+
'phabricator-jump-nav' => '8d147927',
47364736
'phabricator-keyboard-shortcut' => '2c1dba03',
47374737
'phabricator-keyboard-shortcut-manager' => '2c1dba03',
4738-
'phabricator-main-menu-view' => '5d75f7b6',
4738+
'phabricator-main-menu-view' => '8d147927',
47394739
'phabricator-menu-item' => '2c1dba03',
4740-
'phabricator-nav-view-css' => '5d75f7b6',
4740+
'phabricator-nav-view-css' => '8d147927',
47414741
'phabricator-notification' => '2c1dba03',
4742-
'phabricator-notification-css' => '5d75f7b6',
4743-
'phabricator-notification-menu-css' => '5d75f7b6',
4742+
'phabricator-notification-css' => '8d147927',
4743+
'phabricator-notification-menu-css' => '8d147927',
47444744
'phabricator-object-selector-css' => '9244273c',
47454745
'phabricator-phtize' => '2c1dba03',
47464746
'phabricator-prefab' => '2c1dba03',
47474747
'phabricator-project-tag-css' => '49898640',
4748-
'phabricator-remarkup-css' => '5d75f7b6',
4748+
'phabricator-remarkup-css' => '8d147927',
47494749
'phabricator-shaped-request' => '92f459f0',
4750-
'phabricator-side-menu-view-css' => '5d75f7b6',
4751-
'phabricator-standard-page-view' => '5d75f7b6',
4752-
'phabricator-tag-view-css' => '5d75f7b6',
4750+
'phabricator-side-menu-view-css' => '8d147927',
4751+
'phabricator-standard-page-view' => '8d147927',
4752+
'phabricator-tag-view-css' => '8d147927',
47534753
'phabricator-textareautils' => '2c1dba03',
47544754
'phabricator-tooltip' => '2c1dba03',
4755-
'phabricator-transaction-view-css' => '5d75f7b6',
4756-
'phabricator-zindex-css' => '5d75f7b6',
4757-
'phui-button-css' => '5d75f7b6',
4758-
'phui-form-css' => '5d75f7b6',
4759-
'phui-form-view-css' => '5d75f7b6',
4760-
'phui-header-view-css' => '5d75f7b6',
4761-
'phui-icon-view-css' => '5d75f7b6',
4762-
'phui-list-view-css' => '5d75f7b6',
4763-
'phui-object-item-list-view-css' => '5d75f7b6',
4764-
'phui-property-list-view-css' => '5d75f7b6',
4765-
'phui-spacing-css' => '5d75f7b6',
4766-
'sprite-apps-large-css' => '5d75f7b6',
4767-
'sprite-gradient-css' => '5d75f7b6',
4768-
'sprite-icons-css' => '5d75f7b6',
4769-
'sprite-menu-css' => '5d75f7b6',
4770-
'sprite-status-css' => '5d75f7b6',
4771-
'syntax-highlighting-css' => '5d75f7b6',
4755+
'phabricator-transaction-view-css' => '8d147927',
4756+
'phabricator-zindex-css' => '8d147927',
4757+
'phui-button-css' => '8d147927',
4758+
'phui-form-css' => '8d147927',
4759+
'phui-form-view-css' => '8d147927',
4760+
'phui-header-view-css' => '8d147927',
4761+
'phui-icon-view-css' => '8d147927',
4762+
'phui-list-view-css' => '8d147927',
4763+
'phui-object-item-list-view-css' => '8d147927',
4764+
'phui-property-list-view-css' => '8d147927',
4765+
'phui-spacing-css' => '8d147927',
4766+
'sprite-apps-large-css' => '8d147927',
4767+
'sprite-gradient-css' => '8d147927',
4768+
'sprite-icons-css' => '8d147927',
4769+
'sprite-menu-css' => '8d147927',
4770+
'sprite-status-css' => '8d147927',
4771+
'syntax-highlighting-css' => '8d147927',
47724772
),
47734773
));

src/applications/people/controller/PhabricatorPeopleProfileController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private function renderUserFeed(PhabricatorUser $user) {
126126
$view = $builder->buildView();
127127

128128
return phutil_tag_div(
129-
'profile-feed profile-wrap-responsive',
129+
'profile-feed',
130130
$view->render());
131131
}
132132
}

src/applications/project/controller/PhabricatorProjectProfileController.php

Lines changed: 10 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,10 @@ public function processRequest() {
4545
$query->setViewer($this->getRequest()->getUser());
4646
$stories = $query->execute();
4747
$feed = $this->renderStories($stories);
48-
$people = $this->renderPeoplePage($project, $profile);
49-
50-
$content = id(new AphrontMultiColumnView())
51-
->addColumn($people)
52-
->addColumn($feed)
53-
->setFluidLayout(true);
5448

5549
$content = phutil_tag_div(
5650
'phabricator-project-layout',
57-
array($tasks, $content));
51+
array($tasks, $feed));
5852

5953
$header = id(new PHUIHeaderView())
6054
->setHeader($project->getName())
@@ -92,37 +86,6 @@ public function processRequest() {
9286
));
9387
}
9488

95-
private function renderPeoplePage(
96-
PhabricatorProject $project,
97-
PhabricatorProjectProfile $profile) {
98-
99-
$member_phids = $project->getMemberPHIDs();
100-
$handles = $this->loadViewerHandles($member_phids);
101-
102-
$affiliated = array();
103-
foreach ($handles as $phids => $handle) {
104-
$affiliated[] = phutil_tag('li', array(), $handle->renderLink());
105-
}
106-
107-
if ($affiliated) {
108-
$affiliated = phutil_tag('ul', array(), $affiliated);
109-
} else {
110-
$affiliated = phutil_tag('p', array(),
111-
phutil_tag('em', array(),
112-
pht('No one is affiliated with this project.')));
113-
}
114-
115-
return phutil_tag_div(
116-
'phabricator-profile-info-group profile-wrap-responsive',
117-
array(
118-
phutil_tag(
119-
'h1',
120-
array('class' => 'phabricator-profile-info-header'),
121-
pht('People')),
122-
phutil_tag_div('phabricator-profile-info-pane', $affiliated),
123-
));
124-
}
125-
12689
private function renderFeedPage(
12790
PhabricatorProject $project,
12891
PhabricatorProjectProfile $profile) {
@@ -149,7 +112,7 @@ private function renderStories(array $stories) {
149112
$view = $builder->buildView();
150113

151114
return phutil_tag_div(
152-
'profile-feed profile-wrap-responsive',
115+
'profile-feed',
153116
$view->render());
154117
}
155118

@@ -267,6 +230,8 @@ private function buildPropertyListView(
267230
$request = $this->getRequest();
268231
$viewer = $request->getUser();
269232

233+
$this->loadHandles($project->getMemberPHIDs());
234+
270235
$view = id(new PHUIPropertyListView())
271236
->setUser($viewer)
272237
->setObject($project)
@@ -276,6 +241,12 @@ private function buildPropertyListView(
276241
pht('Created'),
277242
phabricator_datetime($project->getDateCreated(), $viewer));
278243

244+
$view->addProperty(
245+
pht('Members'),
246+
$project->getMemberPHIDs()
247+
? $this->renderHandlesForPHIDs($project->getMemberPHIDs(), ',')
248+
: phutil_tag('em', array(), pht('None')));
249+
279250
$view->addSectionHeader(pht('Description'));
280251
$view->addTextContent(
281252
PhabricatorMarkupEngine::renderOneObject(

webroot/rsrc/css/application/profile/profile-view.css

Lines changed: 6 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -2,127 +2,17 @@
22
* @provides phabricator-profile-css
33
*/
44

5-
table.phabricator-profile-master-layout {
6-
width: 100%;
7-
}
8-
9-
td.phabricator-profile-navigation {
10-
width: 300px;
11-
background: #efefef;
12-
border-right: 1px solid #cccccc;
13-
padding-top: 8px;
14-
padding-bottom: 8em;
15-
}
16-
17-
td.phabricator-profile-navigation a,
18-
td.phabricator-profile-navigation span {
19-
display: block;
20-
margin: 0 0 2px;
21-
min-width: 150px;
22-
font-weight: bold;
23-
white-space: nowrap;
24-
text-decoration: none;
25-
}
26-
27-
td.phabricator-profile-navigation a {
28-
padding: 4px 8px 4px 10px;
29-
}
30-
31-
td.phabricator-profile-navigation a:hover {
32-
text-decoration: none;
33-
background: #cccccc;
34-
}
35-
36-
td.phabricator-profile-navigation a.phabricator-profile-item-selected,
37-
td.phabricator-profile-navigation a.phabricator-profile-item-selected :hover {
38-
background: #cccccc;
39-
}
40-
41-
td.phabricator-profile-navigation hr {
42-
border: none;
43-
background: #cccccc;
44-
padding: 0;
45-
margin: 10px 0;
46-
height: 1px;
47-
}
48-
49-
td.phabricator-profile-navigation h1,
50-
td.phabricator-profile-navigation h2 {
51-
padding: 2px 0px 0px 10px;
52-
}
53-
54-
td.phabricator-profile-content {
55-
padding: 2em 2%;
56-
}
57-
58-
.phabricator-profile-info-table th {
59-
font-weight: bold;
60-
text-align: right;
61-
color: {$greytext};
62-
width: 10%;
63-
padding: 4px;
64-
}
65-
66-
.phabricator-profile-info-table td {
67-
width: 100%;
68-
padding: 4px;
69-
}
70-
71-
.phabricator-profile-info-group {
72-
box-shadow: 0 1px 1px rgba(0,0,0,.4);
73-
}
74-
75-
.phabricator-profile-info-header {
76-
padding: 8px;
77-
background: #e7e7e7;
78-
border-bottom: 1px solid #d9d9d9;
79-
}
80-
81-
.phabricator-profile-info-pane {
82-
padding: 8px .5em;
83-
background: #fff;
84-
}
85-
86-
.phabricator-profile-info-table {
87-
width: 100%;
88-
}
89-
90-
h2.phabricator-profile-realname {
91-
color: {$greytext};
92-
}
93-
94-
img.phabricator-profile-image {
95-
width: 280px;
96-
margin: 10px;
97-
}
98-
99-
.phabricator-profile-info-pane-more-link {
100-
text-align: right;
101-
padding: .25em;
102-
font-weight: bold;
103-
margin: .5em 1em 0;
104-
}
105-
106-
.profile-wrap-responsive {
107-
margin: 20px;
108-
}
109-
110-
.device .profile-wrap-responsive {
111-
margin-left: 10px;
112-
margin-right: 10px;
5+
.device-desktop .profile-feed,
6+
.device-tablet .profile-feed {
7+
max-width: 640px;
8+
padding: 12px 16px;
1139
}
11410

115-
.device-desktop .profile-feed {
116-
max-width: 640px;
11+
.device-phone .profile-feed {
12+
padding: 12px 0;
11713
}
11814

11915
.profile-feed .phabricator-action-header-title {
12016
font-size: 16px;
12117
margin-bottom: 5px;
12218
}
123-
124-
.device-desktop .phabricator-project-layout
125-
.aphront-multi-column-column-outer:first-child
126-
.phabricator-profile-info-group {
127-
margin-right: 0;
128-
}

0 commit comments

Comments
 (0)