-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat(orama): add SearchHit UI component #8398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8398 +/- ##
==========================================
- Coverage 76.41% 75.27% -1.14%
==========================================
Files 118 107 -11
Lines 9928 9155 -773
Branches 334 313 -21
==========================================
- Hits 7586 6891 -695
+ Misses 2340 2262 -78
Partials 2 2 ☔ View full report in Codecov by Sentry. |
📦 Build Size ComparisonSummary
Changes➕ Added Assets (3)
➖ Removed Assets (3)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a reusable SearchHit UI component in the ui-components package and refactors the existing site-specific SearchItem to use it. The SearchHit component abstracts search result item rendering, making it available for use across different projects including doc-kit.
Key Changes
- New SearchHit component in ui-components with customizable link rendering via
asprop - Refactored SearchItem to wrap SearchHit with site-specific logic
- Consolidated CSS by moving shared styles from site-specific files to ui-components
- Updated DocumentLink to use shared CSS from ui-components
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-components/src/Common/Search/Results/Hit/index.tsx | New SearchHit component with flexible link rendering and mode-based accessibility |
| packages/ui-components/src/Common/Search/Results/Hit/index.module.css | CSS for SearchHit with consolidated styles from previously site-specific files |
| packages/ui-components/package.json | Patch version bump to 1.4.1 |
| apps/site/components/Common/Searchbox/index.tsx | Updated import to use default export of SearchItem |
| apps/site/components/Common/Searchbox/SearchItem/index.tsx | Refactored to wrap SearchHit component with site-specific document transformation |
| apps/site/components/Common/Searchbox/DocumentLink/index.tsx | Updated to use shared CSS from ui-components and simplified rendering |
| apps/site/components/Common/Searchbox/DocumentLink/index.module.css | Removed file as styles moved to ui-components |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Follow-up #8175. This is the last hurdle for me to add this to
doc-kit