@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.

Remove some old UIExamples

Summary: Ref M1476. I'm going to see if I can set up side-by-side "PHUI" vs "PHUIX" to make maintaining them a touch easier. Before doing that, nuke some really old UI examples that don't seem very useful.

Test Plan: Viewed UIExamples, saw fewer bad ones.

Reviewers: chad

Reviewed By: chad

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

-813
-80
resources/celerity/map.php
··· 452 452 'rsrc/js/application/transactions/behavior-transaction-list.js' => '1f6794f6', 453 453 'rsrc/js/application/typeahead/behavior-typeahead-browse.js' => '635de1ec', 454 454 'rsrc/js/application/typeahead/behavior-typeahead-search.js' => '93d0c9e3', 455 - 'rsrc/js/application/uiexample/JavelinViewExample.js' => 'd4a14807', 456 - 'rsrc/js/application/uiexample/ReactorButtonExample.js' => 'd19198c8', 457 - 'rsrc/js/application/uiexample/ReactorCheckboxExample.js' => '519705ea', 458 - 'rsrc/js/application/uiexample/ReactorFocusExample.js' => '40a6a403', 459 - 'rsrc/js/application/uiexample/ReactorInputExample.js' => '886fd850', 460 - 'rsrc/js/application/uiexample/ReactorMouseoverExample.js' => '47c794d8', 461 - 'rsrc/js/application/uiexample/ReactorRadioExample.js' => '988040b4', 462 - 'rsrc/js/application/uiexample/ReactorSelectExample.js' => 'a155550f', 463 - 'rsrc/js/application/uiexample/ReactorSendClassExample.js' => '1def2711', 464 - 'rsrc/js/application/uiexample/ReactorSendPropertiesExample.js' => 'b1f0ccee', 465 - 'rsrc/js/application/uiexample/busy-example.js' => '60479091', 466 455 'rsrc/js/application/uiexample/gesture-example.js' => '558829c2', 467 456 'rsrc/js/application/uiexample/notification-example.js' => '8ce821c5', 468 457 'rsrc/js/core/Busy.js' => '59a7976a', ··· 653 642 'javelin-behavior-passphrase-credential-control' => '3cb0b2fc', 654 643 'javelin-behavior-phabricator-active-nav' => 'e379b58e', 655 644 'javelin-behavior-phabricator-autofocus' => '7319e029', 656 - 'javelin-behavior-phabricator-busy-example' => '60479091', 657 645 'javelin-behavior-phabricator-file-tree' => '88236f00', 658 646 'javelin-behavior-phabricator-gesture' => '3ab51e2c', 659 647 'javelin-behavior-phabricator-gesture-example' => '558829c2', ··· 808 796 'phabricator-title' => '485aaa6c', 809 797 'phabricator-tooltip' => '358b8c04', 810 798 'phabricator-ui-example-css' => '528b19de', 811 - 'phabricator-uiexample-javelin-view' => 'd4a14807', 812 - 'phabricator-uiexample-reactor-button' => 'd19198c8', 813 - 'phabricator-uiexample-reactor-checkbox' => '519705ea', 814 - 'phabricator-uiexample-reactor-focus' => '40a6a403', 815 - 'phabricator-uiexample-reactor-input' => '886fd850', 816 - 'phabricator-uiexample-reactor-mouseover' => '47c794d8', 817 - 'phabricator-uiexample-reactor-radio' => '988040b4', 818 - 'phabricator-uiexample-reactor-select' => 'a155550f', 819 - 'phabricator-uiexample-reactor-sendclass' => '1def2711', 820 - 'phabricator-uiexample-reactor-sendproperties' => 'b1f0ccee', 821 799 'phabricator-zindex-css' => '9d8f7c4b', 822 800 'phame-css' => 'b3a0b3a3', 823 801 'pholio-css' => 'ca89d380', ··· 1022 1000 '1d17130f' => array( 1023 1001 'javelin-dom', 1024 1002 ), 1025 - '1def2711' => array( 1026 - 'javelin-install', 1027 - 'javelin-dom', 1028 - 'javelin-reactor-dom', 1029 - ), 1030 1003 '1e911d0f' => array( 1031 1004 'javelin-stratcom', 1032 1005 'javelin-request', ··· 1175 1148 'javelin-workflow', 1176 1149 'phabricator-draggable-list', 1177 1150 ), 1178 - '40a6a403' => array( 1179 - 'javelin-install', 1180 - 'javelin-dom', 1181 - 'javelin-reactor-dom', 1182 - ), 1183 1151 42126667 => array( 1184 1152 'javelin-behavior', 1185 1153 'javelin-dom', ··· 1213 1181 'javelin-dom', 1214 1182 'javelin-view-renderer', 1215 1183 'javelin-install', 1216 - ), 1217 - '47c794d8' => array( 1218 - 'javelin-install', 1219 - 'javelin-dom', 1220 - 'javelin-reactor-dom', 1221 1184 ), 1222 1185 48086888 => array( 1223 1186 'javelin-behavior', ··· 1285 1248 'javelin-typeahead-source', 1286 1249 'javelin-util', 1287 1250 ), 1288 - '519705ea' => array( 1289 - 'javelin-install', 1290 - 'javelin-dom', 1291 - 'javelin-reactor-dom', 1292 - ), 1293 1251 '51c5ad07' => array( 1294 1252 'javelin-behavior', 1295 1253 'javelin-stratcom', ··· 1385 1343 'javelin-util', 1386 1344 'phabricator-prefab', 1387 1345 'javelin-json', 1388 - ), 1389 - 60479091 => array( 1390 - 'phabricator-busy', 1391 - 'javelin-behavior', 1392 1346 ), 1393 1347 '60821bc7' => array( 1394 1348 'javelin-behavior', ··· 1558 1512 'phabricator-keyboard-shortcut', 1559 1513 'javelin-stratcom', 1560 1514 ), 1561 - '886fd850' => array( 1562 - 'javelin-install', 1563 - 'javelin-reactor-dom', 1564 - 'javelin-view-html', 1565 - 'javelin-view-interpreter', 1566 - 'javelin-view-renderer', 1567 - ), 1568 1515 '887ad43f' => array( 1569 1516 'javelin-behavior', 1570 1517 'javelin-request', ··· 1655 1602 '983751ee' => array( 1656 1603 'phui-inline-comment-view-css', 1657 1604 ), 1658 - '988040b4' => array( 1659 - 'javelin-install', 1660 - 'javelin-dom', 1661 - 'javelin-reactor-dom', 1662 - ), 1663 1605 '9a6dd75c' => array( 1664 1606 'javelin-behavior', 1665 1607 'javelin-stratcom', ··· 1697 1639 'javelin-util', 1698 1640 'phabricator-keyboard-shortcut', 1699 1641 ), 1700 - 'a155550f' => array( 1701 - 'javelin-install', 1702 - 'javelin-dom', 1703 - 'javelin-reactor-dom', 1704 - ), 1705 1642 'a3a63478' => array( 1706 1643 'phui-workcard-view-css', 1707 1644 ), ··· 1791 1728 'javelin-stratcom', 1792 1729 'javelin-dom', 1793 1730 'phuix-dropdown-menu', 1794 - ), 1795 - 'b1f0ccee' => array( 1796 - 'javelin-install', 1797 - 'javelin-dom', 1798 - 'javelin-reactor-dom', 1799 1731 ), 1800 1732 'b23b49e6' => array( 1801 1733 'javelin-behavior', ··· 2013 1945 'javelin-workflow', 2014 1946 'phuix-icon-view', 2015 1947 ), 2016 - 'd19198c8' => array( 2017 - 'javelin-install', 2018 - 'javelin-dom', 2019 - 'javelin-util', 2020 - 'javelin-dynval', 2021 - 'javelin-reactor-dom', 2022 - ), 2023 1948 'd254d646' => array( 2024 1949 'javelin-util', 2025 1950 ), ··· 2028 1953 'javelin-install', 2029 1954 'javelin-uri', 2030 1955 'javelin-util', 2031 - ), 2032 - 'd4a14807' => array( 2033 - 'javelin-install', 2034 - 'javelin-dom', 2035 - 'javelin-view', 2036 1956 ), 2037 1957 'd4eecc63' => array( 2038 1958 'javelin-behavior',
-16
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 - 'JavelinReactorUIExample' => 'applications/uiexample/examples/JavelinReactorUIExample.php', 1399 - 'JavelinUIExample' => 'applications/uiexample/examples/JavelinUIExample.php', 1400 1398 'JavelinViewExampleServerView' => 'applications/uiexample/examples/JavelinViewExampleServerView.php', 1401 - 'JavelinViewUIExample' => 'applications/uiexample/examples/JavelinViewUIExample.php', 1402 1399 'LegalpadController' => 'applications/legalpad/controller/LegalpadController.php', 1403 1400 'LegalpadCreateDocumentsCapability' => 'applications/legalpad/capability/LegalpadCreateDocumentsCapability.php', 1404 1401 'LegalpadDAO' => 'applications/legalpad/storage/LegalpadDAO.php', ··· 2146 2143 'PhabricatorBadgesTransactionComment' => 'applications/badges/storage/PhabricatorBadgesTransactionComment.php', 2147 2144 'PhabricatorBadgesTransactionQuery' => 'applications/badges/query/PhabricatorBadgesTransactionQuery.php', 2148 2145 'PhabricatorBadgesViewController' => 'applications/badges/controller/PhabricatorBadgesViewController.php', 2149 - 'PhabricatorBarePageUIExample' => 'applications/uiexample/examples/PhabricatorBarePageUIExample.php', 2150 2146 'PhabricatorBarePageView' => 'view/page/PhabricatorBarePageView.php', 2151 2147 'PhabricatorBaseURISetupCheck' => 'applications/config/check/PhabricatorBaseURISetupCheck.php', 2152 2148 'PhabricatorBcryptPasswordHasher' => 'infrastructure/util/password/PhabricatorBcryptPasswordHasher.php', ··· 2161 2157 'PhabricatorBuiltinDraftEngine' => 'applications/transactions/draft/PhabricatorBuiltinDraftEngine.php', 2162 2158 'PhabricatorBuiltinPatchList' => 'infrastructure/storage/patch/PhabricatorBuiltinPatchList.php', 2163 2159 'PhabricatorBulkContentSource' => 'infrastructure/daemon/contentsource/PhabricatorBulkContentSource.php', 2164 - 'PhabricatorBusyUIExample' => 'applications/uiexample/examples/PhabricatorBusyUIExample.php', 2165 2160 'PhabricatorCacheDAO' => 'applications/cache/storage/PhabricatorCacheDAO.php', 2166 2161 'PhabricatorCacheEngine' => 'applications/system/engine/PhabricatorCacheEngine.php', 2167 2162 'PhabricatorCacheEngineExtension' => 'applications/system/engine/PhabricatorCacheEngineExtension.php', ··· 3030 3025 'PhabricatorLiskFulltextEngineExtension' => 'applications/search/engineextension/PhabricatorLiskFulltextEngineExtension.php', 3031 3026 'PhabricatorLiskSearchEngineExtension' => 'applications/search/engineextension/PhabricatorLiskSearchEngineExtension.php', 3032 3027 'PhabricatorLiskSerializer' => 'infrastructure/storage/lisk/PhabricatorLiskSerializer.php', 3033 - 'PhabricatorListFilterUIExample' => 'applications/uiexample/examples/PhabricatorListFilterUIExample.php', 3034 3028 'PhabricatorLocalDiskFileStorageEngine' => 'applications/files/engine/PhabricatorLocalDiskFileStorageEngine.php', 3035 3029 'PhabricatorLocalTimeTestCase' => 'view/__tests__/PhabricatorLocalTimeTestCase.php', 3036 3030 'PhabricatorLocaleScopeGuard' => 'infrastructure/internationalization/scope/PhabricatorLocaleScopeGuard.php', ··· 3996 3990 'PhabricatorSlowvoteVoteController' => 'applications/slowvote/controller/PhabricatorSlowvoteVoteController.php', 3997 3991 'PhabricatorSlug' => 'infrastructure/util/PhabricatorSlug.php', 3998 3992 'PhabricatorSlugTestCase' => 'infrastructure/util/__tests__/PhabricatorSlugTestCase.php', 3999 - 'PhabricatorSortTableUIExample' => 'applications/uiexample/examples/PhabricatorSortTableUIExample.php', 4000 3993 'PhabricatorSourceCodeView' => 'view/layout/PhabricatorSourceCodeView.php', 4001 3994 'PhabricatorSpaceEditField' => 'applications/transactions/editfield/PhabricatorSpaceEditField.php', 4002 3995 'PhabricatorSpacesApplication' => 'applications/spaces/application/PhabricatorSpacesApplication.php', ··· 4160 4153 'PhabricatorTokensCurtainExtension' => 'applications/tokens/engineextension/PhabricatorTokensCurtainExtension.php', 4161 4154 'PhabricatorTokensSettingsPanel' => 'applications/settings/panel/PhabricatorTokensSettingsPanel.php', 4162 4155 'PhabricatorTokensToken' => 'applications/tokens/storage/PhabricatorTokensToken.php', 4163 - 'PhabricatorTooltipUIExample' => 'applications/uiexample/examples/PhabricatorTooltipUIExample.php', 4164 4156 'PhabricatorTransactionChange' => 'applications/transactions/data/PhabricatorTransactionChange.php', 4165 4157 'PhabricatorTransactionRemarkupChange' => 'applications/transactions/data/PhabricatorTransactionRemarkupChange.php', 4166 4158 'PhabricatorTransactions' => 'applications/transactions/constants/PhabricatorTransactions.php', ··· 6483 6475 'HeraldTranscriptTestCase' => 'PhabricatorTestCase', 6484 6476 'HeraldUtilityActionGroup' => 'HeraldActionGroup', 6485 6477 'Javelin' => 'Phobject', 6486 - 'JavelinReactorUIExample' => 'PhabricatorUIExample', 6487 - 'JavelinUIExample' => 'PhabricatorUIExample', 6488 6478 'JavelinViewExampleServerView' => 'AphrontView', 6489 - 'JavelinViewUIExample' => 'PhabricatorUIExample', 6490 6479 'LegalpadController' => 'PhabricatorController', 6491 6480 'LegalpadCreateDocumentsCapability' => 'PhabricatorPolicyCapability', 6492 6481 'LegalpadDAO' => 'PhabricatorLiskDAO', ··· 7342 7331 'PhabricatorBadgesTransactionComment' => 'PhabricatorApplicationTransactionComment', 7343 7332 'PhabricatorBadgesTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 7344 7333 'PhabricatorBadgesViewController' => 'PhabricatorBadgesProfileController', 7345 - 'PhabricatorBarePageUIExample' => 'PhabricatorUIExample', 7346 7334 'PhabricatorBarePageView' => 'AphrontPageView', 7347 7335 'PhabricatorBaseURISetupCheck' => 'PhabricatorSetupCheck', 7348 7336 'PhabricatorBcryptPasswordHasher' => 'PhabricatorPasswordHasher', ··· 7357 7345 'PhabricatorBuiltinDraftEngine' => 'PhabricatorDraftEngine', 7358 7346 'PhabricatorBuiltinPatchList' => 'PhabricatorSQLPatchList', 7359 7347 'PhabricatorBulkContentSource' => 'PhabricatorContentSource', 7360 - 'PhabricatorBusyUIExample' => 'PhabricatorUIExample', 7361 7348 'PhabricatorCacheDAO' => 'PhabricatorLiskDAO', 7362 7349 'PhabricatorCacheEngine' => 'Phobject', 7363 7350 'PhabricatorCacheEngineExtension' => 'Phobject', ··· 8358 8345 'PhabricatorLiskFulltextEngineExtension' => 'PhabricatorFulltextEngineExtension', 8359 8346 'PhabricatorLiskSearchEngineExtension' => 'PhabricatorSearchEngineExtension', 8360 8347 'PhabricatorLiskSerializer' => 'Phobject', 8361 - 'PhabricatorListFilterUIExample' => 'PhabricatorUIExample', 8362 8348 'PhabricatorLocalDiskFileStorageEngine' => 'PhabricatorFileStorageEngine', 8363 8349 'PhabricatorLocalTimeTestCase' => 'PhabricatorTestCase', 8364 8350 'PhabricatorLocaleScopeGuard' => 'Phobject', ··· 9523 9509 'PhabricatorSlowvoteVoteController' => 'PhabricatorSlowvoteController', 9524 9510 'PhabricatorSlug' => 'Phobject', 9525 9511 'PhabricatorSlugTestCase' => 'PhabricatorTestCase', 9526 - 'PhabricatorSortTableUIExample' => 'PhabricatorUIExample', 9527 9512 'PhabricatorSourceCodeView' => 'AphrontView', 9528 9513 'PhabricatorSpaceEditField' => 'PhabricatorEditField', 9529 9514 'PhabricatorSpacesApplication' => 'PhabricatorApplication', ··· 9704 9689 'PhabricatorFlaggableInterface', 9705 9690 'PhabricatorConduitResultInterface', 9706 9691 ), 9707 - 'PhabricatorTooltipUIExample' => 'PhabricatorUIExample', 9708 9692 'PhabricatorTransactionChange' => 'Phobject', 9709 9693 'PhabricatorTransactionRemarkupChange' => 'PhabricatorTransactionChange', 9710 9694 'PhabricatorTransactions' => 'Phobject',
-95
src/applications/uiexample/examples/JavelinReactorUIExample.php
··· 1 - <?php 2 - 3 - final class JavelinReactorUIExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('Javelin Reactor'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht('Lots of code'); 11 - } 12 - 13 - public function renderExample() { 14 - $rows = array(); 15 - 16 - $examples = array( 17 - array( 18 - pht('Reactive button only generates a stream of events'), 19 - 'ReactorButtonExample', 20 - 'phabricator-uiexample-reactor-button', 21 - array(), 22 - ), 23 - array( 24 - pht('Reactive checkbox generates a boolean dynamic value'), 25 - 'ReactorCheckboxExample', 26 - 'phabricator-uiexample-reactor-checkbox', 27 - array('checked' => true), 28 - ), 29 - array( 30 - pht('Reactive focus detector generates a boolean dynamic value'), 31 - 'ReactorFocusExample', 32 - 'phabricator-uiexample-reactor-focus', 33 - array(), 34 - ), 35 - array( 36 - pht('Reactive input box, with normal and calmed output'), 37 - 'ReactorInputExample', 38 - 'phabricator-uiexample-reactor-input', 39 - array('init' => 'Initial value'), 40 - ), 41 - array( 42 - pht('Reactive mouseover detector generates a boolean dynamic value'), 43 - 'ReactorMouseoverExample', 44 - 'phabricator-uiexample-reactor-mouseover', 45 - array(), 46 - ), 47 - array( 48 - pht('Reactive radio buttons generate a string dynamic value'), 49 - 'ReactorRadioExample', 50 - 'phabricator-uiexample-reactor-radio', 51 - array(), 52 - ), 53 - array( 54 - pht('Reactive select box generates a string dynamic value'), 55 - 'ReactorSelectExample', 56 - 'phabricator-uiexample-reactor-select', 57 - array(), 58 - ), 59 - array( 60 - pht( 61 - '%s makes the class of an element a string dynamic value', 62 - 'sendclass'), 63 - 'ReactorSendClassExample', 64 - 'phabricator-uiexample-reactor-sendclass', 65 - array(), 66 - ), 67 - array( 68 - pht( 69 - '%s makes some properties of an object into dynamic values', 70 - 'sendproperties'), 71 - 'ReactorSendPropertiesExample', 72 - 'phabricator-uiexample-reactor-sendproperties', 73 - array(), 74 - ), 75 - ); 76 - 77 - foreach ($examples as $example) { 78 - list($desc, $name, $resource, $params) = $example; 79 - $template = new AphrontJavelinView(); 80 - $template 81 - ->setName($name) 82 - ->setParameters($params) 83 - ->setCelerityResource($resource); 84 - $rows[] = array($desc, $template->render()); 85 - } 86 - 87 - $table = new AphrontTableView($rows); 88 - 89 - $panel = new PHUIObjectBoxView(); 90 - $panel->setHeaderText(pht('Example')); 91 - $panel->appendChild($table); 92 - 93 - return $panel; 94 - } 95 - }
-66
src/applications/uiexample/examples/JavelinUIExample.php
··· 1 - <?php 2 - 3 - final class JavelinUIExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('Javelin UI'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht('Here are some Javelin UI elements that you could use.'); 11 - } 12 - 13 - public function renderExample() { 14 - $request = $this->getRequest(); 15 - $user = $request->getUser(); 16 - 17 - // toggle-class 18 - 19 - $container_id = celerity_generate_unique_node_id(); 20 - $button_red_id = celerity_generate_unique_node_id(); 21 - $button_blue_id = celerity_generate_unique_node_id(); 22 - 23 - $button_red = javelin_tag( 24 - 'a', 25 - array( 26 - 'class' => 'button', 27 - 'sigil' => 'jx-toggle-class', 28 - 'href' => '#', 29 - 'id' => $button_red_id, 30 - 'meta' => array( 31 - 'map' => array( 32 - $container_id => 'jxui-red-border', 33 - $button_red_id => 'jxui-active', 34 - ), 35 - ), 36 - ), 37 - pht('Toggle Red Border')); 38 - 39 - $button_blue = javelin_tag( 40 - 'a', 41 - array( 42 - 'class' => 'button jxui-active', 43 - 'sigil' => 'jx-toggle-class', 44 - 'href' => '#', 45 - 'id' => $button_blue_id, 46 - 'meta' => array( 47 - 'state' => true, 48 - 'map' => array( 49 - $container_id => 'jxui-blue-background', 50 - $button_blue_id => 'jxui-active', 51 - ), 52 - ), 53 - ), 54 - pht('Toggle Blue Background')); 55 - 56 - $div = phutil_tag( 57 - 'div', 58 - array( 59 - 'id' => $container_id, 60 - 'class' => 'jxui-example-container jxui-blue-background', 61 - ), 62 - array($button_red, $button_blue)); 63 - 64 - return array($div); 65 - } 66 - }
-45
src/applications/uiexample/examples/JavelinViewUIExample.php
··· 1 - <?php 2 - 3 - final class JavelinViewUIExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('Javelin Views'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht('Mix and match client and server views.'); 11 - } 12 - 13 - public function renderExample() { 14 - 15 - $request = $this->getRequest(); 16 - 17 - $init = $request->getStr('init'); 18 - 19 - $parent_server_template = new JavelinViewExampleServerView(); 20 - 21 - $parent_client_template = new AphrontJavelinView(); 22 - $parent_client_template 23 - ->setName('JavelinViewExample') 24 - ->setCelerityResource('phabricator-uiexample-javelin-view'); 25 - 26 - $child_server_template = new JavelinViewExampleServerView(); 27 - 28 - $child_client_template = new AphrontJavelinView(); 29 - $child_client_template 30 - ->setName('JavelinViewExample') 31 - ->setCelerityResource('phabricator-uiexample-javelin-view'); 32 - 33 - $parent_server_template->appendChild($parent_client_template); 34 - $parent_client_template->appendChild($child_server_template); 35 - $child_server_template->appendChild($child_client_template); 36 - $child_client_template->appendChild(pht('Hey, it worked.')); 37 - 38 - $panel = new PHUIObjectBoxView(); 39 - $panel->setHeaderText(pht('Example')); 40 - $panel->appendChild( 41 - phutil_tag_div('ml', $parent_server_template)); 42 - 43 - return $panel; 44 - } 45 - }
-25
src/applications/uiexample/examples/PhabricatorBarePageUIExample.php
··· 1 - <?php 2 - 3 - final class PhabricatorBarePageUIExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('Bare Page'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht('This is a bare page.'); 11 - } 12 - 13 - public function renderExample() { 14 - $view = new PhabricatorBarePageView(); 15 - $view->appendChild( 16 - phutil_tag( 17 - 'h1', 18 - array(), 19 - $this->getDescription())); 20 - 21 - $response = new AphrontWebpageResponse(); 22 - $response->setContent($view->render()); 23 - return $response; 24 - } 25 - }
-17
src/applications/uiexample/examples/PhabricatorBusyUIExample.php
··· 1 - <?php 2 - 3 - final class PhabricatorBusyUIExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('Busy'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht('Busy.'); 11 - } 12 - 13 - public function renderExample() { 14 - Javelin::initBehavior('phabricator-busy-example'); 15 - return null; 16 - } 17 - }
-35
src/applications/uiexample/examples/PhabricatorListFilterUIExample.php
··· 1 - <?php 2 - 3 - final class PhabricatorListFilterUIExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('ListFilter'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht( 11 - 'Use %s to layout controls for filtering '. 12 - 'and manipulating lists of objects.', 13 - phutil_tag('tt', array(), 'AphrontListFilterView')); 14 - } 15 - 16 - public function renderExample() { 17 - 18 - $filter = new AphrontListFilterView(); 19 - 20 - $form = new AphrontFormView(); 21 - $form->setUser($this->getRequest()->getUser()); 22 - $form 23 - ->appendChild( 24 - id(new AphrontFormTextControl()) 25 - ->setLabel(pht('Query'))) 26 - ->appendChild( 27 - id(new AphrontFormSubmitControl()) 28 - ->setValue(pht('Search'))); 29 - 30 - $filter->appendChild($form); 31 - 32 - 33 - return $filter; 34 - } 35 - }
-96
src/applications/uiexample/examples/PhabricatorSortTableUIExample.php
··· 1 - <?php 2 - 3 - final class PhabricatorSortTableUIExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('Sortable Tables'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht('Using sortable tables.'); 11 - } 12 - 13 - public function renderExample() { 14 - 15 - $rows = array( 16 - array( 17 - 'make' => 'Honda', 18 - 'model' => 'Civic', 19 - 'year' => 2004, 20 - 'price' => 3199, 21 - 'color' => pht('Blue'), 22 - ), 23 - array( 24 - 'make' => 'Ford', 25 - 'model' => 'Focus', 26 - 'year' => 2001, 27 - 'price' => 2549, 28 - 'color' => pht('Red'), 29 - ), 30 - array( 31 - 'make' => 'Toyota', 32 - 'model' => 'Camry', 33 - 'year' => 2009, 34 - 'price' => 4299, 35 - 'color' => pht('Black'), 36 - ), 37 - array( 38 - 'make' => 'NASA', 39 - 'model' => 'Shuttle', 40 - 'year' => 1998, 41 - 'price' => 1000000000, 42 - 'color' => pht('White'), 43 - ), 44 - ); 45 - 46 - $request = $this->getRequest(); 47 - 48 - $orders = array( 49 - 'make', 50 - 'model', 51 - 'year', 52 - 'price', 53 - ); 54 - 55 - $sort = $request->getStr('sort'); 56 - list($sort, $reverse) = AphrontTableView::parseSort($sort); 57 - if (!in_array($sort, $orders)) { 58 - $sort = 'make'; 59 - } 60 - 61 - $rows = isort($rows, $sort); 62 - if ($reverse) { 63 - $rows = array_reverse($rows); 64 - } 65 - 66 - $table = new AphrontTableView($rows); 67 - $table->setHeaders( 68 - array( 69 - pht('Make'), 70 - pht('Model'), 71 - pht('Year'), 72 - pht('Price'), 73 - pht('Color'), 74 - )); 75 - $table->setColumnClasses( 76 - array( 77 - '', 78 - 'wide', 79 - 'n', 80 - 'n', 81 - '', 82 - )); 83 - $table->makeSortable( 84 - $request->getRequestURI(), 85 - 'sort', 86 - $sort, 87 - $reverse, 88 - $orders); 89 - 90 - $panel = new PHUIObjectBoxView(); 91 - $panel->setHeaderText(pht('Sortable Table of Vehicles')); 92 - $panel->setTable($table); 93 - 94 - return $panel; 95 - } 96 - }
-102
src/applications/uiexample/examples/PhabricatorTooltipUIExample.php
··· 1 - <?php 2 - 3 - final class PhabricatorTooltipUIExample extends PhabricatorUIExample { 4 - 5 - public function getName() { 6 - return pht('Tooltips'); 7 - } 8 - 9 - public function getDescription() { 10 - return pht( 11 - 'Use %s to create tooltips.', 12 - phutil_tag('tt', array(), 'JX.Tooltip')); 13 - } 14 - 15 - public function renderExample() { 16 - 17 - Javelin::initBehavior('phabricator-tooltips'); 18 - require_celerity_resource('aphront-tooltip-css'); 19 - 20 - $style = 'width: 200px; '. 21 - 'text-align: center; '. 22 - 'margin: 20px; '. 23 - 'background: #dfdfdf; '. 24 - 'padding: 20px 10px; '. 25 - 'border: 1px solid black; '; 26 - 27 - $lorem = <<<EOTEXT 28 - Lorem ipsum dolor sit amet, consectetur adipiscing elit. 29 - EOTEXT; 30 - 31 - $overflow = str_repeat('M', 1024); 32 - 33 - $metas = array( 34 - 'hi' => array( 35 - 'tip' => 'Hi', 36 - ), 37 - 'lorem (north)' => array( 38 - 'tip' => $lorem, 39 - ), 40 - 'lorem (east)' => array( 41 - 'tip' => $lorem, 42 - 'align' => 'E', 43 - ), 44 - 'lorem (south)' => array( 45 - 'tip' => $lorem, 46 - 'align' => 'S', 47 - ), 48 - 'lorem (west)' => array( 49 - 'tip' => $lorem, 50 - 'align' => 'W', 51 - ), 52 - 'lorem (large, north)' => array( 53 - 'tip' => $lorem, 54 - 'size' => 300, 55 - ), 56 - 'lorem (large, east)' => array( 57 - 'tip' => $lorem, 58 - 'size' => 300, 59 - 'align' => 'E', 60 - ), 61 - 'lorem (large, west)' => array( 62 - 'tip' => $lorem, 63 - 'size' => 300, 64 - 'align' => 'W', 65 - ), 66 - 'lorem (large, south)' => array( 67 - 'tip' => $lorem, 68 - 'size' => 300, 69 - 'align' => 'S', 70 - ), 71 - 'overflow (north)' => array( 72 - 'tip' => $overflow, 73 - ), 74 - 'overflow (east)' => array( 75 - 'tip' => $overflow, 76 - 'align' => 'E', 77 - ), 78 - 'overflow (south)' => array( 79 - 'tip' => $overflow, 80 - 'align' => 'S', 81 - ), 82 - 'overflow (west)' => array( 83 - 'tip' => $overflow, 84 - 'align' => 'W', 85 - ), 86 - ); 87 - 88 - $content = array(); 89 - foreach ($metas as $key => $meta) { 90 - $content[] = javelin_tag( 91 - 'div', 92 - array( 93 - 'sigil' => 'has-tooltip', 94 - 'meta' => $meta, 95 - 'style' => $style, 96 - ), 97 - $key); 98 - } 99 - 100 - return $content; 101 - } 102 - }
-19
webroot/rsrc/js/application/uiexample/JavelinViewExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-javelin-view 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-view 6 - */ 7 - 8 - JX.install('JavelinViewExample', { 9 - extend: 'View', 10 - members: { 11 - render: function(rendered_children) { 12 - return JX.$N( 13 - 'div', 14 - { className: 'client-view' }, 15 - rendered_children 16 - ); 17 - } 18 - } 19 - });
-38
webroot/rsrc/js/application/uiexample/ReactorButtonExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-button 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-util 6 - * javelin-dynval 7 - * javelin-reactor-dom 8 - */ 9 - 10 - JX.install('ReactorButtonExample', { 11 - extend: 'View', 12 - members: { 13 - render: function() { 14 - var button = JX.$N('button', {}, 'Fun'); 15 - var clicks = JX.RDOM.clickPulses(button); 16 - 17 - var time = JX.RDOM.time(); 18 - 19 - // function snapshot(pulses, dynval) { 20 - // return new DynVal( 21 - // pulses.transform(JX.bind(dynval, dynval.getValueNow)), 22 - // dynval.getValueNow() 23 - // ); 24 - // } 25 - // 26 - // Below could be... 27 - // time.snapshot(clicks) 28 - // clicks.snapshot(time) 29 - 30 - var snapshot_time = new JX.DynVal( 31 - clicks.transform(JX.bind(time, time.getValueNow)), 32 - time.getValueNow() 33 - ); 34 - 35 - return [button, JX.RDOM.$DT(snapshot_time)]; 36 - } 37 - } 38 - });
-17
webroot/rsrc/js/application/uiexample/ReactorCheckboxExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-checkbox 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-reactor-dom 6 - */ 7 - 8 - JX.install('ReactorCheckboxExample', { 9 - extend: 'View', 10 - members: { 11 - render: function() { 12 - var checkbox = JX.$N('input', {type: 'checkbox'}); 13 - 14 - return [checkbox, JX.RDOM.$DT(JX.RDOM.checkbox(checkbox))]; 15 - } 16 - } 17 - });
-16
webroot/rsrc/js/application/uiexample/ReactorFocusExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-focus 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-reactor-dom 6 - */ 7 - 8 - JX.install('ReactorFocusExample', { 9 - extend: 'View', 10 - members: { 11 - render: function() { 12 - var input = JX.$N('input'); 13 - return [input, JX.RDOM.$DT(JX.RDOM.hasFocus(input))]; 14 - } 15 - } 16 - });
-32
webroot/rsrc/js/application/uiexample/ReactorInputExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-input 3 - * @requires javelin-install 4 - * javelin-reactor-dom 5 - * javelin-view-html 6 - * javelin-view-interpreter 7 - * javelin-view-renderer 8 - */ 9 - 10 - JX.install('ReactorInputExample', { 11 - extend: 'View', 12 - members: { 13 - render: function() { 14 - var html = JX.HTMLView.registerToInterpreter(new JX.ViewInterpreter()); 15 - 16 - var raw_input = JX.ViewRenderer.render( 17 - html.input({ value: this.getAttr('init') }) 18 - ); 19 - var input = JX.RDOM.input(raw_input); 20 - 21 - return JX.ViewRenderer.render( 22 - html.div( 23 - raw_input, 24 - html.br(), 25 - html.span(JX.RDOM.$DT(input)), 26 - html.br(), 27 - html.span(JX.RDOM.$DT(input.calm(500))) 28 - ) 29 - ); 30 - } 31 - } 32 - });
-16
webroot/rsrc/js/application/uiexample/ReactorMouseoverExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-mouseover 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-reactor-dom 6 - */ 7 - 8 - JX.install('ReactorMouseoverExample', { 9 - extend: 'View', 10 - members: { 11 - render: function() { 12 - var target = JX.$N('span', 'mouseover me '); 13 - return [target, JX.RDOM.$DT(JX.RDOM.isMouseOver(target))]; 14 - } 15 - } 16 - });
-24
webroot/rsrc/js/application/uiexample/ReactorRadioExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-radio 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-reactor-dom 6 - */ 7 - 8 - JX.install('ReactorRadioExample', { 9 - extend: 'View', 10 - members: { 11 - render: function() { 12 - var radio_one = JX.$N('input', {type: 'radio', name: 'n', value: 'one'}); 13 - var radio_two = JX.$N('input', {type: 'radio', name: 'n', value: 'two'}); 14 - 15 - radio_one.checked = true; 16 - 17 - return [ 18 - radio_one, 19 - radio_two, 20 - JX.RDOM.$DT(JX.RDOM.radio([radio_one, radio_two])) 21 - ]; 22 - } 23 - } 24 - });
-21
webroot/rsrc/js/application/uiexample/ReactorSelectExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-select 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-reactor-dom 6 - */ 7 - 8 - JX.install('ReactorSelectExample', { 9 - extend: 'View', 10 - members: { 11 - render: function() { 12 - var select = JX.$N('select', {}, [ 13 - JX.$N('option', { value: 'goat' }, 'Goat'), 14 - JX.$N('option', { value: 'bat' }, 'Bat'), 15 - JX.$N('option', { value: 'duck' }, 'Duck') 16 - ]); 17 - 18 - return [select, JX.RDOM.$DT(JX.RDOM.select(select))]; 19 - } 20 - } 21 - });
-18
webroot/rsrc/js/application/uiexample/ReactorSendClassExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-sendclass 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-reactor-dom 6 - */ 7 - 8 - JX.install('ReactorSendClassExample', { 9 - extend: 'View', 10 - members: { 11 - render: function() { 12 - var input = JX.$N('input', { type: 'checkbox' }); 13 - var span = JX.$N('a', 'Hey'); 14 - JX.RDOM.sendClass(JX.RDOM.checkbox(input), span, 'disabled'); 15 - return [input, span]; 16 - } 17 - } 18 - });
-26
webroot/rsrc/js/application/uiexample/ReactorSendPropertiesExample.js
··· 1 - /** 2 - * @provides phabricator-uiexample-reactor-sendproperties 3 - * @requires javelin-install 4 - * javelin-dom 5 - * javelin-reactor-dom 6 - */ 7 - 8 - JX.install('ReactorSendPropertiesExample', { 9 - extend: 'View', 10 - members: { 11 - render: function() { 12 - var color = JX.$N('input', {value: '#fff000'}); 13 - var title = JX.$N('input', {value: 'seen on hover'}); 14 - var target = JX.$N('span', 'Change my color and title'); 15 - 16 - JX.RDOM.sendProps(target, { 17 - style: { 18 - backgroundColor: JX.RDOM.input(color) 19 - }, 20 - title: JX.RDOM.input(title) 21 - }); 22 - 23 - return [color, title, target]; 24 - } 25 - } 26 - });
-9
webroot/rsrc/js/application/uiexample/busy-example.js
··· 1 - /** 2 - * @provides javelin-behavior-phabricator-busy-example 3 - * @requires phabricator-busy 4 - * javelin-behavior 5 - */ 6 - 7 - JX.behavior('phabricator-busy-example', function() { 8 - JX.Busy.start(); 9 - });