Search onboarding tour
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:
- A user chooses between searching a language or repository. Clicking either will add the relevant filter to the search bar.
- 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.
- 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.
- We ask the user to view the search reference next to the search bar. Once clicked, the tour advances.
- 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.