Skip to content
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

Removes some padding and margins from chat output to tidy page #240

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions apps/www/src/components/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ export const Chat = () => {
className="p-2 flex flex-col"
>
{reversedMessagesWithoutSystem.length != 0 && (
<div className="pb-[200px] h-screen pt-4 md:pt-20">
<div className="h-[calc(100vh-theme(spacing.18))]">
{/* Col-reverse is used to enable automatic scrolling as content populates the div */}
<div className="overflow-y-auto flex flex-col-reverse h-full mx-auto">
<div className="flex flex-1" />

<div className="h-full overflow-y-auto flex flex-col-reverse mx-auto">
<div className="flex flex-1 min-h-[140px]" />
{reversedMessagesWithoutSystem.map((message, index) => {
const { role } = message;
const isStreamFinished =
Expand Down Expand Up @@ -151,7 +152,7 @@ export const Chat = () => {
)}
<div className="w-2/3 m-auto inset-x-0 fixed bottom-0 max-w-2xl mx-auto">
<div>
<div className="bg-background flex flex-col overflow-hidden max-h-60 focus-within:border-white relative px-4 py-2 shadow-lg mb-4 sm:rounded-xl sm:border md:py-4">
<div className="bg-background flex flex-col overflow-hidden max-h-60 focus-within:border-white relative px-4 py-2 shadow-lg mb-6 sm:rounded-xl sm:border md:py-4">
<Textarea
placeholder="What would you like to know?"
value={input}
Expand Down
Loading