From ca1fc92e6db9951fc39d0bd8942f05baa045f494 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Mon, 31 Aug 2026 08:29:10 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=8E=B8=EC=A7=91=EA=B8=B0=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EA=B8=80=EC=9D=84=20=EC=93=B8=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EA=B2=8C=20=ED=95=98=EA=B3=A0=20=EC=A2=85=EB=A5=98=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=EC=9D=84=20=ED=95=9C=20=EA=B3=B3=EC=97=90=20?= =?UTF-8?q?=EB=AA=A8=EC=9D=80=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 칸이 내용을 따라 자란다. 112px 고정이라 659자짜리 규칙 본문을 세 줄짜리 구멍으로 편집했다 — 편집기의 칸 22개 중 10개가 내용이 넘쳐 잘려 있었다. 상한을 70vh 로 두는 이유는 긴 본문 하나가 화면을 통째로 차지하면 나머지 칸으로 이동할 수 없기 때문이다. field-sizing 을 모르는 브라우저는 예전 동작 그대로다 — 나빠지지 않는다. 미리보기가 제자리에 붙는다. 폼과 같은 흐름에 놓여 있어서 편집기가 8,872px 이면 미리보기도 그만큼 아래로 흘렀고, 아래쪽 칸을 고치는 동안 미리보기는 화면 밖이었다. 한 열로 접히는 폭에서는 붙박이를 푼다 — 위아래로 쌓인 상태에서 붙이면 폼을 가린다. 종류 이름을 한 곳에 모은다. 표가 화면마다 복사되어 여섯 벌이었고 그래서 갈라졌다: 같은 QUESTION 이 공개 화면에서 "Open Question", 작업본 목록과 게시 기록에서 "Question", 편집기 상태 줄에서 "QUESTION" 이었다. 쓰는 사람은 같은 문서를 화면마다 다른 이름으로 만난다. Record 이므로 종류가 늘면 빠진 자리를 타입이 잡는다. 미리보기는 공개 화면과 같은 렌더러를 쓰므로, 오늘 고친 문단·인라인 코드가 편집기 미리보기에도 그대로 적용된다. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ --- .../components/public-document-header.tsx | 12 +++-------- .../public/components/public-record-list.tsx | 10 ++------- .../shared/document-kind-labels.ts | 21 +++++++++++++++++++ .../public-render/public-record-renderer.tsx | 13 +++--------- .../studio/components/document-list.tsx | 10 ++------- .../studio/components/document-status-bar.tsx | 11 ++-------- .../studio/components/publication-list.tsx | 11 ++-------- .../studio/components/studio-dashboard.tsx | 10 ++------- .../presentation/styles/studio-editor.css | 18 +++++++++++++--- .../tech-log/studio-editor-smoke.test.tsx | 7 ++++++- 10 files changed, 58 insertions(+), 65 deletions(-) create mode 100644 src/features/tech-log/presentation/shared/document-kind-labels.ts diff --git a/src/features/tech-log/presentation/public/components/public-document-header.tsx b/src/features/tech-log/presentation/public/components/public-document-header.tsx index e82fe43..1b43122 100644 --- a/src/features/tech-log/presentation/public/components/public-document-header.tsx +++ b/src/features/tech-log/presentation/public/components/public-document-header.tsx @@ -3,13 +3,7 @@ import { Link } from "react-router-dom"; import type { PublicRecord } from "../../../application/ports/public-content-queries.ts"; import type { components } from "../../../contracts/studio/generated.ts"; import { ProseText } from "../../shared/public-render/prose-text.tsx"; - -const kindLabels = { - CASE: "Case", - REFERENCE: "Reference", - QUESTION: "Open Question", - CONCEPT: "개념", -} as const; +import { DOCUMENT_KIND_LABELS } from "../../shared/document-kind-labels.ts"; export function PublicDocumentHeader({ record }: { record: PublicRecord }) { return ( @@ -18,7 +12,7 @@ export function PublicDocumentHeader({ record }: { record: PublicRecord }) { - {kindLabels[record.kind]} + {DOCUMENT_KIND_LABELS[record.kind]} {/* @@ -39,7 +33,7 @@ export function PublicDocumentHeader({ record }: { record: PublicRecord }) {
유형
-
{kindLabels[record.kind]}
+
{DOCUMENT_KIND_LABELS[record.kind]}
프로젝트
diff --git a/src/features/tech-log/presentation/public/components/public-record-list.tsx b/src/features/tech-log/presentation/public/components/public-record-list.tsx index f155862..82995c3 100644 --- a/src/features/tech-log/presentation/public/components/public-record-list.tsx +++ b/src/features/tech-log/presentation/public/components/public-record-list.tsx @@ -1,13 +1,7 @@ import { Link } from "react-router-dom"; import type { PublicRecord } from "../../../application/ports/public-content-queries.ts"; - -const kindLabels = { - CASE: "Case", - REFERENCE: "Reference", - QUESTION: "Open Question", - CONCEPT: "개념", -} as const; +import { DOCUMENT_KIND_LABELS } from "../../shared/document-kind-labels.ts"; export function PublicRecordList({ records, @@ -25,7 +19,7 @@ export function PublicRecordList({ {records.map((record) => (
  • - {kindLabels[record.kind]} + {DOCUMENT_KIND_LABELS[record.kind]}
    {record.title}

    {record.summary}

    diff --git a/src/features/tech-log/presentation/shared/document-kind-labels.ts b/src/features/tech-log/presentation/shared/document-kind-labels.ts new file mode 100644 index 0000000..87548a4 --- /dev/null +++ b/src/features/tech-log/presentation/shared/document-kind-labels.ts @@ -0,0 +1,21 @@ +import type { components } from "../../contracts/studio/generated.ts"; + +type RecordKind = components["schemas"]["RecordKind"]; + +/** + * 문서 종류를 사람에게 보여 주는 이름. + * + *

    이 표는 화면마다 하나씩 복사되어 있었고, 그래서 갈라졌다. 같은 `QUESTION` 이 공개 화면에서는 + * "Open Question", 작업본 목록과 게시 기록에서는 "Question", 편집기 상태 줄에서는 "QUESTION" 으로 + * 나왔다 — 여섯 벌 중 네 가지 표기였다. 쓰는 사람은 같은 문서를 화면마다 다른 이름으로 만난다. + * + *

    한 곳에 두면 다음에 종류가 늘어날 때도 한 번만 고친다. 종류를 더하면 이 표가 비어 있는 것을 + * 타입이 잡는다 — `Record` 이므로 빠진 종류가 있으면 컴파일되지 않는다. + */ +export const DOCUMENT_KIND_LABELS: Record = { + CASE: "Case", + REFERENCE: "Reference", + QUESTION: "Open Question", + CONCEPT: "개념", + PROJECT_DECISION: "Decision", +}; diff --git a/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx b/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx index 950cb20..3be152f 100644 --- a/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx +++ b/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx @@ -13,6 +13,7 @@ import { PublicDocumentRelations, type PublicRelation, } from "./public-document-relations.tsx"; +import { DOCUMENT_KIND_LABELS } from "../document-kind-labels.ts"; type PublicRenderModel = components["schemas"]["PublicRenderModel"]; type PublicRenderModelBase = components["schemas"]["PublicRenderModelBase"]; @@ -31,14 +32,6 @@ type RenderDependencies = { resolvePublishedLabel: ResolvePublishedLabel; }; -const kindLabels = { - CASE: "Case", - REFERENCE: "Reference", - QUESTION: "Open Question", - CONCEPT: "개념", - PROJECT_DECISION: "Decision", -} as const; - function assertNever(value: never): never { throw new Error(`Unsupported Public render model: ${JSON.stringify(value)}`); } @@ -84,7 +77,7 @@ function ModelDocumentHeader({ return (