From d6a95e14975ae5a95a7feb604eefdb55c70595aa Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 14 Jan 2026 08:06:57 +0000
Subject: [PATCH 1/6] Initial plan
From 77381dcba60bde90a10542017cb172162f5b61b6 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 14 Jan 2026 08:12:30 +0000
Subject: [PATCH 2/6] Refactor inspector to tabbed layout with 250px width and
removed icon
Co-authored-by: ev-sc <4164774+ev-sc@users.noreply.github.com>
---
.../components/inspector/InspectorPanel.tsx | 121 +++++++++++-------
1 file changed, 74 insertions(+), 47 deletions(-)
diff --git a/src/app/map/[id]/components/inspector/InspectorPanel.tsx b/src/app/map/[id]/components/inspector/InspectorPanel.tsx
index b49cfb70f..849d7e0f8 100644
--- a/src/app/map/[id]/components/inspector/InspectorPanel.tsx
+++ b/src/app/map/[id]/components/inspector/InspectorPanel.tsx
@@ -6,10 +6,10 @@ import { useTable } from "@/app/map/[id]/hooks/useTable";
import DataSourceIcon from "@/components/DataSourceIcon";
import { useTRPC } from "@/services/trpc/react";
import { Button } from "@/shadcn/ui/button";
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/shadcn/ui/tabs";
import { cn } from "@/shadcn/utils";
import { LayerType } from "@/types";
import { useMapRef } from "../../hooks/useMapCore";
-import LayerTypeIcon from "../LayerTypeIcon";
import BoundaryMarkersList from "./BoundaryMarkersList";
import PropertiesList from "./PropertiesList";
import TurfMarkersList from "./TurfMarkersList";
@@ -65,15 +65,14 @@ export default function InspectorPanel() {
-
-
{inspectorContent?.name as string}
)}
-
+
-
- Stats
- Markers
- Notes 0
-
+
+ Data
+
+ Markers {markerCount > 0 ? markerCount : ""}
+
+ Notes 0
+
+
+
+
-
+
{dataSource && (
@@ -123,7 +148,9 @@ export default function InspectorPanel() {
-
+
{dataSource.name}
@@ -159,21 +186,36 @@ export default function InspectorPanel() {
)}
-
+
-
+
{type === LayerType.Turf && }
{type === LayerType.Boundary && }
-
+
-
+
-
-
+
+
+
+
+
Configuration options
+
+
+
);
diff --git a/src/app/map/[id]/components/inspector/UnderlineTabs.tsx b/src/app/map/[id]/components/inspector/UnderlineTabs.tsx
new file mode 100644
index 000000000..9b72f30d4
--- /dev/null
+++ b/src/app/map/[id]/components/inspector/UnderlineTabs.tsx
@@ -0,0 +1,71 @@
+"use client";
+
+import * as TabsPrimitive from "@radix-ui/react-tabs";
+import * as React from "react";
+
+import { cn } from "@/shadcn/utils";
+
+function UnderlineTabs({
+ className,
+ ...props
+}: React.ComponentProps
) {
+ return (
+
+ );
+}
+
+function UnderlineTabsList({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ );
+}
+
+function UnderlineTabsTrigger({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ );
+}
+
+function UnderlineTabsContent({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ );
+}
+
+export {
+ UnderlineTabs,
+ UnderlineTabsList,
+ UnderlineTabsTrigger,
+ UnderlineTabsContent,
+};
From 7b9cf42be9bf13e5d44757d44893bbdeabf261cf Mon Sep 17 00:00:00 2001
From: ev <4164774+ev-sc@users.noreply.github.com>
Date: Wed, 14 Jan 2026 09:51:51 +0100
Subject: [PATCH 5/6] refactor: update InspectorPanel and UnderlineTabs for
improved layout and styling
---
.../components/inspector/InspectorPanel.tsx | 39 ++++++++-----------
.../components/inspector/UnderlineTabs.tsx | 10 ++---
2 files changed, 22 insertions(+), 27 deletions(-)
diff --git a/src/app/map/[id]/components/inspector/InspectorPanel.tsx b/src/app/map/[id]/components/inspector/InspectorPanel.tsx
index c26563e4d..05bc4a9ef 100644
--- a/src/app/map/[id]/components/inspector/InspectorPanel.tsx
+++ b/src/app/map/[id]/components/inspector/InspectorPanel.tsx
@@ -82,10 +82,10 @@ export default function InspectorPanel() {
"absolute top-0 bottom-0 right-4 / flex flex-col gap-6 py-5 h-fit max-h-full",
tableOpen ? "bottom-0" : "bottom-24", // to avoid clash with bug report button
)}
- style={{ width: "250px" }}
+ style={{ minWidth: "250px" }}
>
-
+
{inspectorContent?.name as string}
@@ -123,23 +123,18 @@ export default function InspectorPanel() {
defaultValue="data"
className="flex flex-col overflow-hidden"
>
-
-
- Data
-
- Markers {markerCount > 0 ? markerCount : ""}
-
- Notes 0
-
-
-
-
-
-
-
+
+ Data
+
+ Markers {markerCount > 0 ? markerCount : ""}
+
+ Notes 0
+
+
+
+
+
+
{dataSource && (
@@ -190,7 +185,7 @@ export default function InspectorPanel() {
{type === LayerType.Turf &&
}
@@ -200,7 +195,7 @@ export default function InspectorPanel() {
No notes yet
@@ -209,7 +204,7 @@ export default function InspectorPanel() {
Configuration options
diff --git a/src/app/map/[id]/components/inspector/UnderlineTabs.tsx b/src/app/map/[id]/components/inspector/UnderlineTabs.tsx
index 9b72f30d4..1343bd515 100644
--- a/src/app/map/[id]/components/inspector/UnderlineTabs.tsx
+++ b/src/app/map/[id]/components/inspector/UnderlineTabs.tsx
@@ -36,13 +36,13 @@ function UnderlineTabsTrigger({
return (
Date: Wed, 14 Jan 2026 09:57:49 +0100
Subject: [PATCH 6/6] refactor: enhance UnderlineTabsList with dynamic
underline positioning and styling
---
.../components/inspector/UnderlineTabs.tsx | 74 +++++++++++++++++--
1 file changed, 68 insertions(+), 6 deletions(-)
diff --git a/src/app/map/[id]/components/inspector/UnderlineTabs.tsx b/src/app/map/[id]/components/inspector/UnderlineTabs.tsx
index 1343bd515..f46892390 100644
--- a/src/app/map/[id]/components/inspector/UnderlineTabs.tsx
+++ b/src/app/map/[id]/components/inspector/UnderlineTabs.tsx
@@ -18,14 +18,75 @@ function UnderlineTabsList({
className,
...props
}: React.ComponentProps) {
+ const [underlineStyle, setUnderlineStyle] = React.useState({
+ left: 0,
+ width: 0,
+ });
+ const listRef = React.useRef(null);
+
+ const updateUnderline = React.useCallback(() => {
+ if (!listRef.current) return;
+
+ const activeButton = listRef.current.querySelector(
+ '[data-state="active"]',
+ ) as HTMLButtonElement;
+ if (!activeButton) return;
+
+ const listRect = listRef.current.getBoundingClientRect();
+ const buttonRect = activeButton.getBoundingClientRect();
+
+ setUnderlineStyle({
+ left: buttonRect.left - listRect.left,
+ width: buttonRect.width,
+ });
+ }, []);
+
+ React.useEffect(() => {
+ updateUnderline();
+
+ // Use MutationObserver to watch for data-state changes
+ const mutationObserver = new MutationObserver(updateUnderline);
+ if (listRef.current) {
+ mutationObserver.observe(listRef.current, {
+ attributes: true,
+ attributeFilter: ["data-state"],
+ subtree: true,
+ });
+ }
+
+ // Also use ResizeObserver for size changes
+ const resizeObserver = new ResizeObserver(updateUnderline);
+ if (listRef.current) {
+ resizeObserver.observe(listRef.current);
+ }
+
+ window.addEventListener("resize", updateUnderline);
+
+ return () => {
+ mutationObserver.disconnect();
+ resizeObserver.disconnect();
+ window.removeEventListener("resize", updateUnderline);
+ };
+ }, [updateUnderline]);
+
return (
+ >
+ {props.children}
+
+
);
}
@@ -36,13 +97,11 @@ function UnderlineTabsTrigger({
return (
) {
return (
);