Skip to content

Conversation

@GaneshPatil7517
Copy link
Contributor

Summary

Fixes #1459 - Improves search box behavior by prioritizing core Camel documentation over component pages and preventing UI overflow issues.

Changes

  • Input length limit: Added 200 character maximum to search input (HTML maxlength + JS validation)
  • Core docs prioritization: Search results now rank core documentation first:
    • /manual/
    • /user-guide/
    • /architecture/
    • /getting-started/
    • /faq/
  • Component deprioritization: Component pages (/components/) now rank lower in results
  • UI overflow prevention: Added CSS constraints (max-width: 600px, min-width: 300px) to search dropdown

Technical Details

  • Fetch 20 results from Algolia, then filter/sort to top 10
  • Sorting logic: core docs → other docs → components
  • Input validation applied both via HTML attribute and JavaScript event listener

Testing

  • UI bundle builds successfully (yarn build)
  • Input stops at 200 characters
  • Search dropdown does not overflow
  • 10 results display correctly
  • Core docs appear before component pages when searching terms like "endpoint", "exchange", "message"
  • No console errors

…esult cap

Truncates each search result description to 200 characters

Prevents result list overflow that hides other hits

Updated search result return limit from 5 to 10

Added CSS line-clamp for cleaner result display
- Add 200 character max length to search input (HTML + JS validation)
- Prioritize core documentation (manual, user-guide, architecture) over component pages
- Add CSS constraints (max-width, min-width) to prevent dropdown UI overflow
- Fetch more results (20) from Algolia then filter and sort to top 10
- Core docs patterns: /manual/, /user-guide/, /architecture/, /getting-started/, /faq/
- Component pages now rank lower in search results
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

🚀 Preview is available at https://pr-1465--camel.netlify.app

@GaneshPatil7517
Copy link
Contributor Author

hey @davsclaus all checks are passed successfully exited to see it merged...

@davsclaus
Copy link
Contributor

The PR #1466 includes this and other fixes so closing this PR

@davsclaus davsclaus closed this Jan 6, 2026
@GaneshPatil7517
Copy link
Contributor Author

ok no problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search box - Cut text entry to a max number of chars so the search box does not get big and you cannot see other results

2 participants