Skip to content

Conversation

@micheleriva
Copy link
Contributor

This PR supersedes #7971 and integrates the new Orama components, powered by the new OramaCore backend.

Description

New components - React-based to replace the old WebComponents-based ones. New backend (OramaCore instead of old Orama Cloud), all hosted and maintained on https://app.orama.com. Credentials have been shared privately with the repository maintainers on Slack.

Validation

Tested locally and on remote demo environment.

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

g-francesca and others added 30 commits July 9, 2025 11:54
Co-authored-by: Aviv Keller <me@aviv.sh>
Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
Co-authored-by: Aviv Keller <me@aviv.sh>
Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
Co-authored-by: Aviv Keller <me@aviv.sh>
Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
Co-authored-by: Aviv Keller <me@aviv.sh>
Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
Co-authored-by: Aviv Keller <me@aviv.sh>
Signed-off-by: Aileen Villanueva Lecuona <aileenvl@gmail.com>
import { ChatInput } from '../ChatInput';
import { ChatInteractionsContainer } from '../ChatInteractions';
import { Footer } from '../Footer';
import styles from './index.module.css';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: style imports after all others

import { DEFAULT_ORAMA_QUERY_PARAMS } from '#site/next.constants.mjs';
import { useSearchbox } from '#site/providers/searchboxProvider';

import styles from './index.module.css';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: style imports after all others

import { MagnifyingGlassIcon } from '@heroicons/react/24/solid';
import { SearchInput } from '@orama/ui/components';
import { useTranslations } from 'next-intl';
import { type FC, type PropsWithChildren } from 'react';
Copy link
Member

@ovflowd ovflowd Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit: this can be a type import

Suggested change
import { type FC, type PropsWithChildren } from 'react';
import type { FC, PropsWithChildren } from 'react';

import { SearchResults } from '@orama/ui/components';
import { useReducer, type FC } from 'react';

import searchboxReducer, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: simplify this to just seachReducer, searchState

import { DEFAULT_ORAMA_QUERY_PARAMS } from '#site/next.constants.mjs';
import { useSearchbox } from '#site/providers/searchboxProvider';

import styles from './index.module.css';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: style iports after all others

import type { FC, PropsWithChildren } from 'react';

import { ChatInput } from '../ChatInput';
import styles from './index.module.css';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: style imports after all others

@@ -0,0 +1,54 @@
import type { Dispatch } from 'react';

import type * as Types from '#site/types/searchbox';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @nodejs/nodejs-website do we use to do wildcard imports of types?

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM! I left a few final comment reviews that I'd appreciate to get answered still in this PR, but I believe this PR isn't anymore in a blocked state and ultimately "could" get merged as is.

@nodejs/nodejs-website, team keep me humble. Can y'all also give a final round of reviews here and help me out?

And finally for the Orama team. Thank you so so much for your patience and for the incredible work done here. Really appreciate it!!!!

@ovflowd
Copy link
Member

ovflowd commented Nov 2, 2025

(Also, thank you @g-francesca for your patience 🙇)

@g-francesca
Copy link
Contributor

(Also, thank you @g-francesca for your patience 🙇)

With pleasure 🤗​ . Thank you too for the time spent improving this PR. I'm addressing the latest comments rn.

@efekrskl
Copy link
Contributor

efekrskl commented Nov 7, 2025

Sorry if this was already discussed (200+ hidden items 😅) but I'm a bit worried about how relevant items are sorted in the search. For example:

Under learn we have the Memory article (https://nodejs.org/en/learn/diagnostics/memory) and if I search for Memory in production it is listed at the top of the search
image

However, in the preview Docs are listed before Learn but even if I select "Learn" articles, the main article is buried deep
image

Another example, ABI Stability sub content being sorted above the main article called "ABI Stability"

image

@micheleriva
Copy link
Contributor Author

@efekrskl we can tweak the search result ranking using BM25F field boosting (https://docs.orama.com/docs/cloud/performing-search/search-modes/full-text-search#field-boosting). We should gather a few example and work on the configuration until the results matches the expectations

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Nov 7, 2025
@bmuenzenmeyer
Copy link
Contributor

bmuenzenmeyer commented Nov 7, 2025

thoughts on these CI failures?

edit:

as far as I can tell, it's flakey problems with doc-kit and the linting, which we encountered elsewhere too

[Error [ERR_TEST_FAILURE]: Expected values to be strictly deep-equal:
+ actual - expected

+ [
+   'Invalid type reference: {custom}'
+ ]
- []
] {
  code: 'ERR_TEST_FAILURE',
  failureType: 'testCodeFailure',
  cause: AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected
  
  + [
  +   'Invalid type reference: {custom}'
  + ]
  - []
  
      at testRule (file:.../runner/work/nodejs.org/nodejs..../rules/__tests__/utils.mjs:31:10)
      at TestContext.<anonymous> (file:.../runner/work/nodejs.org/nodejs..../rules/__tests__/invalid-type-reference.test.mjs:49:7)
      at Test.runInAsyncScope (node:async_hooks:211:14)
      at Test.run (node:internal/test_runner/test:979:25)
      at Suite.processPendingSubtests (node:internal/test_runner/test:677:18)
      at Test.postRun (node:internal/test_runner/test:1090:19)
      at Test.run (node:internal/test_runner/test:1018:12)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:677:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: [ 'Invalid type reference: {custom}' ],
    expected: [],
    operator: 'deepStrictEqual'
  }
}

@bmuenzenmeyer bmuenzenmeyer merged commit e6dd0f7 into nodejs:main Nov 7, 2025
17 of 20 checks passed
@bmuenzenmeyer
Copy link
Contributor

merging - this has requisite approvals and has been floating long enough. let's iterate on what needs work, move to orama's new tech, and celebrate !

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.

9 participants