Feat/web 308 improve search on documentation website related tasks#376
Open
niallobrien wants to merge 46 commits intomainfrom
Open
Feat/web 308 improve search on documentation website related tasks#376niallobrien wants to merge 46 commits intomainfrom
niallobrien wants to merge 46 commits intomainfrom
Conversation
… and improving anchor handling
…h hit categorization
… anchor title handling
… improve anchor fragment handling
…ndling and add tests
…cription segments
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…g and layout adjustments
…nd update Navbar usage
…adjust search trigger placeholder margin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Story
https://linear.app/cloudsmith/issue/WEB-308/improve-search-on-documentation-website-and-related-tasks
Description
This feature replaces the existing search feature with an Algolia-backed search implementation. This required changes to the existing Algolia docs index (Crawler config), the docs site and the website. See website PR.
I used the
dev_DOCSindex while building this feature, and used Algolia'sduplicatefeature to move the index records intoDocsonly after I had first tested my local instance of the website against thedev_DOCSindex.The Algolia index has already been updated and I've confirmed that these changes do not break the search results in
production.The frontend implementation was a little fiddly in places due to the design requirements and the tokens being used on the site (vs the DS). There is future work planned to align the docs site tokens with the product.
I brought the
SearchDialogcomponent over from the website codebase and adjusted accordingly. The main changes being theinlineandcompactvariants, along with theming options, keyboard activation, http method badges (as on the current implementation in production) and alternative grouping/ranking compared to the website's implementation.Regarding http method badges, the implementation is in place, but I don't see how I can get Algolia to crawl a preview link that's behind a Vercel auth check, so I used an agent to script a batch insert into the docs index based on the http methods from the Swagger docs. This allowed me to test this feature locally (see screenshot). Once this PR is merged, the updated Crawler config should get the http method names from the data attribute that I've added to the frontend.
As much as I'd have loved for the two sites to share a common search package implementation here, the search result ordering & grouping is quite different between the two, and is already quite verbose in places, but this could potentially be tackled in a future story, especially if maintenance due to deviation becomes an issue. Future work will also include a
lightanddarkmode, so I tried to somewhat account for this in advance.There's also numerous updates to the site on mobile.
Screenshots
Release plan
Docsindex.dev_DOCSindex, as it won't be needed. A duplicate ofDocscan be easily made at any point in the future.Checklist