From 776a2930f5db546f6100e87b15555b7cb699a442 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Thu, 22 Oct 2026 09:07:40 +0900 Subject: [PATCH] =?UTF-8?q?261022=5F01=5FENH:=20=ED=83=9C=EB=B8=94?= =?UTF-8?q?=EB=A6=BF=EC=97=90=20=EB=8C=80=ED=95=9C=20UI=20=EB=B6=84?= =?UTF-8?q?=EA=B8=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .agent/references/repository-rules.md | 2 +- public/images/kart/icon_none_bookmark.svg | 5 --- public/images/kart/icon_notice.svg | 4 +++ public/images/kart/icon_pc.svg | 5 --- src/components/app-shell/AppHeader.tsx | 8 +++-- src/components/derived/DerivedWorkspace.tsx | 4 +-- src/components/exim/EximWorkspace.tsx | 4 +-- src/components/report/CrosstabPhone.tsx | 39 +++++++++++---------- src/components/report/ReportChrome.tsx | 32 +++++++++++------ src/components/report/ReportFrame.tsx | 6 ++-- src/hooks/usePhoneView.ts | 7 ++-- 11 files changed, 64 insertions(+), 52 deletions(-) delete mode 100644 public/images/kart/icon_none_bookmark.svg create mode 100644 public/images/kart/icon_notice.svg delete mode 100644 public/images/kart/icon_pc.svg diff --git a/.agent/references/repository-rules.md b/.agent/references/repository-rules.md index ce33fea..4fd16ba 100644 --- a/.agent/references/repository-rules.md +++ b/.agent/references/repository-rules.md @@ -27,7 +27,7 @@ ## KART UI and data compatibility - Preserve existing KART UI, colors and workflows; simple CSS is acceptable when the rendered result matches. Do not add controls or features absent from the original without approval. Legacy source is `../KART_FRONT/Report_React`; current backend contracts come from `../kart-server` controller, DTO and service sources, not historical migration notes or mocks. -- Reuse project components before adding primitives. Do not overwrite locally edited registry copies or upgrade KriUiRegistry without approval. Use self-hosted Noto Sans/Noto Sans KR (`src/app/fonts.css`, `public/fonts`) and existing `globals.css` tokens; charts and word clouds wait for `useChartFont` readiness. Phone mode uses `(pointer: coarse) and (max-width: 767px)`. +- Reuse project components before adding primitives. Do not overwrite locally edited registry copies or upgrade KriUiRegistry without approval. Use self-hosted Noto Sans/Noto Sans KR (`src/app/fonts.css`, `public/fonts`) and existing `globals.css` tokens; charts and word clouds wait for `useChartFont` readiness. Mobile mode uses `(hover: none) and (pointer: coarse), (max-width: 767px)` (touch device at any width, or any window ≤767px): Cross Tab shows bookmarks only, Tabulation/Derived/Exim show PcOnlyNotice, Quota/Current stay normal. Do not port legacy width-only hiding (media.css ≤1300/≤1050); mouse/trackpad windows wider than 767px keep full editing. - Preserve empty/loading/error/retry states. Global loading uses `LoadingOverlayAdapter`; long statistics streams and Quota queries use inline loading with `meta.ignoreGlobalLoading`. Keep dnd-kit `DragOverlay` dropAnimation=null. - Display server count/percent/statistic strings without browser reaggregation or rounding. The legacy default shows percent in ordinary cells and N on the base line (TOTAL row, or TOTAL column when transposed). Preserve the empty top-left result cell and server merge metadata; do not fill it with the result title. - Excel must preserve the existing workbook layout, cell types, merges, sheet ordering, links and images. Send `percentExact`/`statisticExact` for numeric cells, count strings for N, and the hidden TABULATION_0 table first. Use existing `report-excel.ts`, `download-name.ts` and download BFF helpers. Error responses must not become downloaded files. Use FormData/postForm without manually setting multipart boundaries. diff --git a/public/images/kart/icon_none_bookmark.svg b/public/images/kart/icon_none_bookmark.svg deleted file mode 100644 index 120aeca..0000000 --- a/public/images/kart/icon_none_bookmark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/public/images/kart/icon_notice.svg b/public/images/kart/icon_notice.svg new file mode 100644 index 0000000..7b2992d --- /dev/null +++ b/public/images/kart/icon_notice.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/kart/icon_pc.svg b/public/images/kart/icon_pc.svg deleted file mode 100644 index 3d93ca9..0000000 --- a/public/images/kart/icon_pc.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/components/app-shell/AppHeader.tsx b/src/components/app-shell/AppHeader.tsx index 50e8872..a23b1da 100644 --- a/src/components/app-shell/AppHeader.tsx +++ b/src/components/app-shell/AppHeader.tsx @@ -145,8 +145,12 @@ export function AppHeader({ user }: AppHeaderProps) {
{external ?
: }
-
-

+
+ {/* One line; a long title ends with "..." and shows in full on hover. */} +

{projectTitle}

diff --git a/src/components/derived/DerivedWorkspace.tsx b/src/components/derived/DerivedWorkspace.tsx index 0893017..99b4502 100644 --- a/src/components/derived/DerivedWorkspace.tsx +++ b/src/components/derived/DerivedWorkspace.tsx @@ -198,10 +198,10 @@ function Workspace({ project }: { project: ProjectRef }) { aria-label="Create Variable" className="-mx-[1.0416vw] -mt-2.5 -mb-6 min-h-[calc(100vh-146px)] bg-white" > -
+
-
+
-
+
-
+
diff --git a/src/components/report/CrosstabPhone.tsx b/src/components/report/CrosstabPhone.tsx index c0816df..dd71b1d 100644 --- a/src/components/report/CrosstabPhone.tsx +++ b/src/components/report/CrosstabPhone.tsx @@ -13,6 +13,7 @@ import { bookmarkAxis, bookmarkTest, readBookmarkSetting } from "@/lib/bookmark- import { cn } from "@/lib/utils"; import { bookmarkIndexes, crosstabBatch } from "./crosstab-conditions"; import { ResultBlock } from "./LegacyResultTable"; +import { MobileNotice } from "./ReportChrome"; import { plainText } from "./ReportResultView"; /** @@ -31,6 +32,19 @@ export function CrosstabPhone({ const bookmarks = list.data ?? []; const current = bookmarks.find((bookmark) => bookmark.bookmarkId === selectedId) ?? bookmarks[0]; + // Without the empty tab strip, so it sits at the same height as the PC-only notice. + if (!current) { + return ( + +

+ 이 메뉴는 셋팅된 북마크만 +
+ 확인 가능합니다. +

+

설정된 북마크가 없습니다.

+
+ ); + } return (
    @@ -56,25 +70,12 @@ export function CrosstabPhone({ ); })}
- {current ? ( - - ) : ( -
- 저장된 북마크가 없습니다. -
- )} +
); } diff --git a/src/components/report/ReportChrome.tsx b/src/components/report/ReportChrome.tsx index 748a3a0..ab63daf 100644 --- a/src/components/report/ReportChrome.tsx +++ b/src/components/report/ReportChrome.tsx @@ -1,7 +1,7 @@ "use client"; import Image from "next/image"; -import { useEffect, useState } from "react"; +import { useEffect, useState, type ReactNode } from "react"; import { Carousel, CarouselContent, CarouselItem, type CarouselApi } from "@/components/ui/carousel"; import { cn } from "@/lib/utils"; import type { Bookmark } from "@/types/bookmark"; @@ -151,17 +151,27 @@ export function LeftToggleBox({ onExpand }: { onExpand: () => void }) { ); } -/** Legacy mobile Tabulation: the PC-only illustration. */ -export function PcOnlyNotice() { +/** Mobile-mode notice: the monitor icon with guide text, at one shared size and position. */ +export function MobileNotice({ children }: { children: ReactNode }) { return ( -
- PC 화면에서 사용할 수 있습니다. +
+ +
{children}
); } + +/** Legacy mobile Tabulation / Derived / Exim: PC-only notice. */ +export function PcOnlyNotice() { + return ( + +

+ 이 메뉴는 PC에서 접속하셔야만 +
+ 사용하실 수 있습니다. +
+ 번거로우시겠지만, PC를 이용해 주세요. +

+
+ ); +} diff --git a/src/components/report/ReportFrame.tsx b/src/components/report/ReportFrame.tsx index da30dcc..767ea2c 100644 --- a/src/components/report/ReportFrame.tsx +++ b/src/components/report/ReportFrame.tsx @@ -69,8 +69,8 @@ export function ReportFrame({ aria-label={label} className="-mx-[1.0416vw] -mt-2.5 -mb-6 min-h-[calc(100vh-146px)] bg-white" > - {/* Legacy shows reduced content on phones (small touch screens). */} -
+ {/* Reduced content on touch devices (phones and tablets) or windows 767px or narrower. */} +
{tabs}
-
+
{phone}
diff --git a/src/hooks/usePhoneView.ts b/src/hooks/usePhoneView.ts index c882ff9..5ca0814 100644 --- a/src/hooks/usePhoneView.ts +++ b/src/hooks/usePhoneView.ts @@ -2,8 +2,11 @@ import { useSyncExternalStore } from "react"; -/** Same "small touch screen" test as the phone-only CSS in ReportFrame. */ -const PHONE_QUERY = "(pointer: coarse) and (max-width: 767px)"; +/** + * Same mobile test as the reduced-view CSS in ReportFrame: a touch device (phone/tablet) at any + * width, or any window 767px wide or narrower. + */ +const PHONE_QUERY = "(hover: none) and (pointer: coarse), (max-width: 767px)"; function subscribe(onChange: () => void) { const media = window.matchMedia(PHONE_QUERY);