1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40:55 +01:00

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
This commit is contained in:
epriestley 2017-05-30 15:49:41 -07:00
parent 2c0dab055f
commit 7725d7cc45
21 changed files with 0 additions and 813 deletions

View file

@ -452,17 +452,6 @@ return array(
'rsrc/js/application/transactions/behavior-transaction-list.js' => '1f6794f6',
'rsrc/js/application/typeahead/behavior-typeahead-browse.js' => '635de1ec',
'rsrc/js/application/typeahead/behavior-typeahead-search.js' => '93d0c9e3',
'rsrc/js/application/uiexample/JavelinViewExample.js' => 'd4a14807',
'rsrc/js/application/uiexample/ReactorButtonExample.js' => 'd19198c8',
'rsrc/js/application/uiexample/ReactorCheckboxExample.js' => '519705ea',
'rsrc/js/application/uiexample/ReactorFocusExample.js' => '40a6a403',
'rsrc/js/application/uiexample/ReactorInputExample.js' => '886fd850',
'rsrc/js/application/uiexample/ReactorMouseoverExample.js' => '47c794d8',
'rsrc/js/application/uiexample/ReactorRadioExample.js' => '988040b4',
'rsrc/js/application/uiexample/ReactorSelectExample.js' => 'a155550f',
'rsrc/js/application/uiexample/ReactorSendClassExample.js' => '1def2711',
'rsrc/js/application/uiexample/ReactorSendPropertiesExample.js' => 'b1f0ccee',
'rsrc/js/application/uiexample/busy-example.js' => '60479091',
'rsrc/js/application/uiexample/gesture-example.js' => '558829c2',
'rsrc/js/application/uiexample/notification-example.js' => '8ce821c5',
'rsrc/js/core/Busy.js' => '59a7976a',
@ -653,7 +642,6 @@ return array(
'javelin-behavior-passphrase-credential-control' => '3cb0b2fc',
'javelin-behavior-phabricator-active-nav' => 'e379b58e',
'javelin-behavior-phabricator-autofocus' => '7319e029',
'javelin-behavior-phabricator-busy-example' => '60479091',
'javelin-behavior-phabricator-file-tree' => '88236f00',
'javelin-behavior-phabricator-gesture' => '3ab51e2c',
'javelin-behavior-phabricator-gesture-example' => '558829c2',
@ -808,16 +796,6 @@ return array(
'phabricator-title' => '485aaa6c',
'phabricator-tooltip' => '358b8c04',
'phabricator-ui-example-css' => '528b19de',
'phabricator-uiexample-javelin-view' => 'd4a14807',
'phabricator-uiexample-reactor-button' => 'd19198c8',
'phabricator-uiexample-reactor-checkbox' => '519705ea',
'phabricator-uiexample-reactor-focus' => '40a6a403',
'phabricator-uiexample-reactor-input' => '886fd850',
'phabricator-uiexample-reactor-mouseover' => '47c794d8',
'phabricator-uiexample-reactor-radio' => '988040b4',
'phabricator-uiexample-reactor-select' => 'a155550f',
'phabricator-uiexample-reactor-sendclass' => '1def2711',
'phabricator-uiexample-reactor-sendproperties' => 'b1f0ccee',
'phabricator-zindex-css' => '9d8f7c4b',
'phame-css' => 'b3a0b3a3',
'pholio-css' => 'ca89d380',
@ -1022,11 +1000,6 @@ return array(
'1d17130f' => array(
'javelin-dom',
),
'1def2711' => array(
'javelin-install',
'javelin-dom',
'javelin-reactor-dom',
),
'1e911d0f' => array(
'javelin-stratcom',
'javelin-request',
@ -1175,11 +1148,6 @@ return array(
'javelin-workflow',
'phabricator-draggable-list',
),
'40a6a403' => array(
'javelin-install',
'javelin-dom',
'javelin-reactor-dom',
),
42126667 => array(
'javelin-behavior',
'javelin-dom',
@ -1214,11 +1182,6 @@ return array(
'javelin-view-renderer',
'javelin-install',
),
'47c794d8' => array(
'javelin-install',
'javelin-dom',
'javelin-reactor-dom',
),
48086888 => array(
'javelin-behavior',
'javelin-dom',
@ -1285,11 +1248,6 @@ return array(
'javelin-typeahead-source',
'javelin-util',
),
'519705ea' => array(
'javelin-install',
'javelin-dom',
'javelin-reactor-dom',
),
'51c5ad07' => array(
'javelin-behavior',
'javelin-stratcom',
@ -1386,10 +1344,6 @@ return array(
'phabricator-prefab',
'javelin-json',
),
60479091 => array(
'phabricator-busy',
'javelin-behavior',
),
'60821bc7' => array(
'javelin-behavior',
'javelin-stratcom',
@ -1558,13 +1512,6 @@ return array(
'phabricator-keyboard-shortcut',
'javelin-stratcom',
),
'886fd850' => array(
'javelin-install',
'javelin-reactor-dom',
'javelin-view-html',
'javelin-view-interpreter',
'javelin-view-renderer',
),
'887ad43f' => array(
'javelin-behavior',
'javelin-request',
@ -1655,11 +1602,6 @@ return array(
'983751ee' => array(
'phui-inline-comment-view-css',
),
'988040b4' => array(
'javelin-install',
'javelin-dom',
'javelin-reactor-dom',
),
'9a6dd75c' => array(
'javelin-behavior',
'javelin-stratcom',
@ -1697,11 +1639,6 @@ return array(
'javelin-util',
'phabricator-keyboard-shortcut',
),
'a155550f' => array(
'javelin-install',
'javelin-dom',
'javelin-reactor-dom',
),
'a3a63478' => array(
'phui-workcard-view-css',
),
@ -1792,11 +1729,6 @@ return array(
'javelin-dom',
'phuix-dropdown-menu',
),
'b1f0ccee' => array(
'javelin-install',
'javelin-dom',
'javelin-reactor-dom',
),
'b23b49e6' => array(
'javelin-behavior',
'javelin-dom',
@ -2013,13 +1945,6 @@ return array(
'javelin-workflow',
'phuix-icon-view',
),
'd19198c8' => array(
'javelin-install',
'javelin-dom',
'javelin-util',
'javelin-dynval',
'javelin-reactor-dom',
),
'd254d646' => array(
'javelin-util',
),
@ -2029,11 +1954,6 @@ return array(
'javelin-uri',
'javelin-util',
),
'd4a14807' => array(
'javelin-install',
'javelin-dom',
'javelin-view',
),
'd4eecc63' => array(
'javelin-behavior',
'javelin-dom',

View file

@ -1395,10 +1395,7 @@ phutil_register_library_map(array(
'HeraldTranscriptTestCase' => 'applications/herald/storage/__tests__/HeraldTranscriptTestCase.php',
'HeraldUtilityActionGroup' => 'applications/herald/action/HeraldUtilityActionGroup.php',
'Javelin' => 'infrastructure/javelin/Javelin.php',
'JavelinReactorUIExample' => 'applications/uiexample/examples/JavelinReactorUIExample.php',
'JavelinUIExample' => 'applications/uiexample/examples/JavelinUIExample.php',
'JavelinViewExampleServerView' => 'applications/uiexample/examples/JavelinViewExampleServerView.php',
'JavelinViewUIExample' => 'applications/uiexample/examples/JavelinViewUIExample.php',
'LegalpadController' => 'applications/legalpad/controller/LegalpadController.php',
'LegalpadCreateDocumentsCapability' => 'applications/legalpad/capability/LegalpadCreateDocumentsCapability.php',
'LegalpadDAO' => 'applications/legalpad/storage/LegalpadDAO.php',
@ -2146,7 +2143,6 @@ phutil_register_library_map(array(
'PhabricatorBadgesTransactionComment' => 'applications/badges/storage/PhabricatorBadgesTransactionComment.php',
'PhabricatorBadgesTransactionQuery' => 'applications/badges/query/PhabricatorBadgesTransactionQuery.php',
'PhabricatorBadgesViewController' => 'applications/badges/controller/PhabricatorBadgesViewController.php',
'PhabricatorBarePageUIExample' => 'applications/uiexample/examples/PhabricatorBarePageUIExample.php',
'PhabricatorBarePageView' => 'view/page/PhabricatorBarePageView.php',
'PhabricatorBaseURISetupCheck' => 'applications/config/check/PhabricatorBaseURISetupCheck.php',
'PhabricatorBcryptPasswordHasher' => 'infrastructure/util/password/PhabricatorBcryptPasswordHasher.php',
@ -2161,7 +2157,6 @@ phutil_register_library_map(array(
'PhabricatorBuiltinDraftEngine' => 'applications/transactions/draft/PhabricatorBuiltinDraftEngine.php',
'PhabricatorBuiltinPatchList' => 'infrastructure/storage/patch/PhabricatorBuiltinPatchList.php',
'PhabricatorBulkContentSource' => 'infrastructure/daemon/contentsource/PhabricatorBulkContentSource.php',
'PhabricatorBusyUIExample' => 'applications/uiexample/examples/PhabricatorBusyUIExample.php',
'PhabricatorCacheDAO' => 'applications/cache/storage/PhabricatorCacheDAO.php',
'PhabricatorCacheEngine' => 'applications/system/engine/PhabricatorCacheEngine.php',
'PhabricatorCacheEngineExtension' => 'applications/system/engine/PhabricatorCacheEngineExtension.php',
@ -3030,7 +3025,6 @@ phutil_register_library_map(array(
'PhabricatorLiskFulltextEngineExtension' => 'applications/search/engineextension/PhabricatorLiskFulltextEngineExtension.php',
'PhabricatorLiskSearchEngineExtension' => 'applications/search/engineextension/PhabricatorLiskSearchEngineExtension.php',
'PhabricatorLiskSerializer' => 'infrastructure/storage/lisk/PhabricatorLiskSerializer.php',
'PhabricatorListFilterUIExample' => 'applications/uiexample/examples/PhabricatorListFilterUIExample.php',
'PhabricatorLocalDiskFileStorageEngine' => 'applications/files/engine/PhabricatorLocalDiskFileStorageEngine.php',
'PhabricatorLocalTimeTestCase' => 'view/__tests__/PhabricatorLocalTimeTestCase.php',
'PhabricatorLocaleScopeGuard' => 'infrastructure/internationalization/scope/PhabricatorLocaleScopeGuard.php',
@ -3996,7 +3990,6 @@ phutil_register_library_map(array(
'PhabricatorSlowvoteVoteController' => 'applications/slowvote/controller/PhabricatorSlowvoteVoteController.php',
'PhabricatorSlug' => 'infrastructure/util/PhabricatorSlug.php',
'PhabricatorSlugTestCase' => 'infrastructure/util/__tests__/PhabricatorSlugTestCase.php',
'PhabricatorSortTableUIExample' => 'applications/uiexample/examples/PhabricatorSortTableUIExample.php',
'PhabricatorSourceCodeView' => 'view/layout/PhabricatorSourceCodeView.php',
'PhabricatorSpaceEditField' => 'applications/transactions/editfield/PhabricatorSpaceEditField.php',
'PhabricatorSpacesApplication' => 'applications/spaces/application/PhabricatorSpacesApplication.php',
@ -4160,7 +4153,6 @@ phutil_register_library_map(array(
'PhabricatorTokensCurtainExtension' => 'applications/tokens/engineextension/PhabricatorTokensCurtainExtension.php',
'PhabricatorTokensSettingsPanel' => 'applications/settings/panel/PhabricatorTokensSettingsPanel.php',
'PhabricatorTokensToken' => 'applications/tokens/storage/PhabricatorTokensToken.php',
'PhabricatorTooltipUIExample' => 'applications/uiexample/examples/PhabricatorTooltipUIExample.php',
'PhabricatorTransactionChange' => 'applications/transactions/data/PhabricatorTransactionChange.php',
'PhabricatorTransactionRemarkupChange' => 'applications/transactions/data/PhabricatorTransactionRemarkupChange.php',
'PhabricatorTransactions' => 'applications/transactions/constants/PhabricatorTransactions.php',
@ -6483,10 +6475,7 @@ phutil_register_library_map(array(
'HeraldTranscriptTestCase' => 'PhabricatorTestCase',
'HeraldUtilityActionGroup' => 'HeraldActionGroup',
'Javelin' => 'Phobject',
'JavelinReactorUIExample' => 'PhabricatorUIExample',
'JavelinUIExample' => 'PhabricatorUIExample',
'JavelinViewExampleServerView' => 'AphrontView',
'JavelinViewUIExample' => 'PhabricatorUIExample',
'LegalpadController' => 'PhabricatorController',
'LegalpadCreateDocumentsCapability' => 'PhabricatorPolicyCapability',
'LegalpadDAO' => 'PhabricatorLiskDAO',
@ -7342,7 +7331,6 @@ phutil_register_library_map(array(
'PhabricatorBadgesTransactionComment' => 'PhabricatorApplicationTransactionComment',
'PhabricatorBadgesTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
'PhabricatorBadgesViewController' => 'PhabricatorBadgesProfileController',
'PhabricatorBarePageUIExample' => 'PhabricatorUIExample',
'PhabricatorBarePageView' => 'AphrontPageView',
'PhabricatorBaseURISetupCheck' => 'PhabricatorSetupCheck',
'PhabricatorBcryptPasswordHasher' => 'PhabricatorPasswordHasher',
@ -7357,7 +7345,6 @@ phutil_register_library_map(array(
'PhabricatorBuiltinDraftEngine' => 'PhabricatorDraftEngine',
'PhabricatorBuiltinPatchList' => 'PhabricatorSQLPatchList',
'PhabricatorBulkContentSource' => 'PhabricatorContentSource',
'PhabricatorBusyUIExample' => 'PhabricatorUIExample',
'PhabricatorCacheDAO' => 'PhabricatorLiskDAO',
'PhabricatorCacheEngine' => 'Phobject',
'PhabricatorCacheEngineExtension' => 'Phobject',
@ -8358,7 +8345,6 @@ phutil_register_library_map(array(
'PhabricatorLiskFulltextEngineExtension' => 'PhabricatorFulltextEngineExtension',
'PhabricatorLiskSearchEngineExtension' => 'PhabricatorSearchEngineExtension',
'PhabricatorLiskSerializer' => 'Phobject',
'PhabricatorListFilterUIExample' => 'PhabricatorUIExample',
'PhabricatorLocalDiskFileStorageEngine' => 'PhabricatorFileStorageEngine',
'PhabricatorLocalTimeTestCase' => 'PhabricatorTestCase',
'PhabricatorLocaleScopeGuard' => 'Phobject',
@ -9523,7 +9509,6 @@ phutil_register_library_map(array(
'PhabricatorSlowvoteVoteController' => 'PhabricatorSlowvoteController',
'PhabricatorSlug' => 'Phobject',
'PhabricatorSlugTestCase' => 'PhabricatorTestCase',
'PhabricatorSortTableUIExample' => 'PhabricatorUIExample',
'PhabricatorSourceCodeView' => 'AphrontView',
'PhabricatorSpaceEditField' => 'PhabricatorEditField',
'PhabricatorSpacesApplication' => 'PhabricatorApplication',
@ -9704,7 +9689,6 @@ phutil_register_library_map(array(
'PhabricatorFlaggableInterface',
'PhabricatorConduitResultInterface',
),
'PhabricatorTooltipUIExample' => 'PhabricatorUIExample',
'PhabricatorTransactionChange' => 'Phobject',
'PhabricatorTransactionRemarkupChange' => 'PhabricatorTransactionChange',
'PhabricatorTransactions' => 'Phobject',

View file

@ -1,95 +0,0 @@
<?php
final class JavelinReactorUIExample extends PhabricatorUIExample {
public function getName() {
return pht('Javelin Reactor');
}
public function getDescription() {
return pht('Lots of code');
}
public function renderExample() {
$rows = array();
$examples = array(
array(
pht('Reactive button only generates a stream of events'),
'ReactorButtonExample',
'phabricator-uiexample-reactor-button',
array(),
),
array(
pht('Reactive checkbox generates a boolean dynamic value'),
'ReactorCheckboxExample',
'phabricator-uiexample-reactor-checkbox',
array('checked' => true),
),
array(
pht('Reactive focus detector generates a boolean dynamic value'),
'ReactorFocusExample',
'phabricator-uiexample-reactor-focus',
array(),
),
array(
pht('Reactive input box, with normal and calmed output'),
'ReactorInputExample',
'phabricator-uiexample-reactor-input',
array('init' => 'Initial value'),
),
array(
pht('Reactive mouseover detector generates a boolean dynamic value'),
'ReactorMouseoverExample',
'phabricator-uiexample-reactor-mouseover',
array(),
),
array(
pht('Reactive radio buttons generate a string dynamic value'),
'ReactorRadioExample',
'phabricator-uiexample-reactor-radio',
array(),
),
array(
pht('Reactive select box generates a string dynamic value'),
'ReactorSelectExample',
'phabricator-uiexample-reactor-select',
array(),
),
array(
pht(
'%s makes the class of an element a string dynamic value',
'sendclass'),
'ReactorSendClassExample',
'phabricator-uiexample-reactor-sendclass',
array(),
),
array(
pht(
'%s makes some properties of an object into dynamic values',
'sendproperties'),
'ReactorSendPropertiesExample',
'phabricator-uiexample-reactor-sendproperties',
array(),
),
);
foreach ($examples as $example) {
list($desc, $name, $resource, $params) = $example;
$template = new AphrontJavelinView();
$template
->setName($name)
->setParameters($params)
->setCelerityResource($resource);
$rows[] = array($desc, $template->render());
}
$table = new AphrontTableView($rows);
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Example'));
$panel->appendChild($table);
return $panel;
}
}

View file

@ -1,66 +0,0 @@
<?php
final class JavelinUIExample extends PhabricatorUIExample {
public function getName() {
return pht('Javelin UI');
}
public function getDescription() {
return pht('Here are some Javelin UI elements that you could use.');
}
public function renderExample() {
$request = $this->getRequest();
$user = $request->getUser();
// toggle-class
$container_id = celerity_generate_unique_node_id();
$button_red_id = celerity_generate_unique_node_id();
$button_blue_id = celerity_generate_unique_node_id();
$button_red = javelin_tag(
'a',
array(
'class' => 'button',
'sigil' => 'jx-toggle-class',
'href' => '#',
'id' => $button_red_id,
'meta' => array(
'map' => array(
$container_id => 'jxui-red-border',
$button_red_id => 'jxui-active',
),
),
),
pht('Toggle Red Border'));
$button_blue = javelin_tag(
'a',
array(
'class' => 'button jxui-active',
'sigil' => 'jx-toggle-class',
'href' => '#',
'id' => $button_blue_id,
'meta' => array(
'state' => true,
'map' => array(
$container_id => 'jxui-blue-background',
$button_blue_id => 'jxui-active',
),
),
),
pht('Toggle Blue Background'));
$div = phutil_tag(
'div',
array(
'id' => $container_id,
'class' => 'jxui-example-container jxui-blue-background',
),
array($button_red, $button_blue));
return array($div);
}
}

View file

@ -1,45 +0,0 @@
<?php
final class JavelinViewUIExample extends PhabricatorUIExample {
public function getName() {
return pht('Javelin Views');
}
public function getDescription() {
return pht('Mix and match client and server views.');
}
public function renderExample() {
$request = $this->getRequest();
$init = $request->getStr('init');
$parent_server_template = new JavelinViewExampleServerView();
$parent_client_template = new AphrontJavelinView();
$parent_client_template
->setName('JavelinViewExample')
->setCelerityResource('phabricator-uiexample-javelin-view');
$child_server_template = new JavelinViewExampleServerView();
$child_client_template = new AphrontJavelinView();
$child_client_template
->setName('JavelinViewExample')
->setCelerityResource('phabricator-uiexample-javelin-view');
$parent_server_template->appendChild($parent_client_template);
$parent_client_template->appendChild($child_server_template);
$child_server_template->appendChild($child_client_template);
$child_client_template->appendChild(pht('Hey, it worked.'));
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Example'));
$panel->appendChild(
phutil_tag_div('ml', $parent_server_template));
return $panel;
}
}

View file

@ -1,25 +0,0 @@
<?php
final class PhabricatorBarePageUIExample extends PhabricatorUIExample {
public function getName() {
return pht('Bare Page');
}
public function getDescription() {
return pht('This is a bare page.');
}
public function renderExample() {
$view = new PhabricatorBarePageView();
$view->appendChild(
phutil_tag(
'h1',
array(),
$this->getDescription()));
$response = new AphrontWebpageResponse();
$response->setContent($view->render());
return $response;
}
}

View file

@ -1,17 +0,0 @@
<?php
final class PhabricatorBusyUIExample extends PhabricatorUIExample {
public function getName() {
return pht('Busy');
}
public function getDescription() {
return pht('Busy.');
}
public function renderExample() {
Javelin::initBehavior('phabricator-busy-example');
return null;
}
}

View file

@ -1,35 +0,0 @@
<?php
final class PhabricatorListFilterUIExample extends PhabricatorUIExample {
public function getName() {
return pht('ListFilter');
}
public function getDescription() {
return pht(
'Use %s to layout controls for filtering '.
'and manipulating lists of objects.',
phutil_tag('tt', array(), 'AphrontListFilterView'));
}
public function renderExample() {
$filter = new AphrontListFilterView();
$form = new AphrontFormView();
$form->setUser($this->getRequest()->getUser());
$form
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Query')))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue(pht('Search')));
$filter->appendChild($form);
return $filter;
}
}

View file

@ -1,96 +0,0 @@
<?php
final class PhabricatorSortTableUIExample extends PhabricatorUIExample {
public function getName() {
return pht('Sortable Tables');
}
public function getDescription() {
return pht('Using sortable tables.');
}
public function renderExample() {
$rows = array(
array(
'make' => 'Honda',
'model' => 'Civic',
'year' => 2004,
'price' => 3199,
'color' => pht('Blue'),
),
array(
'make' => 'Ford',
'model' => 'Focus',
'year' => 2001,
'price' => 2549,
'color' => pht('Red'),
),
array(
'make' => 'Toyota',
'model' => 'Camry',
'year' => 2009,
'price' => 4299,
'color' => pht('Black'),
),
array(
'make' => 'NASA',
'model' => 'Shuttle',
'year' => 1998,
'price' => 1000000000,
'color' => pht('White'),
),
);
$request = $this->getRequest();
$orders = array(
'make',
'model',
'year',
'price',
);
$sort = $request->getStr('sort');
list($sort, $reverse) = AphrontTableView::parseSort($sort);
if (!in_array($sort, $orders)) {
$sort = 'make';
}
$rows = isort($rows, $sort);
if ($reverse) {
$rows = array_reverse($rows);
}
$table = new AphrontTableView($rows);
$table->setHeaders(
array(
pht('Make'),
pht('Model'),
pht('Year'),
pht('Price'),
pht('Color'),
));
$table->setColumnClasses(
array(
'',
'wide',
'n',
'n',
'',
));
$table->makeSortable(
$request->getRequestURI(),
'sort',
$sort,
$reverse,
$orders);
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Sortable Table of Vehicles'));
$panel->setTable($table);
return $panel;
}
}

View file

@ -1,102 +0,0 @@
<?php
final class PhabricatorTooltipUIExample extends PhabricatorUIExample {
public function getName() {
return pht('Tooltips');
}
public function getDescription() {
return pht(
'Use %s to create tooltips.',
phutil_tag('tt', array(), 'JX.Tooltip'));
}
public function renderExample() {
Javelin::initBehavior('phabricator-tooltips');
require_celerity_resource('aphront-tooltip-css');
$style = 'width: 200px; '.
'text-align: center; '.
'margin: 20px; '.
'background: #dfdfdf; '.
'padding: 20px 10px; '.
'border: 1px solid black; ';
$lorem = <<<EOTEXT
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
EOTEXT;
$overflow = str_repeat('M', 1024);
$metas = array(
'hi' => array(
'tip' => 'Hi',
),
'lorem (north)' => array(
'tip' => $lorem,
),
'lorem (east)' => array(
'tip' => $lorem,
'align' => 'E',
),
'lorem (south)' => array(
'tip' => $lorem,
'align' => 'S',
),
'lorem (west)' => array(
'tip' => $lorem,
'align' => 'W',
),
'lorem (large, north)' => array(
'tip' => $lorem,
'size' => 300,
),
'lorem (large, east)' => array(
'tip' => $lorem,
'size' => 300,
'align' => 'E',
),
'lorem (large, west)' => array(
'tip' => $lorem,
'size' => 300,
'align' => 'W',
),
'lorem (large, south)' => array(
'tip' => $lorem,
'size' => 300,
'align' => 'S',
),
'overflow (north)' => array(
'tip' => $overflow,
),
'overflow (east)' => array(
'tip' => $overflow,
'align' => 'E',
),
'overflow (south)' => array(
'tip' => $overflow,
'align' => 'S',
),
'overflow (west)' => array(
'tip' => $overflow,
'align' => 'W',
),
);
$content = array();
foreach ($metas as $key => $meta) {
$content[] = javelin_tag(
'div',
array(
'sigil' => 'has-tooltip',
'meta' => $meta,
'style' => $style,
),
$key);
}
return $content;
}
}

View file

@ -1,19 +0,0 @@
/**
* @provides phabricator-uiexample-javelin-view
* @requires javelin-install
* javelin-dom
* javelin-view
*/
JX.install('JavelinViewExample', {
extend: 'View',
members: {
render: function(rendered_children) {
return JX.$N(
'div',
{ className: 'client-view' },
rendered_children
);
}
}
});

View file

@ -1,38 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-button
* @requires javelin-install
* javelin-dom
* javelin-util
* javelin-dynval
* javelin-reactor-dom
*/
JX.install('ReactorButtonExample', {
extend: 'View',
members: {
render: function() {
var button = JX.$N('button', {}, 'Fun');
var clicks = JX.RDOM.clickPulses(button);
var time = JX.RDOM.time();
// function snapshot(pulses, dynval) {
// return new DynVal(
// pulses.transform(JX.bind(dynval, dynval.getValueNow)),
// dynval.getValueNow()
// );
// }
//
// Below could be...
// time.snapshot(clicks)
// clicks.snapshot(time)
var snapshot_time = new JX.DynVal(
clicks.transform(JX.bind(time, time.getValueNow)),
time.getValueNow()
);
return [button, JX.RDOM.$DT(snapshot_time)];
}
}
});

View file

@ -1,17 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-checkbox
* @requires javelin-install
* javelin-dom
* javelin-reactor-dom
*/
JX.install('ReactorCheckboxExample', {
extend: 'View',
members: {
render: function() {
var checkbox = JX.$N('input', {type: 'checkbox'});
return [checkbox, JX.RDOM.$DT(JX.RDOM.checkbox(checkbox))];
}
}
});

View file

@ -1,16 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-focus
* @requires javelin-install
* javelin-dom
* javelin-reactor-dom
*/
JX.install('ReactorFocusExample', {
extend: 'View',
members: {
render: function() {
var input = JX.$N('input');
return [input, JX.RDOM.$DT(JX.RDOM.hasFocus(input))];
}
}
});

View file

@ -1,32 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-input
* @requires javelin-install
* javelin-reactor-dom
* javelin-view-html
* javelin-view-interpreter
* javelin-view-renderer
*/
JX.install('ReactorInputExample', {
extend: 'View',
members: {
render: function() {
var html = JX.HTMLView.registerToInterpreter(new JX.ViewInterpreter());
var raw_input = JX.ViewRenderer.render(
html.input({ value: this.getAttr('init') })
);
var input = JX.RDOM.input(raw_input);
return JX.ViewRenderer.render(
html.div(
raw_input,
html.br(),
html.span(JX.RDOM.$DT(input)),
html.br(),
html.span(JX.RDOM.$DT(input.calm(500)))
)
);
}
}
});

View file

@ -1,16 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-mouseover
* @requires javelin-install
* javelin-dom
* javelin-reactor-dom
*/
JX.install('ReactorMouseoverExample', {
extend: 'View',
members: {
render: function() {
var target = JX.$N('span', 'mouseover me ');
return [target, JX.RDOM.$DT(JX.RDOM.isMouseOver(target))];
}
}
});

View file

@ -1,24 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-radio
* @requires javelin-install
* javelin-dom
* javelin-reactor-dom
*/
JX.install('ReactorRadioExample', {
extend: 'View',
members: {
render: function() {
var radio_one = JX.$N('input', {type: 'radio', name: 'n', value: 'one'});
var radio_two = JX.$N('input', {type: 'radio', name: 'n', value: 'two'});
radio_one.checked = true;
return [
radio_one,
radio_two,
JX.RDOM.$DT(JX.RDOM.radio([radio_one, radio_two]))
];
}
}
});

View file

@ -1,21 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-select
* @requires javelin-install
* javelin-dom
* javelin-reactor-dom
*/
JX.install('ReactorSelectExample', {
extend: 'View',
members: {
render: function() {
var select = JX.$N('select', {}, [
JX.$N('option', { value: 'goat' }, 'Goat'),
JX.$N('option', { value: 'bat' }, 'Bat'),
JX.$N('option', { value: 'duck' }, 'Duck')
]);
return [select, JX.RDOM.$DT(JX.RDOM.select(select))];
}
}
});

View file

@ -1,18 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-sendclass
* @requires javelin-install
* javelin-dom
* javelin-reactor-dom
*/
JX.install('ReactorSendClassExample', {
extend: 'View',
members: {
render: function() {
var input = JX.$N('input', { type: 'checkbox' });
var span = JX.$N('a', 'Hey');
JX.RDOM.sendClass(JX.RDOM.checkbox(input), span, 'disabled');
return [input, span];
}
}
});

View file

@ -1,26 +0,0 @@
/**
* @provides phabricator-uiexample-reactor-sendproperties
* @requires javelin-install
* javelin-dom
* javelin-reactor-dom
*/
JX.install('ReactorSendPropertiesExample', {
extend: 'View',
members: {
render: function() {
var color = JX.$N('input', {value: '#fff000'});
var title = JX.$N('input', {value: 'seen on hover'});
var target = JX.$N('span', 'Change my color and title');
JX.RDOM.sendProps(target, {
style: {
backgroundColor: JX.RDOM.input(color)
},
title: JX.RDOM.input(title)
});
return [color, title, target];
}
}
});

View file

@ -1,9 +0,0 @@
/**
* @provides javelin-behavior-phabricator-busy-example
* @requires phabricator-busy
* javelin-behavior
*/
JX.behavior('phabricator-busy-example', function() {
JX.Busy.start();
});