Skip to content

Commit a4e5780

Browse files
author
epriestley
committedMay 26, 2016
Remove "Search Preferences"
Summary: Ref T4103. This removes these options: {F1660585} The jump nav option came from T916, when we had a separate jump nav on the home page. Essentially no one has ever been confused by the behavior of search or disabled this feature. Here are the stats for this install: | Total Users | 36656 | | Have Set Any Preference | 3084 | | Have Disabled Jump | 6 | Are Not "Security Researchers" | 2 | Any Account Activity | 0 The "/" option came in the same change, but the preference came from T989. This keystroke conflicts with a default Firefox keystroke. Almost no one cares about this either, but I count 6 real users who have disabled the behavior. I suspect the number of real users who //use// it may be smaller. In Safari and Firefox, the "tab" key does the same thing. In Chrome, the "tab" key does the same thing if {nav Preferences > Web Content > "Pressing Tab highlights..."} is disabled. Upshot: jump nav is great, bulk of the change in T989 was clearly great, specific preferences that came out of it seem not-so-great and now is a good time to kill them as we head into T4103. Test Plan: - Grepped for removed constants. - Pressed "/". - Searched for `T123`. - Viewed settings. Reviewers: chad Reviewed By: chad Maniphest Tasks: T4103 Differential Revision: https://secure.phabricator.com/D15976
1 parent 189600e commit a4e5780

File tree

7 files changed

+15
-99
lines changed

7 files changed

+15
-99
lines changed
 

‎resources/celerity/map.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
return array(
99
'names' => array(
1010
'core.pkg.css' => '8aeacc63',
11-
'core.pkg.js' => '50e9228e',
11+
'core.pkg.js' => '3f15fa62',
1212
'darkconsole.pkg.js' => 'e7393ebb',
1313
'differential.pkg.css' => '33da0633',
1414
'differential.pkg.js' => '4b7d8f19',
@@ -490,7 +490,7 @@
490490
'rsrc/js/core/behavior-history-install.js' => '7ee2b591',
491491
'rsrc/js/core/behavior-hovercard.js' => 'bcaccd64',
492492
'rsrc/js/core/behavior-keyboard-pager.js' => 'a8da01f0',
493-
'rsrc/js/core/behavior-keyboard-shortcuts.js' => 'd75709e6',
493+
'rsrc/js/core/behavior-keyboard-shortcuts.js' => '7835f8c9',
494494
'rsrc/js/core/behavior-lightbox-attachments.js' => 'f8ba29d7',
495495
'rsrc/js/core/behavior-line-linker.js' => '1499a8cb',
496496
'rsrc/js/core/behavior-more.js' => 'a80d0378',
@@ -651,7 +651,7 @@
651651
'javelin-behavior-phabricator-gesture' => '3ab51e2c',
652652
'javelin-behavior-phabricator-gesture-example' => '558829c2',
653653
'javelin-behavior-phabricator-keyboard-pager' => 'a8da01f0',
654-
'javelin-behavior-phabricator-keyboard-shortcuts' => 'd75709e6',
654+
'javelin-behavior-phabricator-keyboard-shortcuts' => '7835f8c9',
655655
'javelin-behavior-phabricator-line-linker' => '1499a8cb',
656656
'javelin-behavior-phabricator-nav' => '56a1ca03',
657657
'javelin-behavior-phabricator-notification-example' => '8ce821c5',
@@ -1492,6 +1492,13 @@
14921492
'multirow-row-manager',
14931493
'javelin-json',
14941494
),
1495+
'7835f8c9' => array(
1496+
'javelin-behavior',
1497+
'javelin-workflow',
1498+
'javelin-json',
1499+
'javelin-dom',
1500+
'phabricator-keyboard-shortcut',
1501+
),
14951502
'7927a7d3' => array(
14961503
'javelin-behavior',
14971504
'javelin-quicksand',
@@ -1973,13 +1980,6 @@
19731980
'javelin-json',
19741981
'phabricator-prefab',
19751982
),
1976-
'd75709e6' => array(
1977-
'javelin-behavior',
1978-
'javelin-workflow',
1979-
'javelin-json',
1980-
'javelin-dom',
1981-
'phabricator-keyboard-shortcut',
1982-
),
19831983
'd7a74243' => array(
19841984
'javelin-behavior',
19851985
'javelin-stratcom',

‎src/__phutil_library_map__.php

-2
Original file line numberDiff line numberDiff line change
@@ -3331,7 +3331,6 @@
33313331
'PhabricatorSearchNgramsDestructionEngineExtension' => 'applications/search/engineextension/PhabricatorSearchNgramsDestructionEngineExtension.php',
33323332
'PhabricatorSearchOrderController' => 'applications/search/controller/PhabricatorSearchOrderController.php',
33333333
'PhabricatorSearchOrderField' => 'applications/search/field/PhabricatorSearchOrderField.php',
3334-
'PhabricatorSearchPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorSearchPreferencesSettingsPanel.php',
33353334
'PhabricatorSearchRelationship' => 'applications/search/constants/PhabricatorSearchRelationship.php',
33363335
'PhabricatorSearchResultBucket' => 'applications/search/buckets/PhabricatorSearchResultBucket.php',
33373336
'PhabricatorSearchResultBucketGroup' => 'applications/search/buckets/PhabricatorSearchResultBucketGroup.php',
@@ -8044,7 +8043,6 @@
80448043
'PhabricatorSearchNgramsDestructionEngineExtension' => 'PhabricatorDestructionEngineExtension',
80458044
'PhabricatorSearchOrderController' => 'PhabricatorSearchBaseController',
80468045
'PhabricatorSearchOrderField' => 'PhabricatorSearchField',
8047-
'PhabricatorSearchPreferencesSettingsPanel' => 'PhabricatorSettingsPanel',
80488046
'PhabricatorSearchRelationship' => 'Phobject',
80498047
'PhabricatorSearchResultBucket' => 'Phobject',
80508048
'PhabricatorSearchResultBucketGroup' => 'Phobject',

‎src/applications/search/controller/PhabricatorSearchController.php

+5-8
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ public function handleRequest(AphrontRequest $request) {
1313
$viewer = $this->getViewer();
1414

1515
if ($request->getStr('jump') != 'no') {
16-
$pref_jump = PhabricatorUserPreferences::PREFERENCE_SEARCHBAR_JUMP;
17-
if ($viewer->loadPreferences($pref_jump, 1)) {
18-
$response = PhabricatorJumpNavHandler::getJumpResponse(
19-
$viewer,
20-
$request->getStr('query'));
21-
if ($response) {
22-
return $response;
23-
}
16+
$response = PhabricatorJumpNavHandler::getJumpResponse(
17+
$viewer,
18+
$request->getStr('query'));
19+
if ($response) {
20+
return $response;
2421
}
2522
}
2623

‎src/applications/settings/panel/PhabricatorSearchPreferencesSettingsPanel.php

-62
This file was deleted.

‎src/applications/settings/storage/PhabricatorUserPreferences.php

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ final class PhabricatorUserPreferences extends PhabricatorUserDAO {
1919
const PREFERENCE_VARY_SUBJECT = 'vary-subject';
2020
const PREFERENCE_HTML_EMAILS = 'html-emails';
2121

22-
const PREFERENCE_SEARCHBAR_JUMP = 'searchbar-jump';
23-
const PREFERENCE_SEARCH_SHORTCUT = 'search-shortcut';
2422
const PREFERENCE_SEARCH_SCOPE = 'search-scope';
2523

2624
const PREFERENCE_DIFFUSION_BLAME = 'diffusion-blame';

‎src/view/page/menu/PhabricatorMainMenuView.php

-5
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,6 @@ private function renderSearch() {
186186
}
187187

188188
$result = $search;
189-
190-
$pref_shortcut = PhabricatorUserPreferences::PREFERENCE_SEARCH_SHORTCUT;
191-
if ($viewer->loadPreferences()->getPreference($pref_shortcut, true)) {
192-
$keyboard_config['searchID'] = $search->getID();
193-
}
194189
}
195190

196191
Javelin::initBehavior('phabricator-keyboard-shortcuts', $keyboard_config);

‎webroot/rsrc/js/core/behavior-keyboard-shortcuts.js

-10
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,4 @@ JX.behavior('phabricator-keyboard-shortcuts', function(config) {
3030
})
3131
.register();
3232

33-
if (config.searchID) {
34-
desc = 'Give keyboard focus to the search box.';
35-
new JX.KeyboardShortcut('/', desc)
36-
.setHandler(function() {
37-
var search = JX.$(config.searchID);
38-
search.focus();
39-
search.select();
40-
})
41-
.register();
42-
}
4333
});

0 commit comments

Comments
 (0)
Failed to load comments.