-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat(orama): use new UI components #7971
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
Open
aileenvl
wants to merge
39
commits into
nodejs:main
Choose a base branch
from
oramasearch:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
7c4f8e5
feat: add new searchbox - initial setup
g-francesca e4d0c1d
style: search button
g-francesca 086dd84
style: searchbox empty state
g-francesca 8451f80
style: modal search
g-francesca 8ecdf9e
style: prompt wrapper
g-francesca 6ac3d65
fix: layout sliding panel
g-francesca 87db2f9
style: chat sources
g-francesca 40ea1c8
refactor: search component
g-francesca 31273fd
feat: add translations for search component
g-francesca 31e2db8
update orama core and update logo
aileenvl 2a22940
update sync
aileenvl 65ecd9f
update pnpm-lock
aileenvl 834636f
Update apps/site/components/Common/Searchbox/Chat.tsx
aileenvl f088203
Update apps/site/components/Common/Searchbox/Chat.tsx
aileenvl 3d582dd
Update apps/site/components/Common/Searchbox/Search.tsx
aileenvl b1fff6a
Update apps/site/components/Common/Searchbox/Search.tsx
aileenvl e09fa32
Update apps/site/components/Common/Searchbox/Search.tsx
aileenvl d37297f
fix height and pr comments
aileenvl 954ee99
Merge branch 'main' of https://github.com/oramasearch/nodejs.org
aileenvl ff59f5b
fix import and add directories for Search and Chat
aileenvl 8d7657e
update icon and orama ui components
aileenvl 43c56bd
rollback translation changes
aileenvl 83a0c1b
update on datasource and ui components
aileenvl f4e51bf
update env variables
aileenvl 242c667
pr comments and facets added
aileenvl 535d6a8
pr comments
aileenvl 992f1fe
fixes in styles and facets
aileenvl d73687a
facets search fix
aileenvl e7a64b9
push facets query fix
aileenvl dbd4637
feat: adds filters to search
micheleriva aab05d1
Merge branch 'main' of github.com:oramasearch/nodejs.org
micheleriva 5a7c885
fix facet count
aileenvl 7aa8350
reset searchTerm
aileenvl 89d9d71
old logo
aileenvl 80065bf
fix mobile search
aileenvl 78c4f3f
chat mobile
aileenvl 29f2faf
mobile enhacements
aileenvl 4892e1d
fix blur
aileenvl db4f272
env variables and dispatcher
aileenvl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
apps/site/components/Common/Searchbox/Chat/ChatActions/index.module.css
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.chatActionsContainer { | ||
@apply flex; | ||
@apply items-center; | ||
@apply justify-end; | ||
@apply pt-2; | ||
} | ||
|
||
.chatActionsList { | ||
@apply flex; | ||
@apply list-none; | ||
@apply items-center; | ||
@apply gap-2; | ||
@apply p-0; | ||
} | ||
|
||
.chatAction { | ||
@apply cursor-pointer; | ||
@apply rounded-full; | ||
@apply p-2; | ||
@apply text-neutral-800; | ||
@apply transition-colors; | ||
@apply duration-300; | ||
@apply hover:bg-neutral-300; | ||
@apply dark:text-neutral-400; | ||
@apply dark:hover:bg-neutral-900; | ||
|
||
svg { | ||
@apply h-4; | ||
@apply w-4; | ||
} | ||
} | ||
|
||
.chatActionIconSelected { | ||
@apply text-green-600; | ||
@apply dark:text-green-400; | ||
} |
57 changes: 57 additions & 0 deletions
57
apps/site/components/Common/Searchbox/Chat/ChatActions/index.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
'use client'; | ||
|
||
import { | ||
DocumentCheckIcon, | ||
ClipboardIcon, | ||
ArrowPathIcon, | ||
} from '@heroicons/react/24/solid'; | ||
import type { Interaction } from '@orama/core'; | ||
import { ChatInteractions } from '@orama/ui/components'; | ||
import type { FC } from 'react'; | ||
|
||
import styles from './index.module.css'; | ||
|
||
type ChatActionsProps = { | ||
interaction: Interaction; | ||
index: number; | ||
totalInteractions: number; | ||
}; | ||
|
||
export const ChatActions: FC<ChatActionsProps> = ({ | ||
interaction, | ||
index, | ||
totalInteractions, | ||
}) => { | ||
if (!interaction.response) return null; | ||
|
||
return ( | ||
<div className={styles.chatActionsContainer}> | ||
<ul className={styles.chatActionsList}> | ||
{index === totalInteractions - 1 && ( | ||
<li> | ||
<ChatInteractions.RegenerateLatest | ||
className={styles.chatAction} | ||
interaction={interaction} | ||
> | ||
<ArrowPathIcon /> | ||
</ChatInteractions.RegenerateLatest> | ||
</li> | ||
)} | ||
<li> | ||
<ChatInteractions.CopyMessage | ||
className={styles.chatAction} | ||
interaction={interaction} | ||
> | ||
{(copied: boolean) => | ||
copied ? ( | ||
<DocumentCheckIcon className={styles.chatActionIconSelected} /> | ||
) : ( | ||
<ClipboardIcon /> | ||
) | ||
} | ||
</ChatInteractions.CopyMessage> | ||
</li> | ||
</ul> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.
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.
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.
You can split utilities with
,
i.e.
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.
Note that this applies to all CSS files