From 6076f098fa96ea70286427b67533014f81d2ebd7 Mon Sep 17 00:00:00 2001 From: taDuc Date: Tue, 12 May 2026 04:34:06 +0700 Subject: [PATCH] refactor: reorganize project components into subdirectories and update import paths for better maintainability. --- src/app/editor/[id]/page.tsx | 16 ++++++++-------- src/app/page.tsx | 4 ++-- .../{ => editor}/BackgroundLayersPanel.tsx | 0 .../{ => editor}/EntityWikiBindingsPanel.tsx | 0 .../{ => editor}/GeometryBindingPanel.tsx | 0 .../{ => editor}/ProjectEntityRefsPanel.tsx | 0 .../{ => editor}/SelectedGeometryPanel.tsx | 0 src/uhm/components/{ => ui}/TimelineBar.tsx | 0 src/uhm/components/{ => ui}/UnifiedSearchBar.tsx | 0 .../components/{ => wiki}/PublicWikiSidebar.tsx | 0 .../components/{ => wiki}/WikiSidebarPanel.tsx | 0 11 files changed, 10 insertions(+), 10 deletions(-) rename src/uhm/components/{ => editor}/BackgroundLayersPanel.tsx (100%) rename src/uhm/components/{ => editor}/EntityWikiBindingsPanel.tsx (100%) rename src/uhm/components/{ => editor}/GeometryBindingPanel.tsx (100%) rename src/uhm/components/{ => editor}/ProjectEntityRefsPanel.tsx (100%) rename src/uhm/components/{ => editor}/SelectedGeometryPanel.tsx (100%) rename src/uhm/components/{ => ui}/TimelineBar.tsx (100%) rename src/uhm/components/{ => ui}/UnifiedSearchBar.tsx (100%) rename src/uhm/components/{ => wiki}/PublicWikiSidebar.tsx (100%) rename src/uhm/components/{ => wiki}/WikiSidebarPanel.tsx (100%) diff --git a/src/app/editor/[id]/page.tsx b/src/app/editor/[id]/page.tsx index 16b8a79..25eb9e8 100644 --- a/src/app/editor/[id]/page.tsx +++ b/src/app/editor/[id]/page.tsx @@ -4,13 +4,13 @@ import { useCallback, useEffect, useMemo, useRef, useState, type SetStateAction, import { useParams, useRouter, useSearchParams } from "next/navigation"; import Map from "@/uhm/components/Map"; import Editor from "@/uhm/components/Editor"; -import BackgroundLayersPanel from "@/uhm/components/BackgroundLayersPanel"; -import TimelineBar from "@/uhm/components/TimelineBar"; -import SelectedGeometryPanel from "@/uhm/components/SelectedGeometryPanel"; -import WikiSidebarPanel from "@/uhm/components/WikiSidebarPanel"; -import ProjectEntityRefsPanel from "@/uhm/components/ProjectEntityRefsPanel"; -import EntityWikiBindingsPanel from "@/uhm/components/EntityWikiBindingsPanel"; -import GeometryBindingPanel from "@/uhm/components/GeometryBindingPanel"; +import BackgroundLayersPanel from "@/uhm/components/editor/BackgroundLayersPanel"; +import TimelineBar from "@/uhm/components/ui/TimelineBar"; +import SelectedGeometryPanel from "@/uhm/components/editor/SelectedGeometryPanel"; +import WikiSidebarPanel from "@/uhm/components/wiki/WikiSidebarPanel"; +import ProjectEntityRefsPanel from "@/uhm/components/editor/ProjectEntityRefsPanel"; +import EntityWikiBindingsPanel from "@/uhm/components/editor/EntityWikiBindingsPanel"; +import GeometryBindingPanel from "@/uhm/components/editor/GeometryBindingPanel"; import { Entity, fetchEntities, searchEntitiesByName } from "@/uhm/api/entities"; import { ApiError } from "@/uhm/api/http"; import { fetchCurrentUser } from "@/uhm/api/auth"; @@ -64,7 +64,7 @@ import { useFeatureCommands } from "./featureCommands"; import { deleteSubmission } from "@/uhm/api/sections"; import type { WikiSnapshot } from "@/uhm/types/wiki"; import type { EntityWikiLinkSnapshot } from "@/uhm/types/sections"; -import UnifiedSearchBar, { type UnifiedSearchKind } from "@/uhm/components/UnifiedSearchBar"; +import UnifiedSearchBar, { type UnifiedSearchKind } from "@/uhm/components/ui/UnifiedSearchBar"; const CURRENT_YEAR = new Date().getUTCFullYear(); const DEFAULT_EDITOR_USER_ID = "local-editor"; diff --git a/src/app/page.tsx b/src/app/page.tsx index bbbb49a..4964cdd 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -3,8 +3,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import Map, { type MapHoverPayload } from "@/uhm/components/Map"; -import PublicWikiSidebar from "@/uhm/components/PublicWikiSidebar"; -import TimelineBar from "@/uhm/components/TimelineBar"; +import PublicWikiSidebar from "@/uhm/components/wiki/PublicWikiSidebar"; +import TimelineBar from "@/uhm/components/ui/TimelineBar"; import { fetchEntities, type Entity } from "@/uhm/api/entities"; import { fetchGeometriesByBBox } from "@/uhm/api/geometries"; import { ApiError } from "@/uhm/api/http"; diff --git a/src/uhm/components/BackgroundLayersPanel.tsx b/src/uhm/components/editor/BackgroundLayersPanel.tsx similarity index 100% rename from src/uhm/components/BackgroundLayersPanel.tsx rename to src/uhm/components/editor/BackgroundLayersPanel.tsx diff --git a/src/uhm/components/EntityWikiBindingsPanel.tsx b/src/uhm/components/editor/EntityWikiBindingsPanel.tsx similarity index 100% rename from src/uhm/components/EntityWikiBindingsPanel.tsx rename to src/uhm/components/editor/EntityWikiBindingsPanel.tsx diff --git a/src/uhm/components/GeometryBindingPanel.tsx b/src/uhm/components/editor/GeometryBindingPanel.tsx similarity index 100% rename from src/uhm/components/GeometryBindingPanel.tsx rename to src/uhm/components/editor/GeometryBindingPanel.tsx diff --git a/src/uhm/components/ProjectEntityRefsPanel.tsx b/src/uhm/components/editor/ProjectEntityRefsPanel.tsx similarity index 100% rename from src/uhm/components/ProjectEntityRefsPanel.tsx rename to src/uhm/components/editor/ProjectEntityRefsPanel.tsx diff --git a/src/uhm/components/SelectedGeometryPanel.tsx b/src/uhm/components/editor/SelectedGeometryPanel.tsx similarity index 100% rename from src/uhm/components/SelectedGeometryPanel.tsx rename to src/uhm/components/editor/SelectedGeometryPanel.tsx diff --git a/src/uhm/components/TimelineBar.tsx b/src/uhm/components/ui/TimelineBar.tsx similarity index 100% rename from src/uhm/components/TimelineBar.tsx rename to src/uhm/components/ui/TimelineBar.tsx diff --git a/src/uhm/components/UnifiedSearchBar.tsx b/src/uhm/components/ui/UnifiedSearchBar.tsx similarity index 100% rename from src/uhm/components/UnifiedSearchBar.tsx rename to src/uhm/components/ui/UnifiedSearchBar.tsx diff --git a/src/uhm/components/PublicWikiSidebar.tsx b/src/uhm/components/wiki/PublicWikiSidebar.tsx similarity index 100% rename from src/uhm/components/PublicWikiSidebar.tsx rename to src/uhm/components/wiki/PublicWikiSidebar.tsx diff --git a/src/uhm/components/WikiSidebarPanel.tsx b/src/uhm/components/wiki/WikiSidebarPanel.tsx similarity index 100% rename from src/uhm/components/WikiSidebarPanel.tsx rename to src/uhm/components/wiki/WikiSidebarPanel.tsx