fix: 편집기에서 글을 쓸 수 있게 하고 종류 이름을 한 곳에 모은다

칸이 내용을 따라 자란다. 112px 고정이라 659자짜리 규칙 본문을 세 줄짜리
구멍으로 편집했다 — 편집기의 칸 22개 중 10개가 내용이 넘쳐 잘려 있었다.
상한을 70vh 로 두는 이유는 긴 본문 하나가 화면을 통째로 차지하면 나머지
칸으로 이동할 수 없기 때문이다. field-sizing 을 모르는 브라우저는 예전
동작 그대로다 — 나빠지지 않는다.

미리보기가 제자리에 붙는다. 폼과 같은 흐름에 놓여 있어서 편집기가
8,872px 이면 미리보기도 그만큼 아래로 흘렀고, 아래쪽 칸을 고치는 동안
미리보기는 화면 밖이었다. 한 열로 접히는 폭에서는 붙박이를 푼다 —
위아래로 쌓인 상태에서 붙이면 폼을 가린다.

종류 이름을 한 곳에 모은다. 표가 화면마다 복사되어 여섯 벌이었고 그래서
갈라졌다: 같은 QUESTION 이 공개 화면에서 "Open Question", 작업본 목록과
게시 기록에서 "Question", 편집기 상태 줄에서 "QUESTION" 이었다. 쓰는
사람은 같은 문서를 화면마다 다른 이름으로 만난다. Record<RecordKind,
string> 이므로 종류가 늘면 빠진 자리를 타입이 잡는다.

미리보기는 공개 화면과 같은 렌더러를 쓰므로, 오늘 고친 문단·인라인 코드가
편집기 미리보기에도 그대로 적용된다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
This commit is contained in:
DongHyeonka
2026-08-31 08:29:10 +09:00
co-authored by Claude Opus 5
parent 9b7ad82fe3
commit ca1fc92e6d
10 changed files with 58 additions and 65 deletions
@@ -6,14 +6,8 @@ import { managementFailureMessage } from "../../../application/ports/management-
import { useStudio } from "../use-studio.ts";
import { GuardedStudioLink } from "./guarded-studio-link.tsx";
import { StudioPagination } from "./studio-pagination.tsx";
import { DOCUMENT_KIND_LABELS } from "../../shared/document-kind-labels.ts";
const kindLabel = {
CASE: "Case",
REFERENCE: "Reference",
QUESTION: "Question",
CONCEPT: "개념",
PROJECT_DECISION: "Decision",
} as const;
const publicationLabel = {
NEVER_PUBLISHED: "게시 전",
PUBLISHED: "게시 중",
@@ -261,7 +255,7 @@ export function DocumentList() {
<div className="studio-document-list">
{page.items.map((item) => (
<article className="studio-document-row" key={item.id}>
<p className="studio-row-label">{kindLabel[item.kind]}</p>
<p className="studio-row-label">{DOCUMENT_KIND_LABELS[item.kind]}</p>
<div className="studio-document-title">
<h2>
<GuardedStudioLink href={`/studio/documents/${item.id}/edit`}>
@@ -1,5 +1,6 @@
import type { DocumentEditorController } from "./document-editor-controller.ts";
import type { FieldIssue } from "./field-issues.tsx";
import { DOCUMENT_KIND_LABELS } from "../../shared/document-kind-labels.ts";
const labels = {
CLEAN: "저장됨",
@@ -8,14 +9,6 @@ const labels = {
CONFLICT: "저장 충돌",
} as const;
const kindLabels = {
CASE: "CASE",
REFERENCE: "REFERENCE",
QUESTION: "QUESTION",
CONCEPT: "CONCEPT",
PROJECT_DECISION: "Decision",
} as const;
/**
* 작업 상태와 저장·게시를 화면 아래에 고정한다.
*
@@ -43,7 +36,7 @@ export function DocumentStatusBar({
<aside className="studio-document-status-bar" aria-labelledby="studio-document-status-title">
<h2 id="studio-document-status-title" className="studio-visually-hidden">작업 상태</h2>
<p className={`studio-editor-status studio-editor-status--${controller.status.toLowerCase()}`} role="status" aria-label="편집 상태">{labels[controller.status]}</p>
<dl><div><dt>저장 버전</dt><dd>{controller.saved.version}</dd></div><div><dt>종류</dt><dd>{kindLabels[controller.draft.kind]}</dd></div></dl>
<dl><div><dt>저장 버전</dt><dd>{controller.saved.version}</dd></div><div><dt>종류</dt><dd>{DOCUMENT_KIND_LABELS[controller.draft.kind]}</dd></div></dl>
{/*
경고는 하나만 띄운다. 충돌은 그 자체로 무엇을 해야 하는지 말해 주므로 서버가 준 문구보다
앞서고, 그 밖의 실패는 서버가 준 이유를 그대로 보여 준다. 둘을 함께 띄우면 같은 실패를
@@ -18,6 +18,7 @@ import {
import { UnpublishDialog } from "./unpublish-dialog.tsx";
import { useStudio } from "../use-studio.ts";
import { StudioPagination } from "./studio-pagination.tsx";
import { DOCUMENT_KIND_LABELS } from "../../shared/document-kind-labels.ts";
const eventLabels = {
PUBLISHED: "게시",
@@ -25,14 +26,6 @@ const eventLabels = {
UNPUBLISHED: "게시 취소",
} as const;
const kindLabels = {
CASE: "Case",
REFERENCE: "Reference",
QUESTION: "Question",
CONCEPT: "개념",
PROJECT_DECISION: "Decision",
} as const;
function dateTime(value: string) {
return new Intl.DateTimeFormat("ko-KR", {
dateStyle: "medium",
@@ -234,7 +227,7 @@ export function PublicationList({
</p>
<div className={styles.eventMain}>
<p className={styles.kind}>
{kindLabels[item.document.kind]} · v
{DOCUMENT_KIND_LABELS[item.document.kind]} · v
{item.event.publishedVersion}
</p>
<h2>{item.document.title || "제목 없는 작업본"}</h2>
@@ -5,16 +5,10 @@ import type { components } from "../../../contracts/studio/generated.ts";
import { useStudio } from "../use-studio.ts";
import { GuardedStudioLink } from "./guarded-studio-link.tsx";
import { HomeFocusEditor } from "./home-focus-editor.tsx";
import { DOCUMENT_KIND_LABELS } from "../../shared/document-kind-labels.ts";
type DocumentSummary = components["schemas"]["DocumentSummary"];
const kindLabel = {
CASE: "Case",
REFERENCE: "Reference",
QUESTION: "Question",
CONCEPT: "개념",
PROJECT_DECISION: "Decision",
} as const;
const actionLabel = {
CONTINUE_EDITING: "작성 계속",
VALIDATE: "검증하기",
@@ -27,7 +21,7 @@ const actionLabel = {
function WorkRow({ item }: Readonly<{ item: DocumentSummary }>) {
return (
<article className="studio-work-row">
<p className="studio-row-label">{kindLabel[item.kind]}</p>
<p className="studio-row-label">{DOCUMENT_KIND_LABELS[item.kind]}</p>
<div>
<h3>
<GuardedStudioLink href={`/studio/documents/${item.id}/edit`}>