Skip to content

Move onboarding tour logic to a hook

Warren Gifford requested to merge lg/search-onboarding-tour-to-hoc into main

Created by: lguychard

Fixes #17321 (closed)

Moves all code specific to the search onboarding tour out of MonacoQueryInput.tsx, and into a useSearchOnboardingTour hook.

This is a stepping stone towards enabling us to reuse the MonacoQueryInput elsewhere in the application (eg. #17320 (closed)).

Also moves partly duplicated logic from SearchPageInput and NavbarSearchItem into the same hook.

Onboarding tour functionality remains the same, but the logic looks different due to using hooks only, as well as using the frontend query scanner for validation logic instead of checks on query strings. Sorry for the large diff! I added plenty of comments, both in the code and in the PR, to help understand what's going on.

The onboarding tour is extensively tested through search integration tests.

Merge request reports

Loading