fix: export buttons direct (no dropdown), compact mobile cards
Export fix: - Replaced DropdownMenu with direct DXF/GPKG buttons in SelectionToolbar. Radix dropdown portals don't work inside fixed z-[110] containers. Direct buttons work reliably on all platforms. Mobile RGI cards: - Single-row compact layout: icon + nr cerere + solicitant + termen + status - Smaller icons (3.5), tighter spacing, shorter status labels - No Card wrapper — lightweight border div for less visual weight Mobile filters: - Tighter spacing, smaller labels Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,12 +3,7 @@
|
||||
import { useState } from "react";
|
||||
import { Download, Trash2, MousePointerClick, Square, PenTool, Loader2, Sparkles } from "lucide-react";
|
||||
import { Button } from "@/shared/components/ui/button";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/shared/components/ui/dropdown-menu";
|
||||
// Direct buttons instead of dropdown — works reliably on mobile + fixed containers
|
||||
import { Badge } from "@/shared/components/ui/badge";
|
||||
import { cn } from "@/shared/lib/utils";
|
||||
import type { SelectedFeature, ExportFormat } from "../types";
|
||||
@@ -125,21 +120,20 @@ export function SelectionToolbar({
|
||||
{selectedFeatures.length} parcele
|
||||
</Badge>
|
||||
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="sm" className="h-7 px-2 text-xs gap-1" disabled={exporting}>
|
||||
{exporting ? <Loader2 className="h-3.5 w-3.5 animate-spin" /> : <Download className="h-3.5 w-3.5" />}
|
||||
Export
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start">
|
||||
{EXPORT_FORMATS.map((fmt) => (
|
||||
<DropdownMenuItem key={fmt.id} onClick={() => handleExport(fmt.id)} className="text-xs">
|
||||
{fmt.label}
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
{EXPORT_FORMATS.map((fmt) => (
|
||||
<Button
|
||||
key={fmt.id}
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 px-2 text-xs gap-1"
|
||||
disabled={exporting}
|
||||
onClick={() => void handleExport(fmt.id)}
|
||||
title={fmt.label}
|
||||
>
|
||||
{exporting ? <Loader2 className="h-3.5 w-3.5 animate-spin" /> : <Download className="h-3.5 w-3.5" />}
|
||||
<span className="hidden sm:inline">{fmt.id.toUpperCase()}</span>
|
||||
</Button>
|
||||
))}
|
||||
|
||||
{!hideEnrichment && <Button
|
||||
variant="ghost" size="sm" className="h-7 px-2 text-xs gap-1"
|
||||
|
||||
Reference in New Issue
Block a user