Skip to content

Commit e133dcc

Browse files
authored
feat: add collapsible attribution overlay to all task pages
1 parent d7eb484 commit e133dcc

File tree

17 files changed

+122
-15
lines changed

17 files changed

+122
-15
lines changed

examples/live-examples-nextjs/src/app/tasks/building-detection/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
DetectionControls,
1010
BackgroundEffects,
1111
ExportButton,
12-
TaskDownloadProgress
12+
TaskDownloadProgress,
13+
CollapsibleAttribution
1314
} from "../../../components";
1415
import { MapUtils } from "../../../utils/mapUtils";
1516
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
@@ -293,6 +294,8 @@ export default function BuildingDetection() {
293294
{/* Corner decorations */}
294295
<div className="absolute top-4 right-4 w-20 h-20 border-t-2 border-r-2 border-green-400/40 rounded-tr-lg"></div>
295296
<div className="absolute bottom-4 left-4 w-20 h-20 border-b-2 border-l-2 border-emerald-400/40 rounded-bl-lg"></div>
297+
298+
<CollapsibleAttribution position="bottom-left" />
296299
</div>
297300
</main>
298301
);

examples/live-examples-nextjs/src/app/tasks/building-footprint-segmentation/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
DetectionControls,
1010
BackgroundEffects,
1111
ExportButton,
12-
TaskDownloadProgress
12+
TaskDownloadProgress,
13+
CollapsibleAttribution
1314
} from "../../../components";
1415
import { MapUtils } from "../../../utils/mapUtils";
1516
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
@@ -296,6 +297,8 @@ export default function BuildingFootPrintSegmentation() {
296297
{/* Corner decorations */}
297298
<div className="absolute top-4 right-4 w-20 h-20 border-t-2 border-r-2 border-green-400/40 rounded-tr-lg"></div>
298299
<div className="absolute bottom-4 left-4 w-20 h-20 border-b-2 border-l-2 border-emerald-400/40 rounded-bl-lg"></div>
300+
301+
<CollapsibleAttribution position="bottom-left" />
299302
</div>
300303
</main>
301304
);

examples/live-examples-nextjs/src/app/tasks/car-detection/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
DetectionControls,
99
BackgroundEffects,
1010
ExportButton,
11-
TaskDownloadProgress
11+
TaskDownloadProgress,
12+
CollapsibleAttribution
1213
} from "../../../components";
1314
import { MapUtils } from "../../../utils/mapUtils";
1415
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
@@ -300,6 +301,8 @@ export default function CarDetection() {
300301
{/* Corner decorations */}
301302
<div className="absolute top-4 right-4 w-20 h-20 border-t-2 border-r-2 border-green-400/40 rounded-tr-lg"></div>
302303
<div className="absolute bottom-4 left-4 w-20 h-20 border-b-2 border-l-2 border-emerald-400/40 rounded-bl-lg"></div>
304+
305+
<CollapsibleAttribution position="bottom-left" />
303306
</div>
304307
</main>
305308
);

examples/live-examples-nextjs/src/app/tasks/embedding-similarity-search/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useGeoAIWorker } from "../../../hooks/useGeoAIWorker";
99
import { ESRI_CONFIG, GEOBASE_CONFIG, MAPBOX_CONFIG } from "../../../config";
1010
import { MapProvider } from "../../../types"
1111
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
12+
import { CollapsibleAttribution } from "../../../components";
1213

1314

1415
GEOBASE_CONFIG.cogImagery = "https://huggingface.co/datasets/geobase/geoai-cogs/resolve/main/mask-generation.tif"
@@ -1908,6 +1909,8 @@ export default function EmbeddingSimilaritySearch() {
19081909
{/* Map Container */}
19091910
<div className="flex-1 relative">
19101911
<div ref={mapContainer} className="w-full h-full" />
1912+
1913+
<CollapsibleAttribution position="bottom-left" />
19111914
</div>
19121915
</div>
19131916
);

examples/live-examples-nextjs/src/app/tasks/image-feature-extraction/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import {
1919
LoadingMessage,
2020
CornerDecorations,
2121
MapProviderSelectorWrapper,
22-
InitialButtons
22+
InitialButtons,
23+
CollapsibleAttribution
2324
} from "../../../components";
2425
import { MapUtils } from "../../../utils/mapUtils";
2526
import { createImageFeatureExtractionMapStyle } from "../../../utils/mapStyleUtils";
@@ -720,7 +721,10 @@ export default function ImageFeatureExtraction() {
720721
/>
721722
</div>
722723
)}
723-
724+
725+
{/* Collapsible Imagery attribution */}
726+
<CollapsibleAttribution position="bottom-center" />
727+
724728
{/* Corner decorations */}
725729
<CornerDecorations />
726730
</div>

examples/live-examples-nextjs/src/app/tasks/land-cover-classification/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
DetectionControls,
1010
BackgroundEffects,
1111
ExportButton,
12-
TaskDownloadProgress
12+
TaskDownloadProgress,
13+
CollapsibleAttribution
1314
} from "../../../components";
1415
import { MapUtils } from "../../../utils/mapUtils";
1516
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
@@ -484,6 +485,8 @@ export default function LandCoverClassification() {
484485
{/* Corner decorations */}
485486
<div className="absolute top-4 right-4 w-20 h-20 border-t-2 border-r-2 border-green-400/40 rounded-tr-lg"></div>
486487
<div className="absolute bottom-4 left-4 w-20 h-20 border-b-2 border-l-2 border-emerald-400/40 rounded-bl-lg"></div>
488+
489+
<CollapsibleAttribution position="bottom-left" />
487490
</div>
488491
</main>
489492
);

examples/live-examples-nextjs/src/app/tasks/mask-generation/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { StyleSpecification } from "maplibre-gl";
77
import { useGeoAIWorker } from "../../../hooks/useGeoAIWorker";
88
import { ESRI_CONFIG, GEOBASE_CONFIG, MAPBOX_CONFIG } from "../../../config";
99
import { MapProvider } from "../../../types"
10-
import { BackgroundEffects, ExportButton, GlassmorphismCard, GradientButton, MapProviderSelector, StatusMessage, ZoomSlider, TaskDownloadProgress } from "@/components";
10+
import { BackgroundEffects, ExportButton, GlassmorphismCard, GradientButton, MapProviderSelector, StatusMessage, ZoomSlider, TaskDownloadProgress, CollapsibleAttribution } from "@/components";
1111
import { ClearPoint, PlayIcon, PlusIcon, ResetIcon } from "@/components/DetectionControls";
1212
import { MapUtils } from "../../../utils/mapUtils";
1313
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
@@ -575,6 +575,7 @@ export default function MaskGeneration() {
575575
{/* Corner decorations */}
576576
<div className="absolute top-4 right-4 w-20 h-20 border-t-2 border-r-2 border-green-400/40 rounded-tr-lg"></div>
577577
<div className="absolute bottom-4 left-4 w-20 h-20 border-b-2 border-l-2 border-emerald-400/40 rounded-bl-lg"></div>
578+
<CollapsibleAttribution position="bottom-left" />
578579
</div>
579580
</main>
580581
);

examples/live-examples-nextjs/src/app/tasks/object-detection/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
DetectionControls,
1010
BackgroundEffects,
1111
ExportButton,
12-
TaskDownloadProgress
12+
TaskDownloadProgress,
13+
CollapsibleAttribution
1314
} from "../../../components";
1415
import { MapUtils } from "../../../utils/mapUtils";
1516
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
@@ -306,6 +307,7 @@ export default function ObjectDetection() {
306307
{/* Corner decorations */}
307308
<div className="absolute top-4 right-4 w-20 h-20 border-t-2 border-r-2 border-green-400/40 rounded-tr-lg"></div>
308309
<div className="absolute bottom-4 left-4 w-20 h-20 border-b-2 border-l-2 border-emerald-400/40 rounded-bl-lg"></div>
310+
<CollapsibleAttribution position="bottom-left" />
309311
</div>
310312
</main>
311313
);

examples/live-examples-nextjs/src/app/tasks/oil-storage-tank-detection/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
DetectionControls,
1010
BackgroundEffects,
1111
ExportButton,
12-
TaskDownloadProgress
12+
TaskDownloadProgress,
13+
CollapsibleAttribution
1314
} from "../../../components";
1415
import { MapUtils } from "../../../utils/mapUtils";
1516
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
@@ -304,6 +305,8 @@ export default function OilStorageTankDetection() {
304305
{/* Corner decorations */}
305306
<div className="absolute top-4 right-4 w-20 h-20 border-t-2 border-r-2 border-green-400/40 rounded-tr-lg"></div>
306307
<div className="absolute bottom-4 left-4 w-20 h-20 border-b-2 border-l-2 border-emerald-400/40 rounded-bl-lg"></div>
308+
309+
<CollapsibleAttribution position="bottom-left" />
307310
</div>
308311
</main>
309312
);

examples/live-examples-nextjs/src/app/tasks/oriented-object-detection/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
DetectionControls,
1010
BackgroundEffects,
1111
ExportButton,
12-
TaskDownloadProgress
12+
TaskDownloadProgress,
13+
CollapsibleAttribution
1314
} from "../../../components";
1415
import { MapUtils } from "../../../utils/mapUtils";
1516
import { createBaseMapStyle } from "../../../utils/mapStyleUtils";
@@ -296,6 +297,8 @@ export default function OrientedObjectDetection() {
296297
{/* Corner decorations */}
297298
<div className="absolute top-4 right-4 w-20 h-20 border-t-2 border-r-2 border-green-400/40 rounded-tr-lg"></div>
298299
<div className="absolute bottom-4 left-4 w-20 h-20 border-b-2 border-l-2 border-emerald-400/40 rounded-bl-lg"></div>
300+
301+
<CollapsibleAttribution position="bottom-left" />
299302
</div>
300303
</main>
301304
);

0 commit comments

Comments
 (0)