diff --git a/.changeset/cyan-moons-sit.md b/.changeset/cyan-moons-sit.md new file mode 100644 index 00000000..1110d204 --- /dev/null +++ b/.changeset/cyan-moons-sit.md @@ -0,0 +1,6 @@ +--- +"web": patch +"@empiricalrun/cli": patch +--- + +fix: ui breaking in case of too many sample inputs diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css index 0b46ea13..589feecb 100644 --- a/apps/web/app/globals.css +++ b/apps/web/app/globals.css @@ -73,4 +73,16 @@ body { @apply bg-background text-foreground; } +} + +/* Chrome, Safari and Opera */ +.no-scrollbar::-webkit-scrollbar { + display: none; +} + +.no-scrollbar { + -ms-overflow-style: none; + /* IE and Edge */ + scrollbar-width: none; + /* Firefox */ } \ No newline at end of file diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 34c1a519..63f6592d 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -151,7 +151,7 @@ export default function Page(): JSX.Element { }} > {runResults?.length > 0 && ( -
+
showRunDetails(activeRun?.id === run.id ? undefined : run) @@ -174,49 +174,47 @@ export default function Page(): JSX.Element { return ( -
-
- addDatasetSample(sample)} - onSampleInputUpdate={updateDatasetSampleInput} - onSampleRemove={(sample) => { - if (dataset?.samples.length === 1) { - toast.toast({ - title: "Cannot remove the last sample", - }); - } else { - removeDatasetSample(sample); - } - }} - onClickRunOnAllModels={onClickRunOnAllModelsForSample} - // TODO: show run button also when input is edited - hasMissingCompletion={hasMissingCompletion} +
+ addDatasetSample(sample)} + onSampleInputUpdate={updateDatasetSampleInput} + onSampleRemove={(sample) => { + if (dataset?.samples.length === 1) { + toast.toast({ + title: "Cannot remove the last sample", + }); + } else { + removeDatasetSample(sample); + } + }} + onClickRunOnAllModels={onClickRunOnAllModelsForSample} + // TODO: show run button also when input is edited + hasMissingCompletion={hasMissingCompletion} + /> +
+ {sampleCells.map((sample, i) => ( +
+ s.runResult!, + )} + onClickCard={() => + showRunDetails(runColumnHeaders[i]?.runResult!, true) + } + comparisonSamples={sampleCells} + isActiveColumn={runColumnHeaders[i]?.active} />
- {sampleCells.map((sample, i) => ( -
- s.runResult!, - )} - onClickCard={() => - showRunDetails(runColumnHeaders[i]?.runResult!, true) - } - comparisonSamples={sampleCells} - isActiveColumn={runColumnHeaders[i]?.active} - /> -
- ))} -
+ ))} ); })} diff --git a/apps/web/components/json-as-tab.tsx b/apps/web/components/json-as-tab.tsx index 235cb263..a5dde7fb 100644 --- a/apps/web/components/json-as-tab.tsx +++ b/apps/web/components/json-as-tab.tsx @@ -50,7 +50,7 @@ export function JsonAsTab({ return ( <> -
+
<> {activeTabValue && ( @@ -118,7 +118,7 @@ export function JsonAsTab({
{tabs.length > 0 && ( - + {tabs.map((name) => (
-
+
{(header.runResult?.stats?.scores || []).map((s) => ( <>
diff --git a/apps/web/components/sample-card.tsx b/apps/web/components/sample-card.tsx index 255f1ba2..28dc1ad5 100644 --- a/apps/web/components/sample-card.tsx +++ b/apps/web/components/sample-card.tsx @@ -24,10 +24,8 @@ export default function SampleCard({ onClickRunOnAllModels: (sample: DatasetSample) => void; }) { return ( - - + +
@@ -260,7 +260,7 @@ export default function SampleOutputCard({ orientation="horizontal" className="w-[60%] self-center" /> -

Metadata

+

Metadata

!!s.message); return ( -
+
{scores?.map((s) => { if (!s) {