Resolve "Improve result snippet text"
What does this MR do and why?
Describe why, not just what. Include links to relevant issues or discussions.
This MR goes through the array of html snippets returned by search query, sorts them by the longest to shortest snippet, and the code grabs the longest one (first item in the sorted array) and returns that to the search results component.
Screenshots, screen recordings, or links to review app
These are strongly recommended to assist reviewers and reduce the time to merge your change.
After searching "git":
BEFORE | AFTER |
---|---|
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. -
Search any term in the search bar, go to search results and make sure there's no awkwardly short snippet for any search result displayed.
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.
Closes #131 (closed)
Edited by Hiru Fernando