Empty advanced search page enhancements
Problem to solve
We have a "cold start" issue on the advanced search page. Today, we show only an empty search page and no clear indication of how to get started. Some problems include:
- Showing clickable facets with zero matches that don't do anything when you click on them
- We require either a text search to get started but also have group and project filters in the same location, making it seem like they could be required filters as well
- We don't show any recent searches or GitLab history (even the command palette/global search modal does this to some extent)
- We default to searching projects, but the most commonly searched type is code, and we only support that in advanced search if you've filtered on a group or project
Proposal
A few small changes could improve the activation moment for users and reduce friction to using advanced search:
- Default to applying a group filter that matches the group the user is currently in. From research conducted by the Tenant Scale team we know that, at least on cloud, 78% of users are members of a single top-level group
- Show code results as the default result type. Research has shown us that the most common searches in GitLab are for code. Defaulting to searching code will increase the likelihood that the user's first search is at least the type of search they intended.
- Show history and recent items/searches instead of an empty search results section. We can start by just copying the behavior of the global search modal to reduce MVC scope.
An example history and recent searches/items page
Alternatively, we could run a wildcard query when the advanced search page loads, which would populate all facets (except code) with results. There may be performance constraints on this approach, and we also wouldn't be able to show code results as the default.
Edited by Ben Venker