Skip to content

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

fix(UI): username and logo goes down as no. of projects increases (#759)

18feb06782e119adda7
diff --git a/src/components/layouts/layout.tsx b/src/components/layouts/layout.tsx
index b5775aa8ec..c5b118582f 100644
--- a/src/components/layouts/layout.tsx
+++ b/src/components/layouts/layout.tsx
@@ -417,64 +417,60 @@ export default function Layout(props: PropsWithChildren) {
))}
</ul>
</li>
-
- <li className="-mx-6">
- <Menu as="div" className="relative">
- <Menu.Button className="flex w-full items-center gap-x-4 p-1.5 px-6 py-3 text-sm font-semibold leading-6 text-gray-900 hover:bg-gray-50">
- <span className="sr-only">Open user menu</span>
- <Avatar className="h-8 w-8">
- <AvatarImage
- src={session.data?.user?.image ?? undefined}
- />
- <AvatarFallback>
- {session.data?.user?.name
- ? session.data.user.name
- .split(" ")
- .map((word) => word[0])
- .slice(0, 2)
- .concat("")
- : null}
- </AvatarFallback>
- </Avatar>
- <span className="flex-shrink truncate text-sm font-semibold leading-6 text-gray-900">
- {session.data?.user?.name}
- </span>
- <ChevronDownIcon
- className="h-5 w-5 text-gray-400"
- aria-hidden="true"
- />
- </Menu.Button>
- <Transition
- as={Fragment}
- enter="transition ease-out duration-100"
- enterFrom="transform opacity-0 scale-95"
- enterTo="transform opacity-100 scale-100"
- leave="transition ease-in duration-75"
- leaveFrom="transform opacity-100 scale-100"
- leaveTo="transform opacity-0 scale-95"
- >
- <Menu.Items className="absolute -top-full right-0 z-10 mt-2.5 w-32 rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none">
- {userNavigation.map((item) => (
- <Menu.Item key={item.name}>
- {({ active }) => (
- <a
- onClick={() => void item.onClick()}
- className={cn(
- active ? "bg-gray-50" : "",
- "block cursor-pointer px-3 py-1 text-sm leading-6 text-gray-900",
- )}
- >
- {item.name}
- </a>
- )}
- </Menu.Item>
- ))}
- </Menu.Items>
- </Transition>
- </Menu>
- </li>
</ul>
</nav>
+
+ <Menu as="div" className="relative left-1">
+ <Menu.Button className="flex w-full items-center gap-x-4 p-1.5 px-6 py-3 text-sm font-semibold leading-6 text-gray-900 hover:bg-gray-50">
+ <span className="sr-only">Open user menu</span>
+ <Avatar className="h-8 w-8">
+ <AvatarImage src={session.data?.user?.image ?? undefined} />
+ <AvatarFallback>
+ {session.data?.user?.name
+ ? session.data.user.name
+ .split(" ")
+ .map((word) => word[0])
+ .slice(0, 2)
+ .concat("")
+ : null}
+ </AvatarFallback>
+ </Avatar>
+ <span className="flex-shrink truncate text-sm font-semibold leading-6 text-gray-900">
+ {session.data?.user?.name}
+ </span>
+ <ChevronDownIcon
+ className="h-5 w-5 text-gray-400"
+ aria-hidden="true"
+ />
+ </Menu.Button>
+ <Transition
+ as={Fragment}
+ enter="transition ease-out duration-100"
+ enterFrom="transform opacity-0 scale-95"
+ enterTo="transform opacity-100 scale-100"
+ leave="transition ease-in duration-75"
+ leaveFrom="transform opacity-100 scale-100"
+ leaveTo="transform opacity-0 scale-95"
+ >
+ <Menu.Items className="absolute -top-full right-0 z-10 mt-2.5 w-32 rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none">
+ {userNavigation.map((item) => (
+ <Menu.Item key={item.name}>
+ {({ active }) => (
+ <a
+ onClick={() => void item.onClick()}
+ className={cn(
+ active ? "bg-gray-50" : "",
+ "block cursor-pointer px-3 py-1 text-sm leading-6 text-gray-900",
+ )}
+ >
+ {item.name}
+ </a>
+ )}
+ </Menu.Item>
+ ))}
+ </Menu.Items>
+ </Transition>
+ </Menu>
</div>
</div>
diff --git a/src/features/dashboard/components/TracesTimeSeriesChart.tsx b/src/features/dashboard/components/TracesTimeSeriesChart.tsx
index 3abb4f643b..ae730f6593 100644
--- a/src/features/dashboard/components/TracesTimeSeriesChart.tsx
+++ b/src/features/dashboard/components/TracesTimeSeriesChart.tsx
@@ -84,7 +84,7 @@ export const TracesTimeSeriesChart = ({
/>
{!isEmptyTimeSeries(transformedTraces) ? (
<BaseTimeSeriesChart
- className="min-h-80 h-full self-stretch"
+ className="h-full min-h-80 self-stretch"
agg={agg}
data={transformedTraces}
connectNulls={true}
diff --git a/src/pages/project/[projectId]/index.tsx b/src/pages/project/[projectId]/index.tsx
index 0442abe697..4508dc848c 100644
--- a/src/pages/project/[projectId]/index.tsx
+++ b/src/pages/project/[projectId]/index.tsx
@@ -122,7 +122,7 @@ export default function Start() {
agg={agg}
/>
<ModelUsageChart
- className="min-h-24 col-span-1 xl:col-span-3"
+ className="col-span-1 min-h-24 xl:col-span-3"
projectId={projectId}
globalFilterState={globalFilterState}
agg={agg}
diff --git a/src/styles/globals.css b/src/styles/globals.css
index a38d60fba1..00ab6dfd17 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -82,9 +82,9 @@
html,
body,
- body>div:first-child,
+ body > div:first-child,
div#__next,
- div#__next>div {
+ div#__next > div {
height: 100%;
}
-}
\ No newline at end of file
+}