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:
Michael Han 2026-06-24 05:08:15 -07:00 committed by GitHub
parent 346d96d7f2
commit 0e2f9ce0b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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>