Skip to content

Commit 5c85818

Browse files
committed
feat: improve UI/UX with scroll behavior and styling enhancements
- Remove white space at bottom of chat interface - Prevent scroll bounce/overscroll behavior on all scroll areas - Make scroll bar thinner and more subtle with low contrast - Add hover effects for scroll bar visibility - Clean up Docker container names for better display - Improve overall scrolling experience and visual polish
1 parent a59a198 commit 5c85818

File tree

5 files changed

+44
-7
lines changed

5 files changed

+44
-7
lines changed

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ volumes:
44
services:
55
langgraph-redis:
66
image: docker.io/redis:6
7+
container_name: langgraph-redis
78
healthcheck:
89
test: redis-cli ping
910
interval: 5s
1011
timeout: 1s
1112
retries: 5
1213
langgraph-postgres:
1314
image: docker.io/postgres:16
15+
container_name: langgraph-postgres
1416
ports:
1517
- "5433:5432"
1618
environment:
@@ -27,6 +29,7 @@ services:
2729
interval: 5s
2830
langgraph-api:
2931
image: gemini-fullstack-langgraph
32+
container_name: langgraph-api
3033
ports:
3134
- "8123:8000"
3235
depends_on:

frontend/src/components/ChatMessagesView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ export function ChatMessagesView({
252252
};
253253

254254
return (
255-
<div className="flex flex-col h-full">
256-
<ScrollArea className="flex-grow" ref={scrollAreaRef}>
257-
<div className="p-4 md:p-6 space-y-2 max-w-4xl mx-auto pt-16">
255+
<div className="flex flex-col h-full overflow-hidden">
256+
<ScrollArea className="flex-1 min-h-0" ref={scrollAreaRef}>
257+
<div className="p-4 md:p-6 pb-2 space-y-2 max-w-4xl mx-auto">
258258
{messages.map((message, index) => {
259259
const isLast = index === messages.length - 1;
260260
return (

frontend/src/components/InputForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const InputForm: React.FC<InputFormProps> = ({
4949
return (
5050
<form
5151
onSubmit={handleInternalSubmit}
52-
className={`flex flex-col gap-2 p-3 `}
52+
className={`flex flex-col gap-2 p-3 pb-4`}
5353
>
5454
<div
5555
className={`flex flex-row items-center justify-between text-white rounded-3xl rounded-bl-sm ${

frontend/src/components/ui/scroll-area.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function ScrollArea({
1717
<ScrollAreaPrimitive.Viewport
1818
data-slot="scroll-area-viewport"
1919
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
20+
style={{ overscrollBehavior: 'none' }}
2021
>
2122
{children}
2223
</ScrollAreaPrimitive.Viewport>
@@ -38,16 +39,16 @@ function ScrollBar({
3839
className={cn(
3940
"flex touch-none p-px transition-colors select-none",
4041
orientation === "vertical" &&
41-
"h-full w-2.5 border-l border-l-transparent",
42+
"h-full w-1.5 border-l border-l-transparent",
4243
orientation === "horizontal" &&
43-
"h-2.5 flex-col border-t border-t-transparent",
44+
"h-1.5 flex-col border-t border-t-transparent",
4445
className
4546
)}
4647
{...props}
4748
>
4849
<ScrollAreaPrimitive.ScrollAreaThumb
4950
data-slot="scroll-area-thumb"
50-
className="bg-border relative flex-1 rounded-full"
51+
className="bg-neutral-600/30 relative flex-1 rounded-full"
5152
/>
5253
</ScrollAreaPrimitive.ScrollAreaScrollbar>
5354
)

frontend/src/global.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@
116116
}
117117
body {
118118
@apply bg-background text-foreground;
119+
/* Prevent scroll bounce/overscroll on mobile */
120+
overscroll-behavior: none;
121+
-webkit-overflow-scrolling: touch;
122+
}
123+
html {
124+
/* Prevent scroll bounce on the entire page */
125+
overscroll-behavior: none;
119126
}
120127
}
121128

@@ -150,5 +157,31 @@
150157
animation: fadeInUpSmooth 0.3s ease-out forwards;
151158
}
152159

160+
/* Prevent scroll bounce on scroll areas */
161+
[data-radix-scroll-area-viewport] {
162+
overscroll-behavior: none !important;
163+
-webkit-overflow-scrolling: touch;
164+
}
165+
166+
/* Hide any white space that might appear during scroll bounce */
167+
[data-radix-scroll-area-viewport]::-webkit-scrollbar {
168+
width: 0px;
169+
background: transparent;
170+
}
171+
172+
/* Subtle scroll bar styling */
173+
[data-slot="scroll-area-scrollbar"] {
174+
opacity: 0.3;
175+
transition: opacity 0.2s ease;
176+
}
177+
178+
[data-slot="scroll-area"]:hover [data-slot="scroll-area-scrollbar"] {
179+
opacity: 0.6;
180+
}
181+
182+
[data-slot="scroll-area-thumb"] {
183+
background-color: rgb(115 115 115 / 0.2) !important;
184+
}
185+
153186
/* Ensure your body or html has a dark background if not already set, e.g.: */
154187
/* body { background-color: #0c0c0d; } */ /* This is similar to neutral-950 */

0 commit comments

Comments
 (0)