-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(web): List search - make content searchable #16701
Conversation
WalkthroughThe pull request introduces modifications to the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (1)
libs/cms/src/lib/search/importers/genericListItem.service.ts (1)
46-50
: Consider improving maintainability with constants and documentationThe magic numbers in
extractStringsFromObject
could be more maintainable as named constants.Apply this improvement:
+ // Maximum depth and length limits for content extraction + const MAX_CONTENT_LENGTH = 100; + const MAX_RECURSION_DEPTH = 2; extractStringsFromObject( mapped.content.map(pruneNonSearchableSliceUnionFields), - 100, - 2, + MAX_CONTENT_LENGTH, + MAX_RECURSION_DEPTH, ),Also, consider adding JSDoc comments to explain the content processing logic for future maintainers.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
libs/cms/src/lib/search/importers/genericListItem.service.ts
(2 hunks)libs/cms/src/lib/search/importers/teamList.service.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
libs/cms/src/lib/search/importers/genericListItem.service.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/cms/src/lib/search/importers/teamList.service.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
🔇 Additional comments (3)
libs/cms/src/lib/search/importers/teamList.service.ts (1)
4-4
: LGTM: Appropriate rich text renderer import added
The addition of documentToPlainTextString
is appropriate for converting Contentful rich text to searchable plain text.
libs/cms/src/lib/search/importers/genericListItem.service.ts (2)
5-5
: LGTM: Appropriate use of Contentful's plain text renderer
The addition of documentToPlainTextString
is well-suited for converting rich text content to searchable plain text.
37-54
: LGTM: Well-structured content processing implementation
The new content processing logic effectively combines rich text and structured content for search indexing while maintaining clean separation of concerns.
Datadog ReportAll test runs ✅ 70 Total Test Services: 0 Failed, 67 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (5) |
List search - make content searchable
What
Checklist:
Summary by CodeRabbit
New Features
cardIntro
andcontent
fields for better text representation.Bug Fixes