RDoc-3439 New documentation search results improvements#2543
Open
poissoncorp wants to merge 4 commits into
Open
RDoc-3439 New documentation search results improvements#2543poissoncorp wants to merge 4 commits into
poissoncorp wants to merge 4 commits into
Conversation
Introduce src/components/Common/contentSource.ts as the single source of truth for the site's content sources (docs/cloud/guides/samples/external) with their labels and icons, and migrate the See Also components onto it. Reused by the search-results work.
Make guide/cloud/sample results stand out and filterable across the navbar modal and the /search page, using the existing ProductionDocsCrawler index and its docusaurus_tag field: - Color-coded source badges (Docs/Guide/Cloud/Sample) on every result. - Source filter pills (All/Docs/Guides/Cloud) plus a separated Samples scope. - Type-to-search from anywhere; pills appear once you type; first keystroke is kept. - External guides are badged "External" and redirect to their article on both surfaces. - URL-derived breadcrumb on page-level rows; real per-query "See all N" count. - /search is swizzled to carry docusaurus_tag and render the same badges + pills. Source grouping (hierarchy.lvl0) and landing-page exclusion are handled in the Algolia crawler, not the frontend. Verified: typecheck, lint, prettier, 88 tests, plus live checks on both surfaces.
8d0e739 to
ccb3392
Compare
Final adversarial-review findings (0 must, 2 should, rest may): - should: restore the flex/gap on .DocSearch-Hit-sourceBadge so dual badges (Guide + External) don't touch; give the active filter pill dark:text-black (the repo's bg-primary convention; --ifm-color-primary is light in cloud dark mode). - drop the dead SearchFilter.tag data and exclude "All" by plugin id instead (version-agnostic); remove the unused search-source-badge class hook; replace the stale Facebook/MIT header on the swizzled CSS; reword a misplaced comment. Now that the recrawl emits lvl0 + a breadcrumb field, retire the URL-breadcrumb derivation (getResultBreadcrumb/humanizeSegment/acronyms) and read the crawler breadcrumb instead, stripping the leading source root. Verified: typecheck, lint, prettier, 88 tests; live checks of breadcrumb-from-field, dual-badge spacing, active-pill dark text, and the Samples scope (indexed, shown under its pill, excluded from All).
kalczur
suggested changes
Jun 30, 2026
Addressing kalczur's review comments:
- CustomSearchButton: drop forwardRef (ref is a plain prop in React 19) and use
useIsBrowser() instead of a useState/useEffect for the shortcut key.
- searchSource: replace the `separated` flag with grouped filters
(SEARCH_FILTER_GROUPS); the UI divides between groups and the "All" exclusion
derives from groups after the first, decoupling UI from scope.
- SearchBar: introduce a typed SearchHit instead of inline `as {...}` casts.
- SearchBar: render the breadcrumb declaratively (right-aligned) instead of the
imperative DOM injection.
kalczur
approved these changes
Jul 1, 2026
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.
Issue link
RDoc-3439 New documentation search results improvements
Additional description
Improves the documentation search experience. Adds new components. Needs frontend code review @kalczur 🙏
Passed it through the superpowers code review on ultracode.
Type of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI