Skip to content

Commit

Permalink
Merge pull request #532 from staticGuru/error-state-#484
Browse files Browse the repository at this point in the history
Fix the error state UI
  • Loading branch information
dartpain authored Oct 9, 2023
2 parents 64a8857 + 3e20552 commit 2800d0d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
32 changes: 15 additions & 17 deletions frontend/src/conversation/ConversationBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ const ConversationBubble = forwardRef<
<div className="flex self-start">
<Avatar className="mt-2 text-2xl" avatar="🦖"></Avatar>
<div
className={`ml-2 mr-5 flex flex-col items-center rounded-3xl bg-gray-1000 p-3.5 ${
className={`ml-2 mr-5 flex flex-col items-center rounded-3xl bg-gray-1000 p-3.5 ${
type === 'ERROR'
? ' rounded-lg border border-red-2000 bg-red-1000 p-2 text-red-3000'
: ''
? 'flex-row rounded-full border border-transparent bg-[#FFE7E7] p-2 py-5 text-sm font-normal text-red-3000 dark:border-red-2000 dark:text-white'
: 'flex-col rounded-3xl'
}`}
>
{type === 'ERROR' && (
Expand Down Expand Up @@ -115,18 +115,14 @@ const ConversationBubble = forwardRef<
{message}
</ReactMarkdown>
{DisableSourceFE || type === 'ERROR' ? null : (
<span className="mt-3 h-px w-full bg-[#DEDEDE]"></span>
)}
<div className="mt-3 flex w-full flex-row flex-wrap items-center justify-start gap-2">
{DisableSourceFE || type === 'ERROR' ? null : (
<div className="py-1 px-2 text-base font-semibold">
Sources:
</div>
)}
<div className="flex flex-row flex-wrap items-center justify-start gap-2">
{DisableSourceFE
? null
: sources?.map((source, index) => (
<>
<span className="mt-3 h-px w-full bg-[#DEDEDE]"></span>
<div className="mt-3 flex w-full flex-row flex-wrap items-center justify-start gap-2">
<div className="py-1 px-2 text-base font-semibold">
Sources:
</div>
<div className="flex flex-row flex-wrap items-center justify-start gap-2">
{sources?.map((source, index) => (
<div
key={index}
className={`max-w-fit cursor-pointer rounded-[28px] py-1 px-4 ${
Expand All @@ -149,8 +145,10 @@ const ConversationBubble = forwardRef<
</p>
</div>
))}
</div>
</div>
</div>
</div>
</>
)}
</div>
<div
className={`mr-2 flex items-center justify-center ${
Expand Down
1 change: 1 addition & 0 deletions frontend/tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
darkMode: 'class',
theme: {
extend: {
spacing: {
Expand Down

2 comments on commit 2800d0d

@vercel
Copy link

@vercel vercel bot commented on 2800d0d Oct 9, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

docs-gpt – ./frontend

docs-gpt-arc53.vercel.app
docs-gpt-brown.vercel.app
docs-gpt-git-main-arc53.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 2800d0d Oct 9, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nextra-docsgpt – ./docs

nextra-docsgpt-arc53.vercel.app
nextra-docsgpt-git-main-arc53.vercel.app
docs.docsgpt.co.uk
nextra-docsgpt.vercel.app

Please sign in to comment.