Merge pull request #266 from unslothai/fix/dataset-search-remove-size-download-badges

Remove dataset metadata badges from HF dataset dropdowns
This commit is contained in:
Roland Tannous 2026-02-27 13:22:49 +04:00 committed by GitHub
commit 5be7ae925d
2 changed files with 3 additions and 39 deletions

View file

@ -38,7 +38,7 @@ import {
useHfTokenValidation,
useInfiniteScroll,
} from "@/hooks";
import { cn, formatCompact } from "@/lib/utils";
import { cn } from "@/lib/utils";
import {
HfDatasetSubsetSplitSelectors,
useTrainingConfigStore,
@ -254,16 +254,8 @@ export function DatasetStep() {
>
<ComboboxList className="p-1 !max-h-none !overflow-visible">
{(id: string) => {
const r = hfResults.find((r) => r.id === id);
const detail = r?.totalExamples
? `${formatCompact(r.totalExamples)} rows`
: (r?.sizeCategory ?? null);
return (
<ComboboxItem
key={id}
value={id}
className="justify-between"
>
<ComboboxItem key={id} value={id}>
<Tooltip>
<TooltipTrigger asChild={true}>
<span className="min-w-0 flex-1 truncate">
@ -277,15 +269,6 @@ export function DatasetStep() {
{id}
</TooltipContent>
</Tooltip>
{detail ? (
<span className="text-[10px] text-muted-foreground shrink-0">
{detail}
</span>
) : r?.downloads != null ? (
<span className="text-[10px] text-muted-foreground shrink-0">
{formatCompact(r.downloads)}
</span>
) : null}
</ComboboxItem>
);
}}

View file

@ -33,7 +33,6 @@ import {
useHfTokenValidation,
useInfiniteScroll,
} from "@/hooks";
import { formatCompact } from "@/lib/utils";
import {
HfDatasetSubsetSplitSelectors,
useDatasetPreviewDialogStore,
@ -224,21 +223,8 @@ export function DatasetSection() {
>
<ComboboxList className="p-1 !max-h-none !overflow-visible">
{(id: string) => {
const r = hfResults.find((ds) => ds.id === id);
let detail: string | null = null;
if (r?.totalExamples) {
detail = `${formatCompact(r.totalExamples)} rows`;
} else if (r?.sizeCategory) {
detail = r.sizeCategory;
} else if (r?.downloads != null) {
detail = `${formatCompact(r.downloads)}`;
}
return (
<ComboboxItem
key={id}
value={id}
className="justify-between"
>
<ComboboxItem key={id} value={id}>
<Tooltip>
<TooltipTrigger asChild={true}>
<span className="min-w-0 flex-1 truncate">
@ -252,11 +238,6 @@ export function DatasetSection() {
{id}
</TooltipContent>
</Tooltip>
{detail && (
<span className="text-[10px] text-muted-foreground shrink-0">
{detail}
</span>
)}
</ComboboxItem>
);
}}