From 7cd7c588f25b771460aa934b15dc6a8decf77f8a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 2 Jul 2026 20:55:48 +0000 Subject: [PATCH] Fix Train tab example cards and Create/Train tab layout The example-dataset cards used a two-column grid in the ~340px config column, which wrapped titles one word per line and let the long license text overrun into the neighbouring card. Switch to one card per row with a horizontal layout: title with a compact truncated license badge (full text in the tooltip), a two-line clamped description, and the Import button on the right. The Create/Train switch had an icon inside the Train trigger that overhung the pill corner. Drop the icon, make both triggers a fixed equal width so the active pill sits flush in the top bar. --- .../src/features/images/images-page.tsx | 60 +++++++++++-------- .../images/train/example-dataset-cards.tsx | 42 ++++++++----- 2 files changed, 61 insertions(+), 41 deletions(-) diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx index 6d22473377..8d8f0a38f3 100644 --- a/studio/frontend/src/features/images/images-page.tsx +++ b/studio/frontend/src/features/images/images-page.tsx @@ -3,7 +3,6 @@ import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react"; import { - AiMagicIcon, ArrowLeftRightIcon, ArrowReloadHorizontalIcon, Delete02Icon, @@ -465,34 +464,41 @@ function Field({ function AdvancedSelect({ label, hint, + desc, value, onValueChange, options, }: { label: string; hint?: ReactNode; + // A short always-visible description under the row (the hint tooltip carries the full + // detail). Used for controls whose label alone does not convey what they do. + desc?: string; value: string; onValueChange: (v: string) => void; options: Array<[string, string]>; }) { return ( -
- - {label} - {hint && {hint}} - - +
+
+ + {label} + {hint && {hint}} + + +
+ {desc &&

{desc}

}
); } @@ -1865,7 +1871,8 @@ export function ImagesPage({ active = true }: { active?: boolean }) { to GGUF (or nothing loaded) and otherwise show why it is unavailable. */} {!status?.loaded || status.model_kind === "gguf" ? ( setTransformerQuant(v as typeof transformerQuant)} @@ -1879,9 +1886,11 @@ export function ImagesPage({ active = true }: { active?: boolean }) { ]} /> ) : ( -
- GGUF speed mode - GGUF models only +
+ + GGUF compute + + GGUF models only
)} setPageMode(v as "create" | "train")}> - Create - - + + Create + + Train diff --git a/studio/frontend/src/features/images/train/example-dataset-cards.tsx b/studio/frontend/src/features/images/train/example-dataset-cards.tsx index 7d2bdff9a7..93be3fd200 100644 --- a/studio/frontend/src/features/images/train/example-dataset-cards.tsx +++ b/studio/frontend/src/features/images/train/example-dataset-cards.tsx @@ -14,9 +14,13 @@ import { listDiffusionDatasetExamples, } from "../api"; -// One-click example-dataset importers. Each card shows the license verbatim so users see -// the terms before importing. On success the parent refreshes its dataset list and selects -// the imported folder (and can seed the trigger prompt from suggested_trigger). +// One-click example-dataset importers. Each card shows the license so users see the terms +// before importing. On success the parent refreshes its dataset list and selects the +// imported folder (and can seed the trigger prompt from suggested_trigger). +// +// Layout: one card per row (the config column is only ~340px, so a two-column grid wrapped +// titles one word per line and let the long license text overrun into the next card). The +// license is a compact truncated badge with the full text in its title tooltip. export function ExampleDatasetCards({ onImported, }: { @@ -66,29 +70,35 @@ export function ExampleDatasetCards({ return (
- - Or start from an example dataset: + + Or start from an example dataset -
+
{examples.map((ex) => (
-
- {ex.label} - - {ex.license} - +
+
+ {ex.label} + + {ex.license} + +
+

+ {ex.description} +

-

- {ex.description} -