Skip to content

advanced search with no search term is showing navigation (old navigation)

Summary

The old navigation search page is showing the scope navigation when there is no term.

Steps to reproduce

Using old navigation, navigate to the search page. If there is no search term. The scope navigation is visible.

What is the current bug behavior?

Shows the scope navigation.

What is the expected correct behavior?

Does not show scope navigation.

Relevant logs and/or screenshots

bug correct
Screenshot_2023-04-21_at_16.25.28 Screenshot_2023-04-21_at_16.25.45

Possible fixes

diff --git a/app/assets/javascripts/search/sidebar/components/app.vue b/app/assets/javascripts/search/sidebar/components/app.vue
index 317145d4cd12..f4b1e8a80184 100644
--- a/app/assets/javascripts/search/sidebar/components/app.vue
+++ b/app/assets/javascripts/search/sidebar/components/app.vue
@@ -44,7 +44,7 @@ export default {
     v-else
     class="search-sidebar gl-display-flex gl-flex-direction-column gl-md-mr-5 gl-mb-6 gl-mt-5"
   >
-    <scope-navigation />
+    <scope-navigation v-if="showOldNavigation" />
     <results-filters v-if="showIssueAndMergeFilters" />
     <language-filter v-if="showBlobFilter" />
   </section>