Skip to content

Search onboarding tour

Administrator requested to merge fa/search-tour into main

Created by: attfarhan

Designs Fixes https://github.com/sourcegraph/sourcegraph/issues/12137.

Adds an onboarding tour for new search users. The tour is behind a feature flag in global settings: experimentalFeatures.showOnboardingTour.

The tour appears on our main search mode, and takes users through 5 steps to get them to a successful search. It appears for all users who have not yet seen or dismissed the tour (stored in local storage).

The steps are:

  1. A user chooses between searching a language or repository. Clicking either will add the relevant filter to the search bar.
  2. The autocompletion pops up in the editor, and the user is asked to select a language/repo. Once they've stopped typing or selected from the autocomplete, the tour advances.
  3. The user is prompted to add a term to their query. If on the language path, we suggest a structural search. Once they've stopped typing for 500ms, the tour advances.
  4. We ask the user to view the search reference next to the search bar. Once clicked, the tour advances.
  5. The user is asked to submit the search.

To reload the search tour after completing it, run this script in the console: localStorage.setItem('has-seen-onboarding-tour', false); localStorage.setItem('has-cancelled-onboarding-tour', false); window.location.reload();. Offline feedback from Rob is to add a button to show the search tour again.

Merge request reports

Loading