Skip to content

Update Global Search vertical navigation wiki scope condition

Tomas Bulva requested to merge fix-wiki-check into master

What does this MR do and why?

When testing in staging env I found a missing check for the WIKI menu item. Under some conditions (no Project selected for example) the vertical menu shows the WIKI item when it should not.

Screenshots or screen recordings

no FF with FF
before_no-as_no-g_no-p after_no-as_no-g_no-p
before_no-as_g_no-p after_no-as_g_no-p
before_no-as_g_p after_no-as_g_p
before_as_no-g_no-p after_as_no-g_no-p
Screenshot_2022-11-24_at_17.11.14 after_as_g_no-p
before_as_g_p after_as_g_p

How to set up and validate locally

  1. Checkout this branch
  2. Enable the search_page_vertical_nav
    Feature.enable(:search_page_vertical_nav)
  3. To enable Advancer Search navigate to http://127.0.0.1:3000/admin/application_settings/advanced_search
  4. Enable Search with Elasticsearch enabled
  5. Navigate to the search page http://127.0.0.1:3000/search?search=test or any other search term
  6. Wiki is showing up is contingent on Project/Group (some groups and projects have it and some don't) as well as whether the advanced search is enabled.
advanced search disabled -> enable -> advanced search enabled
advanced_search_disabled Screenshot_2022-11-21_at_13.48.13 advanced_search_enabled

If the above steps to enable elasticsearch don't work please refer to this document https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/elasticsearch.md

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #293740 (closed)

Edited by Tomas Bulva

Merge request reports

Loading