diff --git a/src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php b/src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php --- a/src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php +++ b/src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php @@ -4,6 +4,10 @@ private $class; + public function shouldAllowPublic() { + return true; + } + public function willProcessRequest(array $data) { $this->class = idx($data, 'class'); } @@ -12,14 +16,7 @@ $classes = id(new PhutilSymbolLoader()) ->setAncestorClass('PhabricatorUIExample') - ->setConcreteOnly(true) - ->selectAndLoadSymbols(); - $classes = ipull($classes, 'name', 'name'); - - foreach ($classes as $class => $ignored) { - $classes[$class] = newv($class, array()); - } - + ->loadObjects(); $classes = msort($classes, 'getName'); $nav = new AphrontSideNavFilterView(); @@ -43,21 +40,25 @@ require_celerity_resource('phabricator-ui-example-css'); - $nav->appendChild(hsprintf( - '
'. - '

%s (%s)

'. - '

%s

'. - '
', - $example->getName(), - get_class($example), - $example->getDescription())); + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb($example->getName()); + + $header = id(new PHUIHeaderView()) + ->setHeader(pht('%s (%s)', $example->getName(), get_class($example))) + ->setSubheader($example->getDescription()); - $nav->appendChild($result); + $nav->appendChild( + array( + $crumbs, + $header, + phutil_tag('br'), + $result, + )); return $this->buildApplicationPage( $nav, array( - 'title' => 'UI Example', + 'title' => $example->getName(), 'device' => true, )); } diff --git a/webroot/rsrc/css/application/uiexample/example.css b/webroot/rsrc/css/application/uiexample/example.css --- a/webroot/rsrc/css/application/uiexample/example.css +++ b/webroot/rsrc/css/application/uiexample/example.css @@ -13,14 +13,6 @@ font-weight: bold; } -.phabricator-ui-example-header { - margin: 1em 2em 2em; -} - -.phabricator-ui-example-description { - margin: 1em 0; -} - .jxui-example-container { padding: 2em; margin: 4em auto;