diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 5c4096f26e..9850166307 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -94,7 +94,7 @@ return array( 'rsrc/css/application/ponder/feed.css' => 'e62615b6', 'rsrc/css/application/ponder/post.css' => 'ebab8a70', 'rsrc/css/application/ponder/vote.css' => '8ed6ed8b', - 'rsrc/css/application/profile/profile-view.css' => 'b4896815', + 'rsrc/css/application/profile/profile-view.css' => 'd8cb982b', 'rsrc/css/application/projects/project-icon.css' => 'c2ecb7f1', 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', @@ -737,7 +737,7 @@ return array( 'phabricator-object-selector-css' => '029a133d', 'phabricator-phtize' => 'd254d646', 'phabricator-prefab' => '72da38cc', - 'phabricator-profile-css' => 'b4896815', + 'phabricator-profile-css' => 'd8cb982b', 'phabricator-remarkup-css' => 'e8e5a324', 'phabricator-search-results-css' => 'f240504c', 'phabricator-shaped-request' => '7cbe244b', diff --git a/src/applications/feed/builder/PhabricatorFeedBuilder.php b/src/applications/feed/builder/PhabricatorFeedBuilder.php index 9bf35b9104..80c7a12460 100644 --- a/src/applications/feed/builder/PhabricatorFeedBuilder.php +++ b/src/applications/feed/builder/PhabricatorFeedBuilder.php @@ -5,6 +5,7 @@ final class PhabricatorFeedBuilder { private $stories; private $framed; private $hovercards = false; + private $noDataString; public function __construct(array $stories) { assert_instances_of($stories, 'PhabricatorFeedStory'); @@ -26,6 +27,11 @@ final class PhabricatorFeedBuilder { return $this; } + public function setNoDataString($string) { + $this->noDataString = $string; + return $this; + } + public function buildView() { if (!$this->user) { throw new Exception('Call setUser() before buildView()!'); @@ -76,6 +82,20 @@ final class PhabricatorFeedBuilder { $null_view->appendChild($view); } + if (empty($stories)) { + $nodatastring = pht('No Stories.'); + if ($this->noDataString) { + $nodatastring = $this->noDataString; + } + + $view = id(new PHUIErrorView()) + ->setSeverity(PHUIErrorView::SEVERITY_NODATA) + ->appendChild($nodatastring); + $null_view->appendChild($view); + } + + + return id(new AphrontNullView()) ->appendChild($null_view->render()); } diff --git a/src/applications/people/controller/PhabricatorPeopleFeedController.php b/src/applications/people/controller/PhabricatorPeopleFeedController.php index 4251ebfcdc..5907ae4a1e 100644 --- a/src/applications/people/controller/PhabricatorPeopleFeedController.php +++ b/src/applications/people/controller/PhabricatorPeopleFeedController.php @@ -38,6 +38,8 @@ final class PhabricatorPeopleFeedController $builder = new PhabricatorFeedBuilder($stories); $builder->setUser($viewer); $builder->setShowHovercards(true); + $builder->setNoDataString(pht('To begin on such a grand journey, '. + 'requires but just a single step.')); $view = $builder->buildView(); $feed = phutil_tag_div( diff --git a/webroot/rsrc/css/application/profile/profile-view.css b/webroot/rsrc/css/application/profile/profile-view.css index ce255b5168..210cf11fb0 100644 --- a/webroot/rsrc/css/application/profile/profile-view.css +++ b/webroot/rsrc/css/application/profile/profile-view.css @@ -48,6 +48,10 @@ max-width: 640px; } +.phabricator-project-feed .phui-error-view { + margin: 12px 0; +} + .device-phone .phabricator-project-feed { padding: 0 12px; width: auto;