Page MenuHomePhabricator

D18050.id43411.diff
No OneTemporary

D18050.id43411.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1393,7 +1393,6 @@
'HeraldTranscriptTestCase' => 'applications/herald/storage/__tests__/HeraldTranscriptTestCase.php',
'HeraldUtilityActionGroup' => 'applications/herald/action/HeraldUtilityActionGroup.php',
'Javelin' => 'infrastructure/javelin/Javelin.php',
- 'JavelinViewExampleServerView' => 'applications/uiexample/examples/JavelinViewExampleServerView.php',
'LegalpadController' => 'applications/legalpad/controller/LegalpadController.php',
'LegalpadCreateDocumentsCapability' => 'applications/legalpad/capability/LegalpadCreateDocumentsCapability.php',
'LegalpadDAO' => 'applications/legalpad/storage/LegalpadDAO.php',
@@ -6471,7 +6470,6 @@
'HeraldTranscriptTestCase' => 'PhabricatorTestCase',
'HeraldUtilityActionGroup' => 'HeraldActionGroup',
'Javelin' => 'Phobject',
- 'JavelinViewExampleServerView' => 'AphrontView',
'LegalpadController' => 'PhabricatorController',
'LegalpadCreateDocumentsCapability' => 'PhabricatorPolicyCapability',
'LegalpadDAO' => 'PhabricatorLiskDAO',
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
@@ -17,9 +17,14 @@
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI('view/')));
- foreach ($classes as $class => $obj) {
- $name = $obj->getName();
- $nav->addFilter($class, $name);
+ $groups = mgroup($classes, 'getCategory');
+ ksort($groups);
+ foreach ($groups as $group => $group_classes) {
+ $nav->addLabel($group);
+ foreach ($group_classes as $class => $obj) {
+ $name = $obj->getName();
+ $nav->addFilter($class, $name);
+ }
}
$selected = $nav->selectFilter($id, head_key($classes));
diff --git a/src/applications/uiexample/examples/JavelinViewExampleServerView.php b/src/applications/uiexample/examples/JavelinViewExampleServerView.php
deleted file mode 100644
--- a/src/applications/uiexample/examples/JavelinViewExampleServerView.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-final class JavelinViewExampleServerView extends AphrontView {
-
- public function render() {
- return phutil_tag(
- 'div',
- array(
- 'class' => 'server-view',
- ),
- $this->renderChildren());
- }
-
-}
diff --git a/src/applications/uiexample/examples/MacroEmojiExample.php b/src/applications/uiexample/examples/MacroEmojiExample.php
--- a/src/applications/uiexample/examples/MacroEmojiExample.php
+++ b/src/applications/uiexample/examples/MacroEmojiExample.php
@@ -3,11 +3,15 @@
final class MacroEmojiExample extends PhabricatorUIExample {
public function getName() {
- return pht('Emoji Support');
+ return pht('Emoji');
}
public function getDescription() {
- return pht('Shiny happy people holding hands');
+ return pht('Shiny happy people holding hands.');
+ }
+
+ public function getCategory() {
+ return pht('Catalogs');
}
public function renderExample() {
diff --git a/src/applications/uiexample/examples/PHUIBadgeExample.php b/src/applications/uiexample/examples/PHUIBadgeExample.php
--- a/src/applications/uiexample/examples/PHUIBadgeExample.php
+++ b/src/applications/uiexample/examples/PHUIBadgeExample.php
@@ -10,6 +10,10 @@
return pht('Celebrate the moments of your life.');
}
+ public function getCategory() {
+ return pht('Single Use');
+ }
+
public function renderExample() {
$badges1 = array();
diff --git a/src/applications/uiexample/examples/PHUIColorPalletteExample.php b/src/applications/uiexample/examples/PHUIColorPalletteExample.php
--- a/src/applications/uiexample/examples/PHUIColorPalletteExample.php
+++ b/src/applications/uiexample/examples/PHUIColorPalletteExample.php
@@ -10,6 +10,10 @@
return pht('A Standard Palette of Colors for use.');
}
+ public function getCategory() {
+ return pht('Catalogs');
+ }
+
public function renderExample() {
$colors = array(
diff --git a/src/applications/uiexample/examples/PHUIFeedStoryExample.php b/src/applications/uiexample/examples/PHUIFeedStoryExample.php
--- a/src/applications/uiexample/examples/PHUIFeedStoryExample.php
+++ b/src/applications/uiexample/examples/PHUIFeedStoryExample.php
@@ -8,7 +8,11 @@
public function getDescription() {
return pht(
- 'An outlandish exaggeration of intricate tales from around the realm');
+ 'An outlandish exaggeration of intricate tales from around the realm.');
+ }
+
+ public function getCategory() {
+ return pht('Single Use');
}
public function renderExample() {
diff --git a/src/applications/uiexample/examples/PHUIHovercardUIExample.php b/src/applications/uiexample/examples/PHUIHovercardUIExample.php
--- a/src/applications/uiexample/examples/PHUIHovercardUIExample.php
+++ b/src/applications/uiexample/examples/PHUIHovercardUIExample.php
@@ -12,6 +12,10 @@
phutil_tag('tt', array(), 'PHUIHovercardView'));
}
+ public function getCategory() {
+ return pht('Single Use');
+ }
+
public function renderExample() {
$request = $this->getRequest();
$user = $request->getUser();
diff --git a/src/applications/uiexample/examples/PHUIIconExample.php b/src/applications/uiexample/examples/PHUIIconExample.php
--- a/src/applications/uiexample/examples/PHUIIconExample.php
+++ b/src/applications/uiexample/examples/PHUIIconExample.php
@@ -10,6 +10,10 @@
return pht('Easily render icons or images with links and sprites.');
}
+ public function getCategory() {
+ return pht('Catalogs');
+ }
+
private function listTransforms() {
return array(
'ph-rotate-90',
diff --git a/src/applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php b/src/applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php
--- a/src/applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php
+++ b/src/applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php
@@ -3,13 +3,17 @@
final class PhabricatorFilesComposeAvatarExample extends PhabricatorUIExample {
public function getName() {
- return pht('Generate Avatar Images');
+ return pht('Avatars');
}
public function getDescription() {
return pht('Tests various color palettes and sizes.');
}
+ public function getCategory() {
+ return pht('Technical');
+ }
+
public function renderExample() {
$request = $this->getRequest();
$viewer = $request->getUser();
diff --git a/src/applications/uiexample/examples/PhabricatorGestureUIExample.php b/src/applications/uiexample/examples/PhabricatorGestureUIExample.php
--- a/src/applications/uiexample/examples/PhabricatorGestureUIExample.php
+++ b/src/applications/uiexample/examples/PhabricatorGestureUIExample.php
@@ -14,6 +14,10 @@
phutil_tag('tt', array(), 'touchable'));
}
+ public function getCategory() {
+ return pht('Technical');
+ }
+
public function renderExample() {
$id = celerity_generate_unique_node_id();
diff --git a/src/applications/uiexample/examples/PhabricatorNotificationUIExample.php b/src/applications/uiexample/examples/PhabricatorNotificationUIExample.php
--- a/src/applications/uiexample/examples/PhabricatorNotificationUIExample.php
+++ b/src/applications/uiexample/examples/PhabricatorNotificationUIExample.php
@@ -12,6 +12,10 @@
phutil_tag('tt', array(), 'JX.Notification'));
}
+ public function getCategory() {
+ return pht('Technical');
+ }
+
public function renderExample() {
require_celerity_resource('phabricator-notification-css');
Javelin::initBehavior('phabricator-notification-example');
diff --git a/src/applications/uiexample/examples/PhabricatorRemarkupUIExample.php b/src/applications/uiexample/examples/PhabricatorRemarkupUIExample.php
--- a/src/applications/uiexample/examples/PhabricatorRemarkupUIExample.php
+++ b/src/applications/uiexample/examples/PhabricatorRemarkupUIExample.php
@@ -11,6 +11,10 @@
'Demonstrates the visual appearance of various Remarkup elements.');
}
+ public function getCategory() {
+ return pht('Technical');
+ }
+
public function renderExample() {
$viewer = $this->getRequest()->getUser();
diff --git a/src/applications/uiexample/examples/PhabricatorSetupIssueUIExample.php b/src/applications/uiexample/examples/PhabricatorSetupIssueUIExample.php
--- a/src/applications/uiexample/examples/PhabricatorSetupIssueUIExample.php
+++ b/src/applications/uiexample/examples/PhabricatorSetupIssueUIExample.php
@@ -10,6 +10,10 @@
return pht('Setup errors and warnings.');
}
+ public function getCategory() {
+ return pht('Single Use');
+ }
+
public function renderExample() {
$request = $this->getRequest();
$user = $request->getUser();
diff --git a/src/applications/uiexample/examples/PhabricatorUIExample.php b/src/applications/uiexample/examples/PhabricatorUIExample.php
--- a/src/applications/uiexample/examples/PhabricatorUIExample.php
+++ b/src/applications/uiexample/examples/PhabricatorUIExample.php
@@ -17,6 +17,10 @@
abstract public function getDescription();
abstract public function renderExample();
+ public function getCategory() {
+ return pht('General');
+ }
+
protected function createBasicDummyHandle($name, $type, $fullname = null,
$uri = null) {

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 24, 6:12 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7720544
Default Alt Text
D18050.id43411.diff (9 KB)

Event Timeline