Page MenuHomePhabricator

D8825.diff
No OneTemporary

D8825.diff

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(
- '<div class="phabricator-ui-example-header">'.
- '<h1 class="phabricator-ui-example-name">%s (%s)</h1>'.
- '<p class="phabricator-ui-example-description">%s</p>'.
- '</div>',
- $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;

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 29, 2:40 AM (8 h, 12 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6941514
Default Alt Text
D8825.diff (2 KB)

Event Timeline