EDU-17909 | Implement improvements to the search components#452
Open
anabaarbosa wants to merge 2 commits intomainfrom
Open
EDU-17909 | Implement improvements to the search components#452anabaarbosa wants to merge 2 commits intomainfrom
anabaarbosa wants to merge 2 commits intomainfrom
Conversation
- Remove @img/sharp-linux-x64; sharp resolves binaries per platform. - Add utils/search/tokenizedSearch for terms, stopwords, and match counts. - Use KI-style search on known-issues, troubleshooting, faq, announcements. - Add search tooltips; fix Next Image objectFit in newsletter section. - Remove unused unlink import from cypress plugins.
✅ Deploy Preview for leafy-mooncake-7c2e5e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
What is the purpose of this pull request?
Centralizes tokenized search in src/utils/search/tokenizedSearch.ts: stopwords by locale, splitting the query into terms, matching on configurable fields, and ranking by how many terms match before applying date ordering.
Pages updated: known-issues, troubleshooting, faq, announcements. Each passes its own searchable fields:
Add a “?” tooltip next to the search inputs on those pages (reusing the known-issues tooltip message id with sensible defaultMessages).
Fixes Next.js 13 Image deprecation by replacing objectFit with style={{ objectFit: 'cover' }} in newsletter-section; removes unused unlink import in Cypress plugin; removes @img/sharp-linux-x64 from required deps (it broke yarn install on macOS arm64). If kept for Linux CI, it should live under optionalDependencies so local arm64 installs still succeed.
What problem is this solving?
List searches used a single substring on the title. That made multi-word queries and common words (articles/prepositions) awkward and did not rank results by relevance. This aligns behavior across content types with the richer KI-style flow and improves developer experience on Apple Silicon by not forcing a Linux-only Sharp binary as a hard dependency.
How should this be manually tested?
Screenshots or example usage
Types of changes