Add Google search form components
What does this MR do and why?
Copies over Google search form components from the Nanoc site, and re-organizes the src
directory. Adding search brought over a lot more files, and our directory structure was a little confusing.
The directory re-org:
- Adds a subdirectory for search-related features (we have a lot of these, and will be adding more later)
- Drops the
helpers
directory and moves its contents toutils
. Files in this directory are referenced from features or components; they do not do anything on their own. - Adds a
features
directory for standalone features that are not Vue components (plantuml.js, collapse.js)
This MR does not include:
- Search results (all searches will return "No results" for now)
- Results page/filters
- Mobile version
- Search-related documentation
We'll get these in follow-ups. We want to get these forms merged so work can move forward on #20 (closed).
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
Run make clean
to delete files from previous builds (we should test the file re-org with a total clean slate) -
Run make view
and verify:
- Search form appears in the nav bar on interior pages
- Search form tracks page view history and shows recent items in the result panel before you type in the search box
- Search form shows the "Popular Item" with a working link
- Keyboard nav in the search box works (shortcut to focus on the search input; up/down arrows to navigate the featured/recent items; Enter to go to the results page)
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Sarah German