diff --git a/docs/development.md b/docs/development.md index b0c68d3..519385b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -191,6 +191,31 @@ flag must echo the deployment's own `KEY_PREFIX`, or the script refuses), and backup file the apply run wrote. `--dry-run` is a guard, not a mode switch -- combining it with `--apply` throws instead of guessing which one you meant. +## Styling Conventions + +One design system for every page, including debug pages. It is Tailwind 4 + +shadcn tokens, defined in `src/app/globals.css` (`:root` and `.dark` blocks); +the theme toggle works only on pages that stay inside it. + +- **Page background**: `min-h-dvh vn-gradient-bg` on the page root. +- **Surfaces**: shadcn `Card` with `bg-card border-border shadow-sm`; nested + panels `bg-muted/50`. Never `bg-white/10` glassmorphism or raw hex. +- **Text**: `text-foreground` for headings, `text-muted-foreground` for + secondary, `text-card-foreground` inside cards. Never `text-white` on a + themed surface. +- **Accent**: the `brand` token family (`text-brand`, `bg-brand-subtle`, + `text-brand-subtle-foreground`) -- see `RegionPicker.js` for the idiom. +- **Borders/dividers**: `border-border`. +- **Components**: use the vendored `src/components/ui/` primitives; add + missing ones with the shadcn CLI rather than hand-rolling. + +Raw palette colors are allowed only where the color itself is the meaning and +must not follow the theme: score bands and podium colors +(`RoundResultDialog.js`, `LeaderboardList.js`, always with a `dark:` variant), +success/error badges (`bg-green-600`), and the `bg-neutral-900` surround +behind panoramas and full-bleed maps, which stays dark in both themes on +purpose. + ## shadcn/ui Configuration - **Style**: "new-york" diff --git a/src/app/debug/page.js b/src/app/debug/page.js index 4517889..67285df 100644 --- a/src/app/debug/page.js +++ b/src/app/debug/page.js @@ -13,7 +13,7 @@ import dynamic from 'next/dynamic'; // Dynamic import for client-side only components const LeafletMap = dynamic(() => import('../components/LeafletMap'), { ssr: false, - loading: () =>
+ loading: () =>
}); export default function DebugPage() { @@ -155,17 +155,16 @@ export default function DebugPage() { }, [parsedBbox]); return ( -
-
-
+
+
{/* Header */}
-

Debug Tool

-

Bbox Visualization & Mapillary Testing

+

Debug Tool

+

Bbox Visualization & Mapillary Testing

Panorama coverage map → @@ -177,13 +176,13 @@ export default function DebugPage() {
{/* Controls Panel */} - + - Bbox Input + Bbox Input
-
@@ -219,10 +218,10 @@ export default function DebugPage() {
{parsedBbox && ( - + -

Parsed Bbox:

-
+

Parsed Bbox:

+
Min: {parsedBbox.minLng.toFixed(6)}, {parsedBbox.minLat.toFixed(6)}
Max: {parsedBbox.maxLng.toFixed(6)}, {parsedBbox.maxLat.toFixed(6)}
Size: {((parsedBbox.maxLng - parsedBbox.minLng) * 111).toFixed(2)}km × {((parsedBbox.maxLat - parsedBbox.minLat) * 111).toFixed(2)}km
@@ -232,19 +231,20 @@ export default function DebugPage() { )} {mapillaryResults && ( - + -

Mapillary Results:

+

Mapillary Results:

{mapillaryResults.success ? (
- + {/* Same success green the round result uses; not a theme token. */} + Found {mapillaryResults.data.length} images -
+
Panoramic images: {mapillaryResults.data.filter(img => img.is_pano).length}
Regular images: {mapillaryResults.data.filter(img => !img.is_pano).length}
{mapillaryResults.analysis && ( -
+
Area: {mapillaryResults.analysis.bboxArea.widthKm}km × {mapillaryResults.analysis.bboxArea.heightKm}km
Density: {(mapillaryResults.data.length / (parseFloat(mapillaryResults.analysis.bboxArea.widthKm) * parseFloat(mapillaryResults.analysis.bboxArea.heightKm))).toFixed(1)} images/km²
@@ -265,12 +265,12 @@ export default function DebugPage() { {/* Map Panel */} - + - Map Visualization + Map Visualization -
+
-

+

Red rectangle shows the bbox area. Center marker shows the bbox center point.

@@ -286,9 +286,9 @@ export default function DebugPage() {
{/* Sample Bboxes */} - + - Sample Bboxes + Sample Bboxes
@@ -313,7 +313,6 @@ export default function DebugPage() {
-
);