Skip to content

Commit 607f4bf

Browse files
lkassianikepriestley
lkassianik
authored and
epriestley
committedMay 26, 2014
Remove dedicated "Jump Nav" navigation element
Summary: Fixes T5175. Not sure if I cleaned out everything, but this seemed like a reasonable first pass. Attempted to delete all code that belonged to Jump Nav feature only. Test Plan: Open phabricator homepage, verify Jump Nav element is gone, verify the Search bar still autocompletes and jumps to shortcuts. Reviewers: chad, epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5175 Differential Revision: https://secure.phabricator.com/D9301
1 parent b93c2f6 commit 607f4bf

File tree

4 files changed

+40
-165
lines changed

4 files changed

+40
-165
lines changed
 

‎resources/celerity/map.php

+40-43
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
return array(
88
'names' =>
99
array(
10-
'core.pkg.css' => '0d0b7e0c',
10+
'core.pkg.css' => 'c404fb89',
1111
'core.pkg.js' => '7db41c19',
1212
'darkconsole.pkg.js' => 'ca8671ce',
1313
'differential.pkg.css' => 'fbf57382',
@@ -64,7 +64,6 @@
6464
'rsrc/css/application/diffusion/commit-view.css' => '92d1e8f9',
6565
'rsrc/css/application/diffusion/diffusion-icons.css' => '384a0f7d',
6666
'rsrc/css/application/diffusion/diffusion-source.css' => '66fdf661',
67-
'rsrc/css/application/directory/phabricator-jump-nav.css' => 'f0c5e726',
6867
'rsrc/css/application/feed/feed.css' => 'dd43ce00',
6968
'rsrc/css/application/files/global-drag-and-drop.css' => '697324ad',
7069
'rsrc/css/application/flag/flag.css' => '5337623f',
@@ -707,7 +706,6 @@
707706
'phabricator-flag-css' => '5337623f',
708707
'phabricator-hovercard' => '4f344388',
709708
'phabricator-hovercard-view-css' => '46a13cf0',
710-
'phabricator-jump-nav' => 'f0c5e726',
711709
'phabricator-keyboard-shortcut' => '1ae869f2',
712710
'phabricator-keyboard-shortcut-manager' => 'ad7a69ca',
713711
'phabricator-main-menu-view' => '0207239c',
@@ -2114,46 +2112,45 @@
21142112
8 => 'aphront-tokenizer-control-css',
21152113
9 => 'aphront-typeahead-control-css',
21162114
10 => 'aphront-list-filter-view-css',
2117-
11 => 'phabricator-jump-nav',
2118-
12 => 'phabricator-remarkup-css',
2119-
13 => 'syntax-highlighting-css',
2120-
14 => 'aphront-pager-view-css',
2121-
15 => 'phabricator-transaction-view-css',
2122-
16 => 'aphront-tooltip-css',
2123-
17 => 'phabricator-flag-css',
2124-
18 => 'aphront-error-view-css',
2125-
19 => 'sprite-remarkup-css',
2126-
20 => 'sprite-gradient-css',
2127-
21 => 'sprite-menu-css',
2128-
22 => 'sprite-apps-large-css',
2129-
23 => 'phabricator-main-menu-view',
2130-
24 => 'phabricator-notification-css',
2131-
25 => 'phabricator-notification-menu-css',
2132-
26 => 'lightbox-attachment-css',
2133-
27 => 'phui-header-view-css',
2134-
28 => 'phabricator-filetree-view-css',
2135-
29 => 'phabricator-nav-view-css',
2136-
30 => 'phabricator-side-menu-view-css',
2137-
31 => 'phabricator-crumbs-view-css',
2138-
32 => 'phui-object-item-list-view-css',
2139-
33 => 'global-drag-and-drop-css',
2140-
34 => 'phui-spacing-css',
2141-
35 => 'phui-form-css',
2142-
36 => 'phui-icon-view-css',
2143-
37 => 'phabricator-application-launch-view-css',
2144-
38 => 'phabricator-action-list-view-css',
2145-
39 => 'phui-property-list-view-css',
2146-
40 => 'phui-tag-view-css',
2147-
41 => 'phui-list-view-css',
2148-
42 => 'font-fontawesome',
2149-
43 => 'phui-font-icon-base-css',
2150-
44 => 'sprite-main-header-css',
2151-
45 => 'phui-box-css',
2152-
46 => 'phui-object-box-css',
2153-
47 => 'phui-timeline-view-css',
2154-
48 => 'sprite-tokens-css',
2155-
49 => 'tokens-css',
2156-
50 => 'phui-status-list-view-css',
2115+
11 => 'phabricator-remarkup-css',
2116+
12 => 'syntax-highlighting-css',
2117+
13 => 'aphront-pager-view-css',
2118+
14 => 'phabricator-transaction-view-css',
2119+
15 => 'aphront-tooltip-css',
2120+
16 => 'phabricator-flag-css',
2121+
17 => 'aphront-error-view-css',
2122+
18 => 'sprite-remarkup-css',
2123+
19 => 'sprite-gradient-css',
2124+
20 => 'sprite-menu-css',
2125+
21 => 'sprite-apps-large-css',
2126+
22 => 'phabricator-main-menu-view',
2127+
23 => 'phabricator-notification-css',
2128+
24 => 'phabricator-notification-menu-css',
2129+
25 => 'lightbox-attachment-css',
2130+
26 => 'phui-header-view-css',
2131+
27 => 'phabricator-filetree-view-css',
2132+
28 => 'phabricator-nav-view-css',
2133+
29 => 'phabricator-side-menu-view-css',
2134+
30 => 'phabricator-crumbs-view-css',
2135+
31 => 'phui-object-item-list-view-css',
2136+
32 => 'global-drag-and-drop-css',
2137+
33 => 'phui-spacing-css',
2138+
34 => 'phui-form-css',
2139+
35 => 'phui-icon-view-css',
2140+
36 => 'phabricator-application-launch-view-css',
2141+
37 => 'phabricator-action-list-view-css',
2142+
38 => 'phui-property-list-view-css',
2143+
39 => 'phui-tag-view-css',
2144+
40 => 'phui-list-view-css',
2145+
41 => 'font-fontawesome',
2146+
42 => 'phui-font-icon-base-css',
2147+
43 => 'sprite-main-header-css',
2148+
44 => 'phui-box-css',
2149+
45 => 'phui-object-box-css',
2150+
46 => 'phui-timeline-view-css',
2151+
47 => 'sprite-tokens-css',
2152+
48 => 'tokens-css',
2153+
49 => 'phui-status-list-view-css',
21572154
),
21582155
'core.pkg.js' =>
21592156
array(

‎resources/celerity/packages.php

-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@
8383
'aphront-typeahead-control-css',
8484
'aphront-list-filter-view-css',
8585

86-
'phabricator-jump-nav',
87-
8886
'phabricator-remarkup-css',
8987
'syntax-highlighting-css',
9088
'aphront-pager-view-css',

‎src/applications/home/controller/PhabricatorHomeMainController.php

-95
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ public function willProcessRequest(array $data) {
1616

1717
public function processRequest() {
1818
$user = $this->getRequest()->getUser();
19-
20-
if ($this->filter == 'jump') {
21-
return $this->buildJumpResponse();
22-
}
2319
$nav = $this->buildNav();
2420

2521
$dashboard = PhabricatorDashboardInstall::getDashboard(
@@ -92,16 +88,13 @@ private function buildMainResponse($nav, array $projects) {
9288
$welcome_panel = null;
9389
}
9490

95-
$jump_panel = $this->buildJumpPanel();
96-
9791
if ($has_differential) {
9892
$revision_panel = $this->buildRevisionPanel();
9993
} else {
10094
$revision_panel = null;
10195
}
10296

10397
$content = array(
104-
$jump_panel,
10598
$welcome_panel,
10699
$unbreak_panel,
107100
$triage_panel,
@@ -118,27 +111,6 @@ private function buildMainResponse($nav, array $projects) {
118111

119112
}
120113

121-
private function buildJumpResponse() {
122-
$request = $this->getRequest();
123-
$jump = $request->getStr('jump');
124-
125-
$response = PhabricatorJumpNavHandler::getJumpResponse(
126-
$request->getUser(),
127-
$jump);
128-
129-
if ($response) {
130-
return $response;
131-
} else if ($request->isFormPost()) {
132-
$uri = new PhutilURI('/search/');
133-
$uri->setQueryParam('query', $jump);
134-
$uri->setQueryParam('search:primary', 'true');
135-
136-
return id(new AphrontRedirectResponse())->setURI((string)$uri);
137-
} else {
138-
return id(new AphrontRedirectResponse())->setURI('/');
139-
}
140-
}
141-
142114
private function buildUnbreakNowPanel() {
143115
$unbreak_now = PhabricatorEnv::getEnvConfig(
144116
'maniphest.priorities.unbreak-now');
@@ -330,73 +302,6 @@ private function buildTaskListView(array $tasks) {
330302
return $view;
331303
}
332304

333-
private function buildJumpPanel($query=null) {
334-
$request = $this->getRequest();
335-
$user = $request->getUser();
336-
337-
$uniq_id = celerity_generate_unique_node_id();
338-
339-
Javelin::initBehavior(
340-
'phabricator-autofocus',
341-
array(
342-
'id' => $uniq_id,
343-
));
344-
345-
require_celerity_resource('phabricator-jump-nav');
346-
347-
$doc_href = PhabricatorEnv::getDocLink('Jump Nav User Guide');
348-
$doc_link = phutil_tag(
349-
'a',
350-
array(
351-
'href' => $doc_href,
352-
),
353-
'Jump Nav User Guide');
354-
355-
$jump_input = phutil_tag(
356-
'input',
357-
array(
358-
'type' => 'text',
359-
'class' => 'phabricator-jump-nav',
360-
'name' => 'jump',
361-
'id' => $uniq_id,
362-
'value' => $query,
363-
));
364-
$jump_caption = phutil_tag(
365-
'p',
366-
array(
367-
'class' => 'phabricator-jump-nav-caption',
368-
),
369-
hsprintf(
370-
'Enter the name of an object like <tt>D123</tt> to quickly jump to '.
371-
'it. See %s or type <tt>help</tt>.',
372-
$doc_link));
373-
374-
$form = phabricator_form(
375-
$user,
376-
array(
377-
'action' => '/jump/',
378-
'method' => 'POST',
379-
'class' => 'phabricator-jump-nav-form',
380-
),
381-
array(
382-
$jump_input,
383-
$jump_caption,
384-
));
385-
386-
$panel = new AphrontPanelView();
387-
$panel->setNoBackground();
388-
// $panel->appendChild();
389-
390-
$list_filter = new AphrontListFilterView();
391-
$list_filter->appendChild($form);
392-
393-
$container = phutil_tag('div',
394-
array('class' => 'phabricator-jump-nav-container'),
395-
$list_filter);
396-
397-
return $container;
398-
}
399-
400305
private function renderSectionHeader($title, $href) {
401306
$header = phutil_tag(
402307
'a',

‎webroot/rsrc/css/application/directory/phabricator-jump-nav.css

-25
This file was deleted.

0 commit comments

Comments
 (0)
Failed to load comments.