Skip to content

Conversation

aileenvl
Copy link

@aileenvl aileenvl commented Jul 9, 2025

Preview this PR at https://nodejs-org-git-fork-oramasearch-main-openjs.vercel.app/en

Description

Validation

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.

@aileenvl aileenvl requested review from a team as code owners July 9, 2025 19:07
Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nodejs-org Ready Ready Preview Sep 9, 2025 10:15am

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Thank you so much!

I've left some comments, and I am here to help you implement anything you need help with, just ping me :-).

@avivkeller avivkeller marked this pull request as draft July 9, 2025 20:00
@avivkeller avivkeller changed the title DRAFT: Orama core updates feat(orama): use new UI components Jul 9, 2025
aileenvl and others added 5 commits July 9, 2025 19:24
Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: Aileen Villanueva Lecuona <[email protected]>
Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: Aileen Villanueva Lecuona <[email protected]>
Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: Aileen Villanueva Lecuona <[email protected]>
Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: Aileen Villanueva Lecuona <[email protected]>
Co-authored-by: Aviv Keller <[email protected]>
Signed-off-by: Aileen Villanueva Lecuona <[email protected]>
Copy link
Contributor

Note

Your Pull Request seems to be updating Translations of the Node.js Website.

Whilst we appreciate your intent; Any Translation update should be done through our Crowdin Project.
We recommend giving a read on our Translation Guidelines.

Thank you!

@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 18:42
Copy link
Contributor

@Copilot Copilot AI left a 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 modernizes the Orama search integration by migrating from @orama/react-components to the new @orama/ui package and updating the sync script to use @orama/core. The changes implement a more customizable search and chat interface with mobile support and keyboard navigation.

Key Changes

  • Migrated from @orama/react-components to @orama/ui components for better customization
  • Updated sync script to use new @orama/core API instead of @oramacloud/client
  • Added comprehensive search and chat UI components with mobile responsiveness

Reviewed Changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/i18n/src/locales/en.json Added new translation keys for search UI features
apps/site/scripts/orama-search/sync-orama-cloud.mjs Migrated to new Orama Cloud API using @orama/core
apps/site/package.json Updated dependencies to include new Orama packages
apps/site/components/Common/Searchbox/ New comprehensive search interface with chat integration
apps/site/components/withNavBar.tsx Updated import path for search component

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +37 to +38
// The new API from @orama/core might have a different approach for full sync.
// Based on the provided examples, we are now only running the update.
Copy link
Preview

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

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

The comment mentions that the new API 'might have a different approach for full sync' but doesn't provide certainty. This suggests the migration may be incomplete - consider verifying the new API behavior for data synchronization.

Suggested change
// The new API from @orama/core might have a different approach for full sync.
// Based on the provided examples, we are now only running the update.
// To ensure a true full sync, we clear the index before inserting new documents.
// This prevents orphaned documents from remaining in the index.
if (typeof datasource.deleteAllDocuments === 'function') {
await datasource.deleteAllDocuments();
} else {
// TODO: Implement logic to remove documents not present in siteContent
console.warn('WARNING: datasource.deleteAllDocuments() is not available. The index may accumulate stale documents.');
}

Copilot uses AI. Check for mistakes.

Comment on lines +9 to +10
projectId: process.env.NEW_ORAMA_PROJECT_ID || '',
apiKey: process.env.NEW_ORAMA_API_KEY || '',
Copy link
Member

Choose a reason for hiding this comment

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

I suspect the GitHub Actions workflow needs to be updated to expose these new env vars?

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

I'm still seeing one styling inconsistencies.

I'd love if: @apply was used when possible, and manual css was only on a if-needed basis.

Additionally, no style attributes should be needed.

Let me know if you need help with that

Comment on lines 12 to 22
.chatLoadingWrapper {
align-items: center;
background-color: #0d121c;
border-radius: var(--radius-m, calc(12rem / var(--orama-base-font-size, 16)));
display: flex;
justify-content: center;
margin: 0 var(--spacing-l, calc(16rem / var(--orama-base-font-size, 16)));
margin-bottom: 24px;
min-height: 60px;
padding: 24px;
}
Copy link
Member

Choose a reason for hiding this comment

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

Can all of these / most of these be tailwind?

@avivkeller
Copy link
Member

avivkeller commented Aug 30, 2025

@aileenvl Do you mind if I rebase this + fix some of the formatting to align with our codebase?

(I'd need access to edit this PR

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

This cannot land until all of the following constraints are met:

  1. CSS should use Tailwind when possible
  2. Styles should (almost) never be defined via style=
  3. Any/all environment constants should come from next.constants.mjs

@aileenvl
Copy link
Author

aileenvl commented Aug 30, 2025

This cannot land until all of the following constraints are met:

  1. CSS should use Tailwind when possible
  2. Styles should (almost) never be defined via style=
  3. Any/all environment constants should come from next.constants.mjs

Will address this asap @avivkeller , thank you for the review

@avivkeller
Copy link
Member

Please use requested changes for these cases, the blocked tag should be used when there are things out of our reach blocking the pr.

@araujogui Those were unrelated. The (now-removed) blocked label was referring to the unset API keys.

@araujogui
Copy link
Member

Please use requested changes for these cases, the blocked tag should be used when there are things out of our reach blocking the pr.

@araujogui Those were unrelated. The (now-removed) blocked label was referring to the unset API keys.

Yeah, i misunderstood, mb

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Really nice, but the CSS needs some work.

rows={1}
maxLength={500}
autoFocus
className={`${styles.promptFieldCustom} m-0 w-full resize-none border-none bg-transparent p-0 font-normal leading-relaxed text-white outline-none`}
Copy link
Member

Choose a reason for hiding this comment

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

These should all use the classNames function

padding: 0;
}

.chatAssistantMessage p {
Copy link
Member

Choose a reason for hiding this comment

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

These can be nested

}

.chatAssistantMessage ul {
@apply list-disc,
Copy link
Member

@avivkeller avivkeller Sep 6, 2025

Choose a reason for hiding this comment

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

No comma needed. I was incorrect earlier.

This reverts commit 43d8cac.
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.

8 participants