Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(annotation): mobile responsivness behaviour (#8154)

marliessophie1fa4fc6329e6
diff --git a/web/src/components/ItemBadge.tsx b/web/src/components/ItemBadge.tsx
index 7576076390..be2b354f99 100644
--- a/web/src/components/ItemBadge.tsx
+++ b/web/src/components/ItemBadge.tsx
@@ -99,12 +99,16 @@ export function ItemBadge({
variant="outline"
title={label}
className={cn(
- "flex max-w-fit items-center gap-1 border-2 bg-background px-1",
+ "flex max-w-fit items-center gap-1 overflow-hidden whitespace-nowrap border-2 bg-background px-1",
isSmall && "h-4",
)}
>
<Icon className={iconClass} />
- {showLabel && <span>{label.replace(/_/g, " ")}</span>}
+ {showLabel && (
+ <span className="truncate" title={label.replace(/_/g, " ")}>
+ {label.replace(/_/g, " ")}
+ </span>
+ )}
</Badge>
);
}
diff --git a/web/src/features/annotation-queues/components/shared/AnnotationProcessingLayout.tsx b/web/src/features/annotation-queues/components/shared/AnnotationProcessingLayout.tsx
index 543b1c83c3..c2f43913e9 100644
--- a/web/src/features/annotation-queues/components/shared/AnnotationProcessingLayout.tsx
+++ b/web/src/features/annotation-queues/components/shared/AnnotationProcessingLayout.tsx
@@ -20,27 +20,40 @@ export const AnnotationProcessingLayout: React.FC<
);
return (
- <ResizablePanelGroup
- direction="horizontal"
- className="h-full overflow-hidden"
- onLayout={(sizes) => {
- setPanelSize(sizes[0]);
- }}
- >
- <ResizablePanel
- className="col-span-1 h-full !overflow-y-auto rounded-md border"
- minSize={30}
- defaultSize={panelSize}
- >
- {leftPanel}
- </ResizablePanel>
- <ResizableHandle withHandle className="ml-4 bg-transparent" />
- <ResizablePanel
- className="col-span-1 h-full md:flex md:flex-col md:overflow-hidden"
- minSize={30}
- >
- {rightPanel}
- </ResizablePanel>
- </ResizablePanelGroup>
+ <>
+ {/* Mobile: Vertical stack without resizing */}
+ <div className="flex h-full flex-col gap-2 overflow-hidden md:hidden">
+ <div className="h-1/2 overflow-y-auto rounded-md border">
+ {leftPanel}
+ </div>
+ <div className="flex h-1/2 flex-col overflow-hidden">{rightPanel}</div>
+ </div>
+
+ {/* Desktop: Horizontal resizable panels */}
+ <div className="hidden max-h-full min-h-0 overflow-hidden md:block">
+ <ResizablePanelGroup
+ direction="horizontal"
+ className="h-full overflow-hidden"
+ onLayout={(sizes) => {
+ setPanelSize(sizes[0]);
+ }}
+ >
+ <ResizablePanel
+ className="col-span-1 h-full !overflow-y-auto rounded-md border"
+ minSize={30}
+ defaultSize={panelSize}
+ >
+ {leftPanel}
+ </ResizablePanel>
+ <ResizableHandle withHandle className="ml-4 bg-transparent" />
+ <ResizablePanel
+ className="col-span-1 flex h-full flex-col overflow-hidden"
+ minSize={30}
+ >
+ {rightPanel}
+ </ResizablePanel>
+ </ResizablePanelGroup>
+ </div>
+ </>
);
};