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

Mostly modernize the policy control typeahead

Summary:
Ref T4420. This doesn't share all the code it really should, and renders a little odd. Make it more standard.

(Icons aren't handled totally correctly but there's no usability impact and all that code should just get cleaned up.)

Test Plan: Used custom policy typeahead, had a more standard experience.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4420

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

+17 -24
+10 -13
resources/celerity/map.php
··· 414 414 'rsrc/js/application/phortune/behavior-test-payment-form.js' => 'ab8d2723', 415 415 'rsrc/js/application/phortune/phortune-credit-card-form.js' => '2290aeef', 416 416 'rsrc/js/application/policy/behavior-policy-control.js' => 'f3fef818', 417 - 'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '0ea85aa3', 417 + 'rsrc/js/application/policy/behavior-policy-rule-editor.js' => 'fe9a552f', 418 418 'rsrc/js/application/ponder/behavior-votebox.js' => '4e9b766b', 419 419 'rsrc/js/application/projects/behavior-boards-dropdown.js' => '0ec56e1d', 420 420 'rsrc/js/application/projects/behavior-project-boards.js' => 'c6b95cbd', ··· 641 641 'javelin-behavior-phui-object-box-tabs' => 'a3e2244e', 642 642 'javelin-behavior-phui-timeline-dropdown-menu' => '4d94d9c3', 643 643 'javelin-behavior-policy-control' => 'f3fef818', 644 - 'javelin-behavior-policy-rule-editor' => '0ea85aa3', 644 + 'javelin-behavior-policy-rule-editor' => 'fe9a552f', 645 645 'javelin-behavior-ponder-votebox' => '4e9b766b', 646 646 'javelin-behavior-project-boards' => 'c6b95cbd', 647 647 'javelin-behavior-project-create' => '065227cc', ··· 898 898 2 => 'javelin-stratcom', 899 899 3 => 'javelin-util', 900 900 4 => 'phabricator-notification-css', 901 - ), 902 - '0ea85aa3' => array( 903 - 0 => 'javelin-behavior', 904 - 1 => 'multirow-row-manager', 905 - 2 => 'javelin-dom', 906 - 3 => 'javelin-util', 907 - 4 => 'phabricator-prefab', 908 - 5 => 'javelin-tokenizer', 909 - 6 => 'javelin-typeahead', 910 - 7 => 'javelin-typeahead-ondemand-source', 911 - 8 => 'javelin-json', 912 901 ), 913 902 '0ec56e1d' => array( 914 903 0 => 'javelin-behavior', ··· 1955 1944 1 => 'javelin-util', 1956 1945 2 => 'javelin-dom', 1957 1946 3 => 'javelin-typeahead-normalizer', 1947 + ), 1948 + 'fe9a552f' => array( 1949 + 0 => 'javelin-behavior', 1950 + 1 => 'multirow-row-manager', 1951 + 2 => 'javelin-dom', 1952 + 3 => 'javelin-util', 1953 + 4 => 'phabricator-prefab', 1954 + 5 => 'javelin-json', 1958 1955 ), 1959 1956 42126667 => array( 1960 1957 0 => 'javelin-behavior',
+7 -11
webroot/rsrc/js/application/policy/behavior-policy-rule-editor.js
··· 5 5 * javelin-dom 6 6 * javelin-util 7 7 * phabricator-prefab 8 - * javelin-tokenizer 9 - * javelin-typeahead 10 - * javelin-typeahead-ondemand-source 11 8 * javelin-json 12 9 */ 13 10 JX.behavior('policy-rule-editor', function(config) { ··· 124 121 node = JX.$H(template.markup).getNode(); 125 122 node.id = ''; 126 123 127 - var datasource = new JX.TypeaheadOnDemandSource(template.uri); 124 + var options = { 125 + root: node, 126 + src: template.uri, 127 + placeholder: template.placeholder, 128 + limit: template.limit 129 + }; 128 130 129 - var typeahead = new JX.Typeahead(node); 130 - typeahead.setDatasource(datasource); 131 - 132 - var tokenizer = new JX.Tokenizer(node); 133 - tokenizer.setLimit(template.limit); 134 - tokenizer.setTypeahead(typeahead); 135 - tokenizer.setPlaceholder(template.placeholder); 131 + var tokenizer = JX.Prefab.buildTokenizer(options).tokenizer; 136 132 tokenizer.start(); 137 133 138 134 get_fn = function() { return JX.keys(tokenizer.getTokens()); };