Skip to content

Commit 132bff3

Browse files
committed
[Redesign] People, Profile, Feed UI
Summary: Ref T8099, Mostly a Feed cleanup, removing old CSS, relying on modern display objects, adds back the feed to profile (I miss it, but maybe you don't). Test Plan: Visit Feed on Profiles, Projects, Feed, and Dashboards. Same UI Everywhere. TODO, "Public Feed". Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8099 Differential Revision: https://secure.phabricator.com/D13101
1 parent e230e03 commit 132bff3

File tree

9 files changed

+55
-150
lines changed

9 files changed

+55
-150
lines changed

resources/celerity/map.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
return array(
99
'names' => array(
10-
'core.pkg.css' => '1b6e6a39',
10+
'core.pkg.css' => '63bd9495',
1111
'core.pkg.js' => 'fbf1d615',
1212
'darkconsole.pkg.js' => 'e7393ebb',
1313
'differential.pkg.css' => 'f89b49b6',
@@ -98,7 +98,6 @@
9898
'rsrc/css/application/ponder/feed.css' => 'e62615b6',
9999
'rsrc/css/application/ponder/post.css' => '9d415218',
100100
'rsrc/css/application/ponder/vote.css' => '8ed6ed8b',
101-
'rsrc/css/application/profile/profile-view.css' => 'cb6f56b7',
102101
'rsrc/css/application/projects/project-icon.css' => 'c2ecb7f1',
103102
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
104103
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
@@ -130,7 +129,7 @@
130129
'rsrc/css/phui/phui-button.css' => 'b995182d',
131130
'rsrc/css/phui/phui-crumbs-view.css' => 'ce840ec2',
132131
'rsrc/css/phui/phui-document.css' => '08f33f08',
133-
'rsrc/css/phui/phui-feed-story.css' => '06872ae9',
132+
'rsrc/css/phui/phui-feed-story.css' => '153a2ebf',
134133
'rsrc/css/phui/phui-fontkit.css' => 'b664ac96',
135134
'rsrc/css/phui/phui-form-view.css' => 'a0e8f168',
136135
'rsrc/css/phui/phui-form.css' => 'f535f938',
@@ -723,7 +722,6 @@
723722
'phabricator-object-selector-css' => '029a133d',
724723
'phabricator-phtize' => 'd254d646',
725724
'phabricator-prefab' => '6920d200',
726-
'phabricator-profile-css' => 'cb6f56b7',
727725
'phabricator-remarkup-css' => '67a4ee29',
728726
'phabricator-search-results-css' => 'ce897fb9',
729727
'phabricator-shaped-request' => '7cbe244b',
@@ -764,7 +762,7 @@
764762
'phui-calendar-month-css' => '476be7e0',
765763
'phui-crumbs-view-css' => 'ce840ec2',
766764
'phui-document-view-css' => '08f33f08',
767-
'phui-feed-story-css' => '06872ae9',
765+
'phui-feed-story-css' => '153a2ebf',
768766
'phui-font-icon-base-css' => '3dad2ae3',
769767
'phui-fontkit-css' => 'b664ac96',
770768
'phui-form-css' => 'f535f938',

src/__phutil_library_map__.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,6 @@
22232223
'PhabricatorPeopleDisableController' => 'applications/people/controller/PhabricatorPeopleDisableController.php',
22242224
'PhabricatorPeopleEmpowerController' => 'applications/people/controller/PhabricatorPeopleEmpowerController.php',
22252225
'PhabricatorPeopleExternalPHIDType' => 'applications/people/phid/PhabricatorPeopleExternalPHIDType.php',
2226-
'PhabricatorPeopleFeedController' => 'applications/people/controller/PhabricatorPeopleFeedController.php',
22272226
'PhabricatorPeopleHovercardEventListener' => 'applications/people/event/PhabricatorPeopleHovercardEventListener.php',
22282227
'PhabricatorPeopleInviteController' => 'applications/people/controller/PhabricatorPeopleInviteController.php',
22292228
'PhabricatorPeopleInviteListController' => 'applications/people/controller/PhabricatorPeopleInviteListController.php',
@@ -5633,7 +5632,6 @@
56335632
'PhabricatorPeopleDisableController' => 'PhabricatorPeopleController',
56345633
'PhabricatorPeopleEmpowerController' => 'PhabricatorPeopleController',
56355634
'PhabricatorPeopleExternalPHIDType' => 'PhabricatorPHIDType',
5636-
'PhabricatorPeopleFeedController' => 'PhabricatorPeopleController',
56375635
'PhabricatorPeopleHovercardEventListener' => 'PhabricatorEventListener',
56385636
'PhabricatorPeopleInviteController' => 'PhabricatorPeopleController',
56395637
'PhabricatorPeopleInviteListController' => 'PhabricatorPeopleInviteController',

src/applications/feed/builder/PhabricatorFeedBuilder.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,22 @@ public function buildView() {
8383
$null_view->appendChild($view);
8484
}
8585

86+
$box = id(new PHUIObjectBoxView())
87+
->appendChild($null_view);
88+
8689
if (empty($stories)) {
8790
$nodatastring = pht('No Stories.');
8891
if ($this->noDataString) {
8992
$nodatastring = $this->noDataString;
9093
}
9194

92-
$view = id(new PHUIInfoView())
93-
->setSeverity(PHUIInfoView::SEVERITY_NODATA)
95+
$view = id(new PHUIBoxView())
96+
->addClass('mlt mlb msr msl')
9497
->appendChild($nodatastring);
95-
$null_view->appendChild($view);
98+
$box->appendChild($view);
9699
}
97100

98-
return id(new PHUIObjectBoxView())
99-
->appendChild($null_view);
101+
return $box;
100102

101103
}
102104

src/applications/people/controller/PhabricatorPeopleController.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public function buildSideNavView($for_app = false) {
1616
if ($name) {
1717
$nav->setBaseURI(new PhutilURI('/p/'));
1818
$nav->addFilter("{$name}/", $name);
19-
$nav->addFilter("{$name}/feed/", pht('Feed'));
2019
$nav->addFilter("{$name}/calendar/", pht('Calendar'));
2120
}
2221
}
@@ -54,7 +53,6 @@ public function buildIconNavView(PhabricatorUser $user) {
5453
$nav->setIconNav(true);
5554
$nav->setBaseURI(new PhutilURI('/p/'));
5655
$nav->addIcon("{$name}/", $name, null, $picture);
57-
$nav->addIcon("{$name}/feed/", pht('Feed'), 'fa-newspaper-o');
5856

5957
$class = 'PhabricatorCalendarApplication';
6058
if (PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) {

src/applications/people/controller/PhabricatorPeopleFeedController.php

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/applications/people/controller/PhabricatorPeopleProfileController.php

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ public function processRequest() {
2626
return new Aphront404Response();
2727
}
2828

29-
require_celerity_resource('phabricator-profile-css');
30-
3129
$profile = $user->loadUserProfile();
3230
$username = phutil_escape_uri($user->getUserName());
3331

@@ -64,6 +62,17 @@ public function processRequest() {
6462
->setDisabled(!$can_edit)
6563
->setWorkflow(!$can_edit));
6664

65+
$class = 'PhabricatorConpherenceApplication';
66+
if (PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) {
67+
$href = '/conpherence/new/?participant='.$user->getPHID();
68+
$actions->addAction(
69+
id(new PhabricatorActionView())
70+
->setIcon('fa-comments')
71+
->setName(pht('Send Message'))
72+
->setWorkflow(true)
73+
->setHref($href));
74+
}
75+
6776
if ($viewer->getIsAdmin()) {
6877
$actions->addAction(
6978
id(new PhabricatorActionView())
@@ -134,28 +143,18 @@ public function processRequest() {
134143
$crumbs = $this->buildApplicationCrumbs();
135144
$crumbs->addTextCrumb($name);
136145

137-
$class = 'PhabricatorConpherenceApplication';
138-
if (PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) {
139-
$href = '/conpherence/new/?participant='.$user->getPHID();
140-
$image = id(new PHUIIconView())
141-
->setIconFont('fa-comments');
142-
$button = id(new PHUIButtonView())
143-
->setTag('a')
144-
->setColor(PHUIButtonView::SIMPLE)
145-
->setIcon($image)
146-
->setHref($href)
147-
->setText(pht('Send Message'))
148-
->setWorkflow(true);
149-
$header->addActionLink($button);
150-
}
151-
152146
$object_box = id(new PHUIObjectBoxView())
153147
->setHeader($header)
154148
->addPropertyList($properties);
155149

150+
$feed = id(new PHUIObjectBoxView())
151+
->setHeaderText(pht('Recent Activity'))
152+
->appendChild($this->buildPeopleFeed($user, $viewer));
153+
156154
$nav = $this->buildIconNavView($user);
157155
$nav->selectFilter("{$name}/");
158156
$nav->appendChild($object_box);
157+
$nav->appendChild($feed);
159158

160159
return $this->buildApplicationPage(
161160
$nav,
@@ -182,4 +181,28 @@ private function buildPropertyView(
182181
return $view;
183182
}
184183

184+
private function buildPeopleFeed(
185+
PhabricatorUser $user,
186+
$viewer) {
187+
188+
$query = new PhabricatorFeedQuery();
189+
$query->setFilterPHIDs(
190+
array(
191+
$user->getPHID(),
192+
));
193+
$query->setLimit(100);
194+
$query->setViewer($viewer);
195+
$stories = $query->execute();
196+
197+
$builder = new PhabricatorFeedBuilder($stories);
198+
$builder->setUser($viewer);
199+
$builder->setShowHovercards(true);
200+
$builder->setNoDataString(pht('To begin on such a grand journey, '.
201+
'requires but just a single step.'));
202+
$view = $builder->buildView();
203+
204+
return phutil_tag_div('phabricator-project-feed', $view->render());
205+
206+
}
207+
185208
}

src/applications/project/controller/PhabricatorProjectFeedController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ public function handleRequest(AphrontRequest $request) {
3232
->setURI('/tag/'.$project->getPrimarySlug().'/');
3333
}
3434

35-
require_celerity_resource('phabricator-profile-css');
36-
3735
$query = new PhabricatorFeedQuery();
3836
$query->setFilterPHIDs(
3937
array(
@@ -44,11 +42,13 @@ public function handleRequest(AphrontRequest $request) {
4442
$stories = $query->execute();
4543
$feed = $this->renderStories($stories);
4644

47-
$content = phutil_tag_div('phabricator-project-feed', $feed);
45+
$box = id(new PHUIObjectBoxView())
46+
->setHeaderText(pht('Project Activity'))
47+
->appendChild($feed);
4848

4949
$nav = $this->buildIconNavView($project);
5050
$nav->selectFilter("feed/{$id}/");
51-
$nav->appendChild($content);
51+
$nav->appendChild($box);
5252

5353
return $this->buildApplicationPage(
5454
$nav,

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

Lines changed: 0 additions & 53 deletions
This file was deleted.

webroot/rsrc/css/phui/phui-feed-story.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @provides phui-feed-story-css
33
*/
44

5-
.phabricator-feed-frame .phui-box.phui-feed-story {
5+
.phui-object-box .phui-box.phui-feed-story {
66
border-bottom: 1px solid {$thinblueborder};
77
}
88

0 commit comments

Comments
 (0)