@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Categorize UIExamples a little bit

Summary:
Ref M1476. I'm planning to add some PHUIX examples, but sort out the existing examples a little first. I added some categories:

- Catalogs: these are what I look at most often (emoji, icons, colors).
- Single use: elements with only one use (badges, feed stories, hovercards, setup issues).
- Technical: examples which are really just "test this thing in the browser" (avatars, gestures, notifications, remarkup).
- Other: evrything else, mostly general-purpose multi-use components.

Test Plan:
(See left nav.)

{F4984042}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D18050

+60 -23
-2
src/__phutil_library_map__.php
··· 1395 1395 'HeraldTranscriptTestCase' => 'applications/herald/storage/__tests__/HeraldTranscriptTestCase.php', 1396 1396 'HeraldUtilityActionGroup' => 'applications/herald/action/HeraldUtilityActionGroup.php', 1397 1397 'Javelin' => 'infrastructure/javelin/Javelin.php', 1398 - 'JavelinViewExampleServerView' => 'applications/uiexample/examples/JavelinViewExampleServerView.php', 1399 1398 'LegalpadController' => 'applications/legalpad/controller/LegalpadController.php', 1400 1399 'LegalpadCreateDocumentsCapability' => 'applications/legalpad/capability/LegalpadCreateDocumentsCapability.php', 1401 1400 'LegalpadDAO' => 'applications/legalpad/storage/LegalpadDAO.php', ··· 6475 6474 'HeraldTranscriptTestCase' => 'PhabricatorTestCase', 6476 6475 'HeraldUtilityActionGroup' => 'HeraldActionGroup', 6477 6476 'Javelin' => 'Phobject', 6478 - 'JavelinViewExampleServerView' => 'AphrontView', 6479 6477 'LegalpadController' => 'PhabricatorController', 6480 6478 'LegalpadCreateDocumentsCapability' => 'PhabricatorPolicyCapability', 6481 6479 'LegalpadDAO' => 'PhabricatorLiskDAO',
+8 -3
src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php
··· 17 17 $nav = new AphrontSideNavFilterView(); 18 18 $nav->setBaseURI(new PhutilURI($this->getApplicationURI('view/'))); 19 19 20 - foreach ($classes as $class => $obj) { 21 - $name = $obj->getName(); 22 - $nav->addFilter($class, $name); 20 + $groups = mgroup($classes, 'getCategory'); 21 + ksort($groups); 22 + foreach ($groups as $group => $group_classes) { 23 + $nav->addLabel($group); 24 + foreach ($group_classes as $class => $obj) { 25 + $name = $obj->getName(); 26 + $nav->addFilter($class, $name); 27 + } 23 28 } 24 29 25 30 $selected = $nav->selectFilter($id, head_key($classes));
-14
src/applications/uiexample/examples/JavelinViewExampleServerView.php
··· 1 - <?php 2 - 3 - final class JavelinViewExampleServerView extends AphrontView { 4 - 5 - public function render() { 6 - return phutil_tag( 7 - 'div', 8 - array( 9 - 'class' => 'server-view', 10 - ), 11 - $this->renderChildren()); 12 - } 13 - 14 - }
+6 -2
src/applications/uiexample/examples/MacroEmojiExample.php
··· 3 3 final class MacroEmojiExample extends PhabricatorUIExample { 4 4 5 5 public function getName() { 6 - return pht('Emoji Support'); 6 + return pht('Emoji'); 7 7 } 8 8 9 9 public function getDescription() { 10 - return pht('Shiny happy people holding hands'); 10 + return pht('Shiny happy people holding hands.'); 11 + } 12 + 13 + public function getCategory() { 14 + return pht('Catalogs'); 11 15 } 12 16 13 17 public function renderExample() {
+4
src/applications/uiexample/examples/PHUIBadgeExample.php
··· 10 10 return pht('Celebrate the moments of your life.'); 11 11 } 12 12 13 + public function getCategory() { 14 + return pht('Single Use'); 15 + } 16 + 13 17 public function renderExample() { 14 18 15 19 $badges1 = array();
+4
src/applications/uiexample/examples/PHUIColorPalletteExample.php
··· 10 10 return pht('A Standard Palette of Colors for use.'); 11 11 } 12 12 13 + public function getCategory() { 14 + return pht('Catalogs'); 15 + } 16 + 13 17 public function renderExample() { 14 18 15 19 $colors = array(
+5 -1
src/applications/uiexample/examples/PHUIFeedStoryExample.php
··· 8 8 9 9 public function getDescription() { 10 10 return pht( 11 - 'An outlandish exaggeration of intricate tales from around the realm'); 11 + 'An outlandish exaggeration of intricate tales from around the realm.'); 12 + } 13 + 14 + public function getCategory() { 15 + return pht('Single Use'); 12 16 } 13 17 14 18 public function renderExample() {
+4
src/applications/uiexample/examples/PHUIHovercardUIExample.php
··· 12 12 phutil_tag('tt', array(), 'PHUIHovercardView')); 13 13 } 14 14 15 + public function getCategory() { 16 + return pht('Single Use'); 17 + } 18 + 15 19 public function renderExample() { 16 20 $request = $this->getRequest(); 17 21 $user = $request->getUser();
+4
src/applications/uiexample/examples/PHUIIconExample.php
··· 10 10 return pht('Easily render icons or images with links and sprites.'); 11 11 } 12 12 13 + public function getCategory() { 14 + return pht('Catalogs'); 15 + } 16 + 13 17 private function listTransforms() { 14 18 return array( 15 19 'ph-rotate-90',
+5 -1
src/applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php
··· 3 3 final class PhabricatorFilesComposeAvatarExample extends PhabricatorUIExample { 4 4 5 5 public function getName() { 6 - return pht('Generate Avatar Images'); 6 + return pht('Avatars'); 7 7 } 8 8 9 9 public function getDescription() { 10 10 return pht('Tests various color palettes and sizes.'); 11 + } 12 + 13 + public function getCategory() { 14 + return pht('Technical'); 11 15 } 12 16 13 17 public function renderExample() {
+4
src/applications/uiexample/examples/PhabricatorGestureUIExample.php
··· 14 14 phutil_tag('tt', array(), 'touchable')); 15 15 } 16 16 17 + public function getCategory() { 18 + return pht('Technical'); 19 + } 20 + 17 21 public function renderExample() { 18 22 $id = celerity_generate_unique_node_id(); 19 23
+4
src/applications/uiexample/examples/PhabricatorNotificationUIExample.php
··· 12 12 phutil_tag('tt', array(), 'JX.Notification')); 13 13 } 14 14 15 + public function getCategory() { 16 + return pht('Technical'); 17 + } 18 + 15 19 public function renderExample() { 16 20 require_celerity_resource('phabricator-notification-css'); 17 21 Javelin::initBehavior('phabricator-notification-example');
+4
src/applications/uiexample/examples/PhabricatorRemarkupUIExample.php
··· 11 11 'Demonstrates the visual appearance of various Remarkup elements.'); 12 12 } 13 13 14 + public function getCategory() { 15 + return pht('Technical'); 16 + } 17 + 14 18 public function renderExample() { 15 19 $viewer = $this->getRequest()->getUser(); 16 20
+4
src/applications/uiexample/examples/PhabricatorSetupIssueUIExample.php
··· 10 10 return pht('Setup errors and warnings.'); 11 11 } 12 12 13 + public function getCategory() { 14 + return pht('Single Use'); 15 + } 16 + 13 17 public function renderExample() { 14 18 $request = $this->getRequest(); 15 19 $user = $request->getUser();
+4
src/applications/uiexample/examples/PhabricatorUIExample.php
··· 17 17 abstract public function getDescription(); 18 18 abstract public function renderExample(); 19 19 20 + public function getCategory() { 21 + return pht('General'); 22 + } 23 + 20 24 protected function createBasicDummyHandle($name, $type, $fullname = null, 21 25 $uri = null) { 22 26