mirror of
https://github.com/unslothai/unsloth.git
synced 2026-07-09 15:58:41 +00:00
Studio: group the project export menu by Combined and Per chat (#6637)
* Studio: group the project export menu by Combined and Per chat Replace the repeated (combined)/(per chat) suffix on every export row with a section subheading, so the rows read Raw JSONL / CSV / ShareGPT JSONL under Combined and Per chat headings. * Studio: group export sections with DropdownMenuGroup Wrap each Combined and Per chat section in DropdownMenuGroup for screen-reader semantics, and drop the redundant px-3 already set by DropdownMenuLabel.
This commit is contained in:
parent
346d96d7f2
commit
0e2f9ce0b6
1 changed files with 42 additions and 20 deletions
|
|
@ -12,7 +12,9 @@ import {
|
|||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuGroup,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
|
|
@ -300,33 +302,53 @@ export function ProjectsPage() {
|
|||
<DropdownMenuSub>
|
||||
<DropdownMenuSubTrigger>Export All Projects</DropdownMenuSubTrigger>
|
||||
<DropdownMenuSubContent className="w-52">
|
||||
{EXPORT_FORMATS_LIST.map(({ fmt, label }) => (
|
||||
<DropdownMenuItem key={`ap-m-${fmt}`} onSelect={() => void handleBulkProjectExport("projects", fmt, true)}>
|
||||
{label} (combined)
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuLabel className="pb-1 pt-2 text-[11px] font-medium">
|
||||
Combined
|
||||
</DropdownMenuLabel>
|
||||
{EXPORT_FORMATS_LIST.map(({ fmt, label }) => (
|
||||
<DropdownMenuItem key={`ap-m-${fmt}`} onSelect={() => void handleBulkProjectExport("projects", fmt, true)}>
|
||||
{label}
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuGroup>
|
||||
<DropdownMenuSeparator />
|
||||
{EXPORT_FORMATS_LIST.map(({ fmt, label }) => (
|
||||
<DropdownMenuItem key={`ap-s-${fmt}`} onSelect={() => void handleBulkProjectExport("projects", fmt, false)}>
|
||||
{label} (per chat)
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuLabel className="pb-1 pt-2 text-[11px] font-medium">
|
||||
Per chat
|
||||
</DropdownMenuLabel>
|
||||
{EXPORT_FORMATS_LIST.map(({ fmt, label }) => (
|
||||
<DropdownMenuItem key={`ap-s-${fmt}`} onSelect={() => void handleBulkProjectExport("projects", fmt, false)}>
|
||||
{label}
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuGroup>
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuSub>
|
||||
<DropdownMenuSub>
|
||||
<DropdownMenuSubTrigger>Export Projects + Recents</DropdownMenuSubTrigger>
|
||||
<DropdownMenuSubContent className="w-52">
|
||||
{EXPORT_FORMATS_LIST.map(({ fmt, label }) => (
|
||||
<DropdownMenuItem key={`all-m-${fmt}`} onSelect={() => void handleBulkProjectExport("all", fmt, true)}>
|
||||
{label} (combined)
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuLabel className="pb-1 pt-2 text-[11px] font-medium">
|
||||
Combined
|
||||
</DropdownMenuLabel>
|
||||
{EXPORT_FORMATS_LIST.map(({ fmt, label }) => (
|
||||
<DropdownMenuItem key={`all-m-${fmt}`} onSelect={() => void handleBulkProjectExport("all", fmt, true)}>
|
||||
{label}
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuGroup>
|
||||
<DropdownMenuSeparator />
|
||||
{EXPORT_FORMATS_LIST.map(({ fmt, label }) => (
|
||||
<DropdownMenuItem key={`all-s-${fmt}`} onSelect={() => void handleBulkProjectExport("all", fmt, false)}>
|
||||
{label} (per chat)
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuLabel className="pb-1 pt-2 text-[11px] font-medium">
|
||||
Per chat
|
||||
</DropdownMenuLabel>
|
||||
{EXPORT_FORMATS_LIST.map(({ fmt, label }) => (
|
||||
<DropdownMenuItem key={`all-s-${fmt}`} onSelect={() => void handleBulkProjectExport("all", fmt, false)}>
|
||||
{label}
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuGroup>
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuSub>
|
||||
</DropdownMenuContent>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue