feat: 바탕화면 디자인 수정본을 얹는다

`~/Desktop/tech-log-frontend` 의 재디자인 결과물(DESIGN_REVISION.md)을 그대로 가져왔다.
바뀐 것은 소스 일곱과 검사 둘이고, 나머지 파일은 이 저장소의 것과 같았다.

공개 화면 — 홈을 큰 빈 히어로 + 평평한 줄 목록에서 실제 조사 경로로 흐르게 고쳤고,
프로젝트·주제·현재·관련 맥락을 본문 흐름 밖의 고정 레일로 옮겼다(좁은 화면은 접이식 유지).
Case·Concept 장문을 읽기 폭 + 맥락/목차 레일 한 짜임으로 통일했고, Question·Reference 도
같은 짜임으로 다시 세웠다. Case 의 검증 조건은 곁다리 details 줄이 아니라 의도된 근거
공개로 바꿨다. 제목·본문 폭과 프로젝트 목록 밀도를 줄이고 상태 격자를 반응형으로 만들었다.

Studio — Asset Picker 를 파일 이름·미리보기·치수·사용 수를 가진 검색 가능한 줄로 다시
만들었다. 지우는 동작은 Asset 화면에 남긴다.

내가 넣었던 개념 흐름 지도(`MechanismMap`)는 이 수정본이 뺐다 — 소제목을 알약으로 늘어놓은
근사치라 절 사이에 태그를 붙여 놓은 것처럼 보인다는 판단이다. 컴포넌트와 CSS 는 아직 남아
있으나 어디서도 부르지 않는다.

수정본은 Node 22 에서 검증됐다고 적혀 있어 이 저장소가 선언한 Node 24 로 다시 돌렸다:
check:types · lint · test:unit(1829) · test:component(152) · test:tech-log(422) 전부 통과.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015c8cBFUaVr7KLVUx6ujz7D
This commit is contained in:
DongHyeonka
2026-09-16 15:29:16 +09:00
co-authored by Claude Opus 5
parent e621d2c9e4
commit b9d0585bc6
9 changed files with 1262 additions and 319 deletions
@@ -2,29 +2,15 @@ import { Link } from "react-router-dom";
import type { LatestEntry } from "./latest-index.tsx"; import type { LatestEntry } from "./latest-index.tsx";
/** 한 줄에 펴 두는 기록 수. 넘으면 길이 아니라 또 하나의 목록이 된다. */
const PATH_SIZE = 4; const PATH_SIZE = 4;
/** /**
* 이 사이트를 어떻게 쓰는지를 실제 기록 하나로 가르친다. * 홈에서 실제 프로젝트 하나를 이용해 이 사이트의 읽는 방식을 보여 준다.
* *
* <p>홈의 첫 문장은 글 쓰는 태도를 말했다 — "문제를 재현하고 검증해 정리합니다". 맞는 말이지만 * 단순 행 목록이 아니라 하나의 investigation sequence로 보이게 한다. 기록 종류와 주제는
* 처음 온 사람이 알아야 하는 것은 태도가 아니라 <em>길</em>이다. 이 사이트에서 기록은 한 편으로 * 보조 정보이고, 제목과 짧은 요약이 단계의 본문이다.
* 끝나지 않고 프로젝트 안의 주제에 속하고, 주제 안에서 서로 이어진다. 그 구조를 설명하는 문장보다
* 실제 사슬 하나를 보여 주는 편이 빠르다.
*
* <p>고르는 방법은 "최근 기록이 가장 많이 모인 프로젝트"다. 손으로 고른 예시를 코드에 적어 두면
* 그 기록을 지우는 순간 홈이 죽은 링크를 가리킨다 — 이 저장소에서 주제 셋을 코드에 적어 두었다가
* 같은 일을 겪었다.
*
* <p>주제가 아니라 프로젝트로 묶는다. 한 주제 안에 아직 기록이 하나씩뿐인 동안에는 주제로 묶으면
* 이을 것이 없어 이 구역이 통째로 사라진다 — 실제로 그랬다. 조사는 프로젝트 안에서 여러 주제를
* 오가며 자라므로, 프로젝트가 사슬의 자연스러운 단위다.
*
* <p>이을 것이 없으면 그리지 않는다. 한 편짜리 길은 길이 아니다.
*/ */
export function HomeInvestigationPath({ entries }: { entries: ReadonlyArray<LatestEntry> }) { export function HomeInvestigationPath({ entries }: { entries: ReadonlyArray<LatestEntry> }) {
/* 기록만 센다. 프로젝트 활동과 릴리스는 기록이 아니라 일어난 일이라 사슬의 마디가 아니다. */
const records = entries.filter((entry) => entry.typeState !== undefined && entry.topic); const records = entries.filter((entry) => entry.typeState !== undefined && entry.topic);
const byProject = new Map<string, LatestEntry[]>(); const byProject = new Map<string, LatestEntry[]>();
@@ -45,39 +31,43 @@ export function HomeInvestigationPath({ entries }: { entries: ReadonlyArray<Late
return ( return (
<section className="shell home-path" aria-labelledby="home-path-title"> <section className="shell home-path" aria-labelledby="home-path-title">
<p className="section-kicker" id="home-path-title"> <div className="home-path__intro">
이렇게 이어집니다 <div>
</p> <p className="section-kicker">Context path</p>
<ol className="home-path-trail"> <h2 id="home-path-title">한 프로젝트의 맥락을 따라 읽습니다</h2>
<li> </div>
<span>프로젝트</span> <p>
<strong>{head.project}</strong> 한 편의 글로 끝내지 않고, 같은 프로젝트 안에서 서로 다른 주제를 오가며
</li> 확인한 기록을 이어 봅니다.
</ol> </p>
{/* 기록마다 어느 주제에 속하는지 함께 적는다 — 하나의 조사가 여러 주제를 오간다는 것이 </div>
이 사슬이 보여 주려는 것이다. */}
<ul className="home-path-records"> <div className="home-path__project">
<span>Project</span>
<strong>{head.project}</strong>
</div>
<ol className="home-path-records">
{path.map((record, index) => ( {path.map((record, index) => (
<li key={record.path}> <li key={record.path}>
<span>{[record.typeLabel, record.topic].filter(Boolean).join(" · ")}</span> <div className="home-path-step" aria-hidden="true">
<div> <span>{String(index + 1).padStart(2, "0")}</span>
</div>
<div className="home-path-copy">
<p className="home-path-meta">
{record.typeLabel}
{record.topic ? <><span aria-hidden="true">·</span>{record.topic}</> : null}
</p>
<Link to={record.path}>{record.title}</Link> <Link to={record.path}>{record.title}</Link>
{/*
무엇이 이어지는지만 적으면 목록이고, 왜 이어지는지를 적어야 길이 된다. 요약의
첫 문장을 쓴다 — 작성자가 이 줄을 위해 따로 쓸 것을 만들지 않는다.
*/}
{record.summary.trim() ? <p>{firstSentence(record.summary)}</p> : null} {record.summary.trim() ? <p>{firstSentence(record.summary)}</p> : null}
</div> </div>
{index < path.length - 1 ? <span aria-hidden="true" className="home-path-arrow">↓</span> : null}
</li> </li>
))} ))}
</ul> </ol>
</section> </section>
); );
} }
/** 요약의 첫 문장. 한 줄이면 충분하고, 문단째 넣으면 길이 다시 목록이 된다. */
function firstSentence(summary: string): string { function firstSentence(summary: string): string {
const line = summary.split(/\n+/u)[0]?.trim() ?? ""; const line = summary.split(/\n+/u)[0]?.trim() ?? "";
const stop = line.search(/[.。]\s|다\s/u); const stop = line.search(/[.。]\s|다\s/u);
@@ -200,8 +200,13 @@ export function HomePage() {
return ( return (
<main id="main-content"> <main id="main-content">
<section className="shell home-identity" aria-labelledby="home-title"> <section className="shell home-identity" aria-labelledby="home-title">
<p className="section-kicker">Engineering knowledge, in context</p>
<h1 id="home-title">{publicSiteConfig.brandTitle}</h1> <h1 id="home-title">{publicSiteConfig.brandTitle}</h1>
<p className="identity-statement">{publicSiteConfig.identityStatement}</p> <p className="identity-statement">{publicSiteConfig.identityStatement}</p>
<div className="home-identity__actions">
<Link to="/projects">프로젝트 둘러보기</Link>
<Link to="/explore">기록 탐색</Link>
</div>
</section> </section>
{/* {/*
@@ -10,7 +10,6 @@ import type {
import { CaseBodyRenderer } from "./case-body-renderer.tsx"; import { CaseBodyRenderer } from "./case-body-renderer.tsx";
import { ContextNavigator } from "./context-navigator.tsx"; import { ContextNavigator } from "./context-navigator.tsx";
import { DocumentToc } from "./document-toc.tsx"; import { DocumentToc } from "./document-toc.tsx";
import { MechanismMap } from "./mechanism-map.tsx";
import { RailContext } from "./rail-context.tsx"; import { RailContext } from "./rail-context.tsx";
import { import {
PublicDocumentRelations, PublicDocumentRelations,
@@ -143,6 +142,32 @@ function publicRelations(
} }
function StructuredRecordRail({
model,
sections,
}: {
model: PublicRenderModelBase;
sections: ReadonlyArray<{ id: string; label: string }>;
}) {
return (
<aside className="structured-record-rail" aria-label="문서 안내">
{sections.length > 0 ? (
<nav className="structured-record-toc" aria-label="이 글에서">
<p>In this record</p>
{sections.map((section, index) => (
<a key={section.id} href={`#${section.id}`}>
<span>{String(index + 1).padStart(2, "0")}</span>
{section.label}
</a>
))}
</nav>
) : null}
<RailContext model={model} />
</aside>
);
}
/** /**
* Case 한 편. * Case 한 편.
* *
@@ -210,7 +235,10 @@ function CaseDocument({
접어 둔다. 무엇이 들었는지는 손잡이가 말하므로 펴 보지 않아도 있다는 것은 안다. 접어 둔다. 무엇이 들었는지는 손잡이가 말하므로 펴 보지 않아도 있다는 것은 안다.
*/} */}
<details className="case-meta-details"> <details className="case-meta-details">
<summary>실험 조건 · 검증 환경과 데이터</summary> <summary>
<span>검증 환경</span>
<small>이 결과를 다시 확인할 때 필요한 조건과 데이터</small>
</summary>
<dl className="case-meta"> <dl className="case-meta">
<div> <div>
<dt>검증 환경</dt> <dt>검증 환경</dt>
@@ -314,12 +342,6 @@ function ConceptDocument({
<ContextNavigator model={model} /> <ContextNavigator model={model} />
{/*
개념은 여느 긴 글과 달리 "어디를 지나는가"가 먼저 보여야 한다. 본문의 소제목이 곧 그
계층이므로 손으로 적지 않고 거기서 만든다 — 손으로 적게 하면 본문을 고칠 때 이 줄만 낡는다.
*/}
<MechanismMap steps={headings} />
<DocumentToc headings={headings} variant="mobile" /> <DocumentToc headings={headings} variant="mobile" />
<div className="shell document-layout"> <div className="shell document-layout">
@@ -443,85 +465,93 @@ function ReferenceDocument({
resolvePublishedLabel: ResolvePublishedLabel; resolvePublishedLabel: ResolvePublishedLabel;
}) { }) {
const Root = embedded ? "div" : "main"; const Root = embedded ? "div" : "main";
const railSections = [
{ id: "purpose-title", label: "이 기준을 쓰는 이유" },
...(model.applyWhen.length > 0 || model.exceptions.length > 0
? [{ id: "applicability-title", label: "언제 쓰는 기준인가" }]
: []),
{ id: "rules-title", label: "판단 기준" },
{ id: "examples-title", label: "예시" },
];
return ( return (
<Root <Root
id={embedded ? undefined : "main-content"} id={embedded ? undefined : "main-content"}
className={`shell public-document-page${embedded ? " public-record-embedded" : ""}`} className={`public-document-page${embedded ? " public-record-embedded" : ""}`}
> >
<ModelDocumentHeader <div className="shell">
model={model} <ModelDocumentHeader
resolvePublishedLabel={resolvePublishedLabel} model={model}
/> resolvePublishedLabel={resolvePublishedLabel}
/>
</div>
<ContextNavigator model={model} /> <ContextNavigator model={model} />
<section className="reference-purpose" aria-labelledby="purpose-title"> <div className="shell structured-record-layout">
<p className="section-kicker">Purpose</p> <div className="structured-record-main">
<h2 id="purpose-title">이 기준을 쓰는 이유</h2> <section className="reference-purpose" aria-labelledby="purpose-title">
<ProseText text={model.purpose} /> <p className="section-kicker">Purpose</p>
</section> <h2 id="purpose-title">이 기준을 쓰는 이유</h2>
{/* <ProseText text={model.purpose} />
이 기준이 어디에 걸리고 어디에 안 걸리는지를 먼저 말한다. </section>
{model.applyWhen.length > 0 || model.exceptions.length > 0 ? (
「적용할 때」와 「예외와 주의」는 오래 판단 기준 아래에 있었다. 그러면 읽는 사람은 기준 <section className="reference-applicability" aria-labelledby="applicability-title">
여럿을 다 읽은 뒤에야 "이건 내 경우가 아니었다"를 알게 된다 — 긴 문단을 다 읽히고 나서 <h2 id="applicability-title">언제 쓰는 기준인가</h2>
해당 없음을 알리는 셈이다. 두 목록을 위로 올려 나란히 둔다.
*/}
{model.applyWhen.length > 0 || model.exceptions.length > 0 ? (
<section className="reference-applicability" aria-labelledby="applicability-title">
<h2 id="applicability-title">언제 쓰는 기준인가</h2>
<div>
{model.applyWhen.length > 0 ? (
<div> <div>
<h3>이럴 때 씁니다</h3> {model.applyWhen.length > 0 ? (
<ul>
{[...model.applyWhen]
.sort((left, right) => left.order - right.order)
.map((item) => <li key={item.id}><ProseText text={item.text} /></li>)}
</ul>
</div>
) : null}
{model.exceptions.length > 0 ? (
<div>
<h3>이럴 때는 다릅니다</h3>
<ul>
{[...model.exceptions]
.sort((left, right) => left.order - right.order)
.map((item) => <li key={item.id}><ProseText text={item.text} /></li>)}
</ul>
</div>
) : null}
</div>
</section>
) : null}
<article className="public-document-body reference-body">
<section aria-labelledby="rules-title">
<h2 id="rules-title">판단 기준</h2>
<ol className="reference-rules">
{[...model.rules]
.sort((left, right) => left.order - right.order)
.map((rule, index) => (
<li key={rule.id}>
<span>{String(index + 1).padStart(2, "0")}</span>
<div> <div>
<h3>{rule.title}</h3> <h3>이럴 때 씁니다</h3>
<ProseText text={rule.body} /> <ul>
{[...model.applyWhen]
.sort((left, right) => left.order - right.order)
.map((item) => <li key={item.id}><ProseText text={item.text} /></li>)}
</ul>
</div> </div>
</li> ) : null}
))} {model.exceptions.length > 0 ? (
</ol> <div>
</section> <h3>이럴 때는 다릅니다</h3>
<section aria-labelledby="examples-title"> <ul>
<h2 id="examples-title">예시</h2> {[...model.exceptions]
<ul> .sort((left, right) => left.order - right.order)
{[...model.examples] .map((item) => <li key={item.id}><ProseText text={item.text} /></li>)}
.sort((left, right) => left.order - right.order) </ul>
.map((item) => <li key={item.id}><ProseText text={item.text} /></li>)} </div>
</ul> ) : null}
<p className="verified-at"> </div>
마지막 검증 {displayDate(model.verifiedOn)} </section>
</p> ) : null}
</section> <article className="public-document-body reference-body">
</article> <section aria-labelledby="rules-title">
<PublicDocumentRelations relations={publicRelations(model.relations)} /> <h2 id="rules-title">판단 기준</h2>
<ol className="reference-rules">
{[...model.rules]
.sort((left, right) => left.order - right.order)
.map((rule, index) => (
<li key={rule.id}>
<span>{String(index + 1).padStart(2, "0")}</span>
<div>
<h3>{rule.title}</h3>
<ProseText text={rule.body} />
</div>
</li>
))}
</ol>
</section>
<section aria-labelledby="examples-title">
<h2 id="examples-title">예시</h2>
<ul>
{[...model.examples]
.sort((left, right) => left.order - right.order)
.map((item) => <li key={item.id}><ProseText text={item.text} /></li>)}
</ul>
<p className="verified-at">
마지막 검증 {displayDate(model.verifiedOn)}
</p>
</section>
</article>
<PublicDocumentRelations relations={publicRelations(model.relations)} />
</div>
<StructuredRecordRail model={model} sections={railSections} />
</div>
</Root> </Root>
); );
} }
@@ -554,109 +584,111 @@ function QuestionDocument({
}) { }) {
const resolutionPath = model.resolution?.evidenceTarget.publicPath; const resolutionPath = model.resolution?.evidenceTarget.publicPath;
const Root = embedded ? "div" : "main"; const Root = embedded ? "div" : "main";
const railSections = [
{ id: "facts-title", label: "확인한 사실" },
{ id: "assumptions-title", label: "가정" },
{ id: "unknowns-title", label: "남은 미지수" },
{ id: "constraints-title", label: "제약" },
{ id: "options-title", label: "검토한 선택지" },
{ id: "next-validation-title", label: "다음 검증" },
];
return ( return (
<Root <Root
id={embedded ? undefined : "main-content"} id={embedded ? undefined : "main-content"}
className={`shell public-document-page${embedded ? " public-record-embedded" : ""}`} className={`public-document-page${embedded ? " public-record-embedded" : ""}`}
> >
<ModelDocumentHeader <div className="shell">
model={model} <ModelDocumentHeader
resolvePublishedLabel={resolvePublishedLabel} model={model}
/> resolvePublishedLabel={resolvePublishedLabel}
/>
</div>
<ContextNavigator model={model} /> <ContextNavigator model={model} />
<p <div className="shell structured-record-layout">
className={`question-status question-status--${model.status.toLowerCase()}`} <div className="structured-record-main">
> <p
{model.status} className={`question-status question-status--${model.status.toLowerCase()}`}
</p> >
{model.resolution ? ( {model.status}
<aside className="question-resolution"> </p>
<strong>{model.resolution.summary}</strong> {model.resolution ? (
{resolutionPath ? ( <aside className="question-resolution">
<Link to={resolutionPath}>{model.resolution.linkLabel}</Link> <strong>{model.resolution.summary}</strong>
) : ( {resolutionPath ? (
<span>{model.resolution.linkLabel}</span> <Link to={resolutionPath}>{model.resolution.linkLabel}</Link>
)} ) : (
</aside> <span>{model.resolution.linkLabel}</span>
) : null} )}
{/* </aside>
네 구역이 같은 제목+본문 모양이라, 긴 글을 훑을 때 「확인한 사실」과 「가정」이 눈으로 ) : null}
구분되지 않았다. 이 기록의 값어치는 무엇이 검증됐고 무엇이 아직 아닌지를 갈라 적는 <article className="public-document-body question-body">
데 있는데, 그 구분이 화면에서 사라져 있었다. <section aria-labelledby="facts-title" data-epistemic="fact">
<h2 id="facts-title">확인한 사실</h2>
색을 다섯 개 칠하지 않는다. 표식 하나와 왼쪽 선만 다르게 둔다 — 나머지 화면이 카드도 <OrderedItems items={model.facts} />
채도 높은 색도 쓰지 않는다. </section>
*/} <section aria-labelledby="assumptions-title" data-epistemic="assumption">
<article className="public-document-body question-body"> <h2 id="assumptions-title">가정</h2>
<section aria-labelledby="facts-title" data-epistemic="fact"> <OrderedItems
<h2 id="facts-title">확인한 사실</h2> items={model.assumptions}
<OrderedItems items={model.facts} /> empty="현재 기록된 가정이 없습니다."
</section> />
<section aria-labelledby="assumptions-title" data-epistemic="assumption"> </section>
<h2 id="assumptions-title">가정</h2> <section aria-labelledby="unknowns-title" data-epistemic="unknown">
<OrderedItems <h2 id="unknowns-title">남은 미지수</h2>
items={model.assumptions} <OrderedItems
empty="현재 기록된 가정이 없습니다." items={model.unknowns}
/> empty="해결 과정에서 남은 미지수가 없습니다."
</section> />
<section aria-labelledby="unknowns-title" data-epistemic="unknown"> </section>
<h2 id="unknowns-title">남은 미지수</h2> <section aria-labelledby="constraints-title" data-epistemic="constraint">
<OrderedItems <h2 id="constraints-title">제약</h2>
items={model.unknowns} <OrderedItems items={model.constraints} />
empty="해결 과정에서 남은 미지수가 없습니다." </section>
/> <section aria-labelledby="options-title">
</section> <h2 id="options-title">검토한 선택지</h2>
<section aria-labelledby="constraints-title" data-epistemic="constraint"> <ol className="question-options">
<h2 id="constraints-title">제약</h2> {[...model.options]
<OrderedItems items={model.constraints} />
</section>
<section aria-labelledby="options-title">
<h2 id="options-title">검토한 선택지</h2>
<ol className="question-options">
{[...model.options]
.sort((left, right) => left.order - right.order)
.map((option) => (
<li key={option.id}>
<h3>{option.title}</h3>
<ProseText text={option.description} />
</li>
))}
</ol>
</section>
<section
className="next-validation"
aria-labelledby="next-validation-title"
>
<p className="section-kicker">Next</p>
<h2 id="next-validation-title">다음 검증</h2>
{/*
「무엇을 확인할 것인가」는 있었지만 「왜 그것이 다음인가」가 없었다. 이 기록이 열려
있는 이유는 남은 미지수이므로, 그 미지수를 여기 다시 세워 둘을 잇는다 — 작성자가
따로 적지 않아도 사슬이 보인다.
*/}
{model.unknowns.length > 0 ? (
<div className="next-validation-why">
<p>왜 다음인가</p>
<ul>
{[...model.unknowns]
.sort((left, right) => left.order - right.order) .sort((left, right) => left.order - right.order)
.slice(0, 2) .map((option) => (
.map((item) => ( <li key={option.id}>
<li key={item.id}> <h3>{option.title}</h3>
<ProseText text={item.text} /> <ProseText text={option.description} />
</li> </li>
))} ))}
</ul> </ol>
</div> </section>
) : null} <section
<div className="next-validation-how"> className="next-validation"
<p>어떻게 확인하나</p> aria-labelledby="next-validation-title"
<ProseText text={model.nextValidation} /> >
</div> <p className="section-kicker">Next</p>
</section> <h2 id="next-validation-title">다음 검증</h2>
</article> {model.unknowns.length > 0 ? (
<PublicDocumentRelations relations={publicRelations(model.relations)} /> <div className="next-validation-why">
<p>왜 다음인가</p>
<ul>
{[...model.unknowns]
.sort((left, right) => left.order - right.order)
.slice(0, 2)
.map((item) => (
<li key={item.id}>
<ProseText text={item.text} />
</li>
))}
</ul>
</div>
) : null}
<div className="next-validation-how">
<p>어떻게 확인하나</p>
<ProseText text={model.nextValidation} />
</div>
</section>
</article>
<PublicDocumentRelations relations={publicRelations(model.relations)} />
</div>
<StructuredRecordRail model={model} sections={railSections} />
</div>
</Root> </Root>
); );
} }
@@ -7,60 +7,67 @@ import { DOCUMENT_KIND_LABELS } from "../document-kind-labels.ts";
type PublicRenderModelBase = components["schemas"]["PublicRenderModelBase"]; type PublicRenderModelBase = components["schemas"]["PublicRenderModelBase"];
/** /**
* 레일에 붙어 따라오는 「지금 어디인가」. * 긴 글을 읽는 동안 유지되는 조사 맥락.
* *
* <p>제목 아래의 맥락 덩어리는 한 번 읽고 지나간다. 본문이 길면 화면을 몇 번 넘긴 뒤에는 이 * 본문 사이에 별도의 관계 표를 끼우지 않고, reading rail이 현재 위치와 관련 기록을 맡는다.
* 기록이 어느 프로젝트의 어느 주제였는지가 화면에서 사라진다 — 레일에는 「이 글에서」만 남아 * 관계 데이터에는 앞/뒤 의미가 따로 없으므로 임의로 "이전/다음"이라 부르지 않는다.
* 이 글 안의 위치는 알아도 조사 안의 위치는 알 수 없었다.
*
* <p>그래서 레일의 아래 칸에 프로젝트·주제·종류만 짧게 붙여 둔다. 관계 목록은 여기 두지 않는다 —
* 그것은 제목 아래에 이미 있고, 같은 목록이 한 화면에 두 번 있으면 목록이 아니라 소음이다.
*/ */
export function RailContext({ model }: { model: PublicRenderModelBase }) { export function RailContext({ model }: { model: PublicRenderModelBase }) {
const topic = model.topic.label ? model.topic : null; const topic = model.topic.label ? model.topic : null;
const reachable = [...model.relations] const related = [...model.relations]
.filter((relation) => resolvesToPublicRoute(relation.publicPath ?? "")) .filter((relation) => resolvesToPublicRoute(relation.publicPath ?? ""))
.sort((left, right) => left.order - right.order); .sort((left, right) => left.order - right.order)
const path = [ .slice(0, 3);
reachable[0] ? { ...reachable[0], mark: "다음" } : null,
reachable.length > 1 ? { ...reachable.at(-1)!, mark: "앞" } : null, if (!model.project && !topic && related.length === 0) return null;
].filter((step) => step !== null);
if (!model.project && !topic && path.length === 0) return null;
return ( return (
<nav className="rail-context" aria-label="지금 위치"> <nav className="rail-context" aria-label="읽기 맥락">
<p>맥락</p> <p className="rail-context__eyebrow">Context</p>
{model.project ? (
<span>
{model.project.publicPath ? (
<Link to={model.project.publicPath}>{model.project.label}</Link>
) : (
model.project.label
)}
</span>
) : null}
{topic ? (
<span>
{topic.publicPath ? <Link to={topic.publicPath}>{topic.label}</Link> : topic.label}
</span>
) : null}
<span className="rail-context-kind">{DOCUMENT_KIND_LABELS[model.kind]}</span>
{/*
앞뒤 단계. 맥락은 "어디에 속하는가"까지고, 길은 "어디에서 와서 어디로 가는가"다. 둘을
같이 두어야 본문을 읽는 동안에도 사슬이 끊기지 않는다.
순서는 작성자가 관계에 매긴 것을 그대로 쓴다. 지금 기록의 자리를 따로 저장하지 않으므로 <div className="rail-context__location">
첫 관계를 다음으로, 마지막을 앞으로 읽는다 — 관계가 하나면 다음만 있다. {model.project ? (
*/} <div>
{path.length > 0 ? ( <span>Project</span>
<span className="rail-path"> {model.project.publicPath ? (
{path.map((step) => ( <Link to={model.project.publicPath}>{model.project.label}</Link>
<Link key={step.id} to={step.publicPath ?? ""}> ) : (
<em>{step.mark}</em> <strong>{model.project.label}</strong>
{step.title} )}
</div>
) : null}
{topic ? (
<div>
<span>Topic</span>
{topic.publicPath ? (
<Link to={topic.publicPath}>{topic.label}</Link>
) : (
<strong>{topic.label}</strong>
)}
</div>
) : null}
</div>
<div className="rail-context__current">
<span>{DOCUMENT_KIND_LABELS[model.kind]} · Current</span>
<strong>{model.title}</strong>
</div>
{related.length > 0 ? (
<div className="rail-context__related">
<p>Related</p>
{related.map((relation) => (
<Link key={relation.id} to={relation.publicPath ?? ""}>
<span>{
relation.targetKind === "PROJECT"
? "프로젝트"
: DOCUMENT_KIND_LABELS[relation.targetKind]
}</span>
<strong>{relation.title}</strong>
{relation.reason?.trim() ? <small>{relation.reason}</small> : null}
</Link> </Link>
))} ))}
</span> </div>
) : null} ) : null}
</nav> </nav>
); );
@@ -2,8 +2,6 @@ import { useEffect, useId, useState, type FormEvent } from "react";
import type { Asset } from "../../../contracts/studio/contract.ts"; import type { Asset } from "../../../contracts/studio/contract.ts";
import type { StudioAssetGateway } from "../../../application/ports/studio-asset-gateway.ts"; import type { StudioAssetGateway } from "../../../application/ports/studio-asset-gateway.ts";
import { isStudioGatewayError } from "../../../application/ports/studio-gateway-error.ts";
import { createLocalId } from "../../../domain/studio/local-id.ts";
/** One screenful of candidates; searching, not scrolling, reaches the rest. */ /** One screenful of candidates; searching, not scrolling, reaches the rest. */
const PAGE_SIZE = 50; const PAGE_SIZE = 50;
@@ -33,6 +31,12 @@ export function buildEvidenceDirective(
return `:::evidence key="${key}" alt="${alt}" caption="${caption}" zoom="${input.zoom}"\n:::`; return `:::evidence key="${key}" alt="${alt}" caption="${caption}" zoom="${input.zoom}"\n:::`;
} }
function byteLabel(bytes: number): string {
if (bytes < 1024) return `${bytes} B`;
if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024)} KB`;
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
}
export function AssetPicker({ export function AssetPicker({
gateway, gateway,
onInsert, onInsert,
@@ -65,8 +69,7 @@ export function AssetPicker({
* "줌이 왜 꺼져 있는지 모르겠다" 가 그것이다. 그림이면 켜 두고, 끄고 싶으면 여기서 끈다. * "줌이 왜 꺼져 있는지 모르겠다" 가 그것이다. 그림이면 켜 두고, 끄고 싶으면 여기서 끈다.
*/ */
const [allowZoom, setAllowZoom] = useState(true); const [allowZoom, setAllowZoom] = useState(true);
const [removingId, setRemovingId] = useState<string | null>(null); const [kind, setKind] = useState<"" | Asset["kind"]>("");
const [notice, setNotice] = useState("");
const [q, setQ] = useState(""); const [q, setQ] = useState("");
const searchId = useId(); const searchId = useId();
@@ -80,7 +83,7 @@ export function AssetPicker({
setStatus("LOADING"); setStatus("LOADING");
gateway gateway
.listAssets( .listAssets(
{ managementStatus: "READY", ...(q ? { q } : {}), limit: PAGE_SIZE }, { managementStatus: "READY", ...(q ? { q } : {}), ...(kind ? { kind } : {}), limit: PAGE_SIZE },
{ signal: controller.signal }, { signal: controller.signal },
) )
.then((page) => { .then((page) => {
@@ -97,7 +100,7 @@ export function AssetPicker({
active = false; active = false;
controller.abort(); controller.abort();
}; };
}, [gateway, onAssetsObserved, q]); }, [gateway, kind, onAssetsObserved, q]);
// READY만 삽입 후보다. 서버 필터를 신뢰하되 방어적으로 한 번 더 거른다. // READY만 삽입 후보다. 서버 필터를 신뢰하되 방어적으로 한 번 더 거른다.
// A query does not relax this: an asset under review is never insertable, // A query does not relax this: an asset under review is never insertable,
@@ -109,27 +112,6 @@ export function AssetPicker({
setQ(searchDraft.trim()); setQ(searchDraft.trim());
}; };
const removeAsset = async (asset: Asset) => {
if (removingId !== null) return;
setRemovingId(asset.id);
setNotice("");
try {
await gateway.deleteAsset(asset.id, {
idempotencyKey: createLocalId(`studio-asset-picker-delete-${asset.id}`),
});
setAssets((current) => current.filter((entry) => entry.id !== asset.id));
setNotice(`${asset.assetKey} 을(를) 삭제했습니다.`);
} catch (error) {
setNotice(
isStudioGatewayError(error)
? error.problem.detail
: "삭제하지 못했습니다. 문서에서 쓰이고 있을 수 있습니다.",
);
} finally {
setRemovingId(null);
}
};
const listMessage = status === "LOADING" const listMessage = status === "LOADING"
? "Asset 목록을 불러오는 중입니다." ? "Asset 목록을 불러오는 중입니다."
: selectable.length > 0 : selectable.length > 0
@@ -155,44 +137,58 @@ export function AssetPicker({
<button type="submit">검색</button> <button type="submit">검색</button>
</div> </div>
</form> </form>
<label className="asset-picker-option"> <div className="asset-picker-toolbar">
<label className="asset-picker-kind">
<span>종류</span>
<select value={kind} onChange={(event) => setKind(event.currentTarget.value as "" | Asset["kind"])}>
<option value="">전체</option>
<option value="IMAGE">이미지</option>
<option value="DIAGRAM">도식</option>
<option value="ATTACHMENT">첨부</option>
</select>
</label>
<label className="asset-picker-option">
<input <input
type="checkbox" type="checkbox"
checked={allowZoom} checked={allowZoom}
onChange={(event) => setAllowZoom(event.currentTarget.checked)} onChange={(event) => setAllowZoom(event.currentTarget.checked)}
/> />
<span>삽입할 때 크게 보기 허용</span> <span>이미지 확대 허용</span>
</label> </label>
{notice ? <p className="studio-asset-picker-empty" role="status">{notice}</p> : null} </div>
{status === "ERROR" {status === "ERROR"
? <p className="studio-error" role="alert">Asset 목록을 불러오지 못했습니다.</p> ? <p className="studio-error" role="alert">Asset 목록을 불러오지 못했습니다.</p>
: <p className="studio-asset-picker-empty" role="status">{listMessage}</p>} : <p className="studio-asset-picker-empty" role="status">{listMessage}</p>}
{selectable.length > 0 ? <ul> {selectable.length > 0 ? <ul className="asset-picker-results">
{selectable.map((asset) => <li key={asset.id}> {selectable.map((asset) => {
<button const isImage = asset.mediaType.startsWith("image/") && Boolean(asset.publicPath);
type="button" const dimensions = asset.width && asset.height ? `${asset.width}×${asset.height}` : null;
onClick={() => onInsert(buildEvidenceDirective({ return (
assetKey: asset.assetKey, <li key={asset.id}>
alt: asset.decorative ? "" : (asset.altText ?? ""), <button
caption: "", type="button"
zoom: allowZoom && asset.mediaType.startsWith("image/"), className="asset-picker-card"
}))} aria-label={`${asset.originalFilename} (${asset.assetKey}) 삽입`}
> onClick={() => onInsert(buildEvidenceDirective({
{asset.assetKey} assetKey: asset.assetKey,
</button> alt: asset.decorative ? "" : (asset.altText ?? ""),
{/* caption: "",
문서를 쓰다가 잘못 올린 Asset 을 여기서 바로 지운다. 예전에는 Asset 화면으로 나가야 zoom: allowZoom && asset.mediaType.startsWith("image/"),
했고, 그러면 편집 중인 작업본을 떠나야 했다. 쓰이고 있는 Asset 은 서버가 거절한다. }))}
*/} >
<button <span className="asset-picker-preview" aria-hidden="true">
type="button" {isImage ? <img src={asset.publicPath ?? ""} alt="" loading="lazy" /> : <span>{asset.kind === "DIAGRAM" ? "Diagram" : asset.kind === "IMAGE" ? "Image" : "File"}</span>}
className="studio-secondary-button" </span>
disabled={removingId !== null} <span className="asset-picker-copy">
onClick={() => { void removeAsset(asset); }} <strong>{asset.originalFilename}</strong>
> <span>{[asset.kind, dimensions, byteLabel(asset.byteSize)].filter(Boolean).join(" · ")}</span>
삭제 <small>{asset.usageCount > 0 ? `${asset.usageCount}개 기록에서 사용 중` : "아직 사용되지 않음"}</small>
</button> </span>
</li>)} <span className="asset-picker-insert">삽입</span>
</button>
</li>
);
})}
</ul> : null} </ul> : null}
</div>; </div>;
} }
@@ -4124,3 +4124,758 @@ summary {
.rail-path a:hover { .rail-path a:hover {
color: var(--signal); color: var(--signal);
} }
/* ========================================================================== */
/* 2026-09 product composition pass */
/*
TechLog's information model is relational, but the public UI must not look
like a database dump. These rules establish one reading frame: narrative in
the main column, durable context in the rail, compact disclosure on mobile.
*/
/* ========================================================================== */
:root {
--body-copy: 47rem;
--reading-rail: 15.5rem;
--reading-gap: 4rem;
}
/* Home: product statement -> concrete investigation path, without a dead hero. */
.home-identity {
padding-top: 88px;
padding-bottom: 74px;
}
.home-identity .section-kicker {
margin-bottom: 18px;
}
.home-identity h1 {
margin-bottom: 20px;
font-size: clamp(42px, 4.4vw, 54px);
}
.identity-statement {
max-width: 740px;
font-size: clamp(22px, 2.2vw, 28px);
line-height: 1.5;
}
.home-identity__actions {
display: flex;
flex-wrap: wrap;
gap: 10px 28px;
margin-top: 34px;
}
.home-identity__actions a {
display: inline-flex;
min-height: 42px;
align-items: center;
gap: 8px;
color: var(--ink);
font-size: 14px;
font-weight: 650;
}
.home-identity__actions a::after {
color: var(--signal);
content: "→";
}
.home-identity__actions a:hover {
color: var(--signal);
}
.home-path {
padding-block: 50px 68px;
border-top: 1px solid var(--line-strong);
}
.home-path__intro {
display: grid;
grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.72fr);
gap: 72px;
align-items: end;
}
.home-path__intro h2 {
max-width: 620px;
margin: 10px 0 0;
font-size: clamp(28px, 3vw, 38px);
font-weight: 660;
letter-spacing: -0.045em;
line-height: 1.22;
}
.home-path__intro > p {
margin: 0;
color: var(--muted);
font-size: 15px;
line-height: 1.75;
}
.home-path__project {
display: flex;
gap: 14px;
align-items: baseline;
margin-top: 44px;
padding-bottom: 16px;
border-bottom: 1px solid var(--line-strong);
}
.home-path__project span {
color: var(--faint);
font-size: 11px;
font-weight: 650;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.home-path__project strong {
font-size: 17px;
font-weight: 650;
}
.home-path-records {
margin: 0;
padding: 0;
border-left: 0;
list-style: none;
counter-reset: none;
}
.home-path-records li {
display: grid;
grid-template-columns: 76px minmax(0, 1fr);
gap: 0 28px;
padding: 26px 0 28px;
border-bottom: 1px solid var(--line);
}
.home-path-step {
position: relative;
min-height: 100%;
}
.home-path-step::after {
position: absolute;
top: 31px;
bottom: -29px;
left: 12px;
width: 1px;
background: var(--line-strong);
content: "";
}
.home-path-records li:last-child .home-path-step::after {
display: none;
}
.home-path-step > span {
display: inline-grid;
width: 25px;
height: 25px;
place-items: center;
border: 1px solid var(--line-strong);
border-radius: 50%;
background: var(--canvas);
color: var(--muted);
font-family: "IBM Plex Mono", monospace;
font-size: 9px;
font-weight: 650;
line-height: 1;
}
.home-path-copy {
min-width: 0;
}
.home-path-records .home-path-meta {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: 0 0 5px;
color: var(--faint);
font-size: 11px;
font-weight: 650;
letter-spacing: 0.02em;
}
.home-path-records .home-path-copy > a {
color: var(--ink);
font-size: 19px;
font-weight: 630;
letter-spacing: -0.025em;
line-height: 1.45;
}
.home-path-records .home-path-copy > a:hover {
color: var(--signal);
}
.home-path-records .home-path-copy > p:last-child {
max-width: 760px;
margin: 7px 0 0;
color: var(--muted);
font-size: 14px;
line-height: 1.65;
}
/* Desktop reading chrome. Context no longer interrupts the article body. */
.context-navigator-wrap {
display: none;
}
.document-layout {
grid-template-columns: minmax(0, var(--body-copy)) minmax(13.5rem, var(--reading-rail));
gap: var(--reading-gap);
justify-content: center;
padding-bottom: 136px;
}
.document-body {
width: min(100%, var(--body-copy));
justify-self: stretch;
}
.document-toc {
top: 24px;
max-height: calc(100dvh - 48px);
overflow-y: auto;
padding-right: 4px;
scrollbar-width: thin;
}
.document-toc > nav > p,
.structured-record-toc > p {
margin: 0 0 12px;
color: var(--faint);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.document-toc a {
padding: 6px 0 6px 13px;
font-size: 12px;
line-height: 1.5;
}
.rail-context {
gap: 0;
margin-top: 24px;
padding-top: 20px;
border-top: 1px solid var(--line-strong);
}
.rail-context__eyebrow {
margin: 0 0 14px !important;
color: var(--faint);
font-size: 10px !important;
font-weight: 700 !important;
letter-spacing: 0.1em !important;
text-transform: uppercase;
}
.rail-context__location {
display: grid;
gap: 10px;
}
.rail-context__location > div {
display: grid;
grid-template-columns: 52px minmax(0, 1fr);
gap: 8px;
align-items: baseline;
}
.rail-context__location span,
.rail-context__current > span,
.rail-context__related > p,
.rail-context__related a > span {
color: var(--faint);
font-size: 10px;
font-weight: 680;
letter-spacing: 0.035em;
text-transform: uppercase;
}
.rail-context__location a,
.rail-context__location strong {
color: var(--ink-soft);
font-size: 12.5px;
font-weight: 620;
line-height: 1.5;
}
.rail-context__current {
display: grid;
gap: 6px;
margin-top: 18px;
padding: 15px 0 16px 13px;
border-left: 2px solid var(--signal);
}
.rail-context__current strong {
color: var(--ink);
font-size: 13px;
font-weight: 640;
line-height: 1.5;
}
.rail-context__related {
display: grid;
gap: 0;
margin-top: 18px;
padding-top: 16px;
border-top: 1px solid var(--line);
}
.rail-context__related > p {
margin: 0 0 5px;
}
.rail-context__related > a {
display: grid;
gap: 3px;
padding: 10px 0;
border-bottom: 1px solid var(--line);
}
.rail-context__related > a strong {
color: var(--ink-soft);
font-size: 12.5px;
font-weight: 620;
line-height: 1.5;
}
.rail-context__related > a small {
display: -webkit-box;
overflow: hidden;
color: var(--faint);
font-size: 11px;
line-height: 1.5;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
line-clamp: 2;
}
.rail-context__related > a:hover strong,
.rail-context__location a:hover {
color: var(--signal);
}
/* Question / Reference use the same main+rail composition as long-form records. */
.structured-record-layout {
display: grid;
grid-template-columns: minmax(0, var(--body-copy)) minmax(13.5rem, var(--reading-rail));
gap: var(--reading-gap);
justify-content: center;
align-items: start;
}
.structured-record-main {
min-width: 0;
}
.structured-record-rail {
position: sticky;
top: 24px;
max-height: calc(100dvh - 48px);
overflow-y: auto;
}
.structured-record-toc {
display: grid;
}
.structured-record-toc > a {
display: grid;
grid-template-columns: 27px minmax(0, 1fr);
gap: 7px;
padding: 6px 0;
color: var(--faint);
font-size: 12px;
line-height: 1.45;
}
.structured-record-toc > a > span {
color: var(--line-strong);
font-family: "IBM Plex Mono", monospace;
font-size: 9px;
}
.structured-record-toc > a:hover {
color: var(--signal);
}
/* Long-form typography: a deliberate reading measure and less oversized mobile headings. */
.case-header,
.public-document-header {
max-width: 930px;
}
.case-header h1,
.public-page-header h1,
.public-document-header h1 {
font-size: clamp(38px, 4vw, 48px);
line-height: 1.16;
}
.case-summary {
max-width: 760px;
font-size: 20px;
}
.document-body > section > p,
.document-body > section > ol,
.public-document-body p,
.public-document-body li,
.reference-purpose > p:last-child {
font-size: 17px;
line-height: 1.82;
}
.document-body h2,
.public-document-body h2,
.reference-purpose h2 {
font-size: 28px;
}
.document-relations h2,
.topic-variants h2 {
font-size: 30px;
}
/* Verification conditions are evidence, not a stray HTML disclosure. */
.case-meta-details {
margin-top: 38px;
padding: 0;
border-top: 1px solid var(--line-strong);
border-bottom: 1px solid var(--line);
}
.case-meta-details > summary {
display: grid;
grid-template-columns: 145px minmax(0, 1fr) 18px;
gap: 20px;
align-items: center;
min-height: 68px;
color: var(--ink);
font-size: 14px;
}
.case-meta-details > summary > span {
font-weight: 660;
}
.case-meta-details > summary > small {
color: var(--muted);
font-size: 13px;
font-weight: 450;
line-height: 1.5;
}
.case-meta-details > summary::after {
justify-self: end;
}
.case-meta-details .case-meta {
margin: 0;
padding: 20px 0 25px;
border-top: 1px solid var(--line);
}
/* The previous heading-to-pill mechanism approximation was visually misleading. */
.mechanism-map {
display: none;
}
/* Projects: more information, less empty row height. */
.project-index-list {
margin-top: 56px;
}
.project-index-list > li > a {
min-height: 0;
grid-template-columns: 34px minmax(0, 1fr) 18px;
gap: 22px;
padding: 27px 0 29px;
}
.project-index-title h2 {
font-size: 25px;
}
.project-index-list p {
margin-top: 8px;
margin-bottom: 13px;
line-height: 1.65;
}
.project-status-grid {
grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
margin-top: 48px;
}
.project-status-grid > div {
min-width: 0;
padding: 20px 20px 22px 0;
}
.project-status-grid > div + div {
padding-left: 20px;
}
.project-thesis {
margin-top: 62px;
}
.project-overview-section {
gap: 56px;
margin-top: 68px;
}
/* Mobile keeps context, but as a compact disclosure above the body. */
@media (max-width: 1179px) {
:root {
--reading-gap: 0px;
}
.context-navigator-wrap {
display: block;
width: min(var(--body-copy), calc(100% - 64px));
margin: 0 auto 38px;
padding: 0;
}
.context-navigator {
max-width: none;
padding: 0;
border-top: 1px solid var(--line-strong);
border-bottom: 1px solid var(--line);
border-left: 0;
}
.context-navigator > summary {
display: flex;
min-height: 52px;
align-items: center;
justify-content: space-between;
color: var(--ink-soft);
font-size: 12px;
}
.context-navigator > summary::after {
margin-left: auto;
}
.context-navigator > nav {
padding-bottom: 18px;
}
.context-siblings {
margin-top: 13px;
}
.structured-record-layout {
display: block;
}
.structured-record-rail {
display: none;
}
.public-document-page > .shell.context-navigator-wrap {
width: min(var(--body-copy), calc(100% - 64px));
}
.home-path__intro {
grid-template-columns: 1fr;
gap: 18px;
}
}
@media (max-width: 767px) {
:root {
--body-copy: 100%;
}
.home-identity {
padding-top: 56px;
padding-bottom: 54px;
}
.home-identity h1 {
font-size: 39px;
}
.identity-statement {
font-size: 21px;
line-height: 1.52;
}
.home-identity__actions {
margin-top: 24px;
}
.home-path {
padding-block: 38px 48px;
}
.home-path__intro h2 {
font-size: 28px;
}
.home-path__project {
margin-top: 32px;
}
.home-path-records li {
grid-template-columns: 42px minmax(0, 1fr);
gap: 0 12px;
padding-block: 21px 23px;
}
.home-path-step::after {
left: 11px;
bottom: -24px;
}
.home-path-records .home-path-copy > a {
font-size: 17px;
}
.case-header,
.public-index-page,
.public-document-page,
.project-page {
padding-top: 58px;
}
.case-header h1,
.public-page-header h1,
.public-document-header h1,
.project-page-header h1 {
font-size: 32px;
line-height: 1.2;
letter-spacing: -0.04em;
}
.case-summary,
.public-page-header > p:last-child,
.public-document-header > p {
font-size: 17px;
line-height: 1.68;
}
.case-snapshot {
grid-template-columns: 1fr;
margin-top: 38px;
}
.case-snapshot > div,
.case-snapshot > div + div {
padding: 22px 0 24px;
border-left: 0;
}
.case-snapshot > div + div {
border-top: 1px solid var(--line);
}
.case-meta-details > summary {
grid-template-columns: 1fr 18px;
gap: 6px 12px;
padding: 13px 0;
}
.case-meta-details > summary > small {
grid-column: 1;
grid-row: 2;
}
.case-meta-details > summary::after {
grid-column: 2;
grid-row: 1 / span 2;
}
.case-meta-details .case-meta,
.case-meta {
grid-template-columns: 1fr;
gap: 18px;
}
.context-navigator-wrap,
.public-document-page > .shell.context-navigator-wrap {
width: calc(100% - 40px);
margin-bottom: 28px;
}
.context-trail {
display: grid;
gap: 7px;
}
.context-siblings li {
padding: 10px 0;
}
.document-body h2,
.public-document-body h2,
.reference-purpose h2,
.document-relations h2,
.topic-variants h2 {
font-size: 25px;
}
.document-body > section > p,
.document-body > section > ol,
.public-document-body p,
.public-document-body li,
.reference-purpose > p:last-child {
font-size: 16.5px;
line-height: 1.78;
}
.project-index-list > li > a {
grid-template-columns: 28px minmax(0, 1fr);
gap: 13px;
padding-block: 23px 25px;
}
.project-index-list > li > a > span:last-child {
display: none;
}
.project-index-title {
display: block;
}
.project-index-title h2 {
font-size: 22px;
}
.project-index-title span {
display: inline-block;
margin-top: 8px;
}
.project-index-list dl {
grid-template-columns: 1fr;
gap: 7px;
}
.project-status-grid {
grid-template-columns: 1fr 1fr;
}
.project-status-grid > div,
.project-status-grid > div + div {
padding: 17px 12px 18px 0;
border-left: 0;
border-bottom: 1px solid var(--line);
}
}
@@ -325,3 +325,161 @@
.studio-app .studio-editor-context ul li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding-block: 4px; } .studio-app .studio-editor-context ul li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding-block: 4px; }
.studio-app .studio-editor-context ul span { color: var(--faint); font-size: 12px; line-height: 1.7; } .studio-app .studio-editor-context ul span { color: var(--faint); font-size: 12px; line-height: 1.7; }
.studio-app .studio-editor-context ul strong { color: var(--ink-soft); font-size: 14px; font-weight: 500; line-height: 1.55; } .studio-app .studio-editor-context ul strong { color: var(--ink-soft); font-size: 14px; font-weight: 500; line-height: 1.55; }
/* Asset picker is a selection surface, not an asset-management toolbar. */
.studio-app .studio-asset-dialog {
width: min(860px, calc(100% - 40px));
}
.studio-app .studio-asset-dialog__body {
padding: 26px 28px 30px;
}
.studio-app .asset-picker-search {
max-width: none;
margin-top: 20px;
}
.studio-app .asset-picker-toolbar {
display: flex;
flex-wrap: wrap;
gap: 14px 24px;
align-items: end;
justify-content: space-between;
margin-bottom: 14px;
}
.studio-app .asset-picker-kind {
display: grid;
gap: 6px;
color: var(--muted);
font-size: 12px;
font-weight: 650;
}
.studio-app .asset-picker-kind select {
min-width: 130px;
min-height: 40px;
padding: 0 34px 0 11px;
border: 1px solid var(--line-strong);
border-radius: 5px;
background: var(--paper);
color: var(--ink);
}
.studio-app .asset-picker-option {
min-height: 40px;
margin: 0;
}
.studio-app .asset-picker .asset-picker-results {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin: 18px 0 0;
padding: 0;
}
.studio-app .asset-picker-results > li {
min-width: 0;
}
.studio-app .asset-picker .asset-picker-card {
display: grid;
width: 100%;
min-height: 100px;
grid-template-columns: 90px minmax(0, 1fr) auto;
gap: 14px;
align-items: center;
padding: 10px;
border: 1px solid var(--line);
border-radius: 7px;
background: transparent;
text-align: left;
}
.studio-app .asset-picker .asset-picker-card:hover,
.studio-app .asset-picker .asset-picker-card:focus-visible {
border-color: var(--signal);
background: color-mix(in srgb, var(--signal-soft) 45%, transparent);
}
.studio-app .asset-picker-preview {
display: grid;
width: 90px;
height: 76px;
overflow: hidden;
place-items: center;
border: 1px solid var(--line);
border-radius: 5px;
background: var(--canvas);
color: var(--faint);
font-size: 11px;
font-weight: 650;
text-transform: uppercase;
}
.studio-app .asset-picker-preview img {
width: 100%;
height: 100%;
object-fit: contain;
}
.studio-app .asset-picker-copy {
display: grid;
min-width: 0;
gap: 4px;
}
.studio-app .asset-picker-copy strong {
overflow: hidden;
color: var(--ink);
font-size: 13px;
font-weight: 650;
text-overflow: ellipsis;
white-space: nowrap;
}
.studio-app .asset-picker-copy > span {
color: var(--muted);
font-size: 11px;
}
.studio-app .asset-picker-copy small {
color: var(--faint);
font-size: 11px;
}
.studio-app .asset-picker-insert {
color: var(--signal);
font-size: 12px;
font-weight: 650;
}
@media (max-width: 767px) {
.studio-app .studio-asset-dialog {
width: calc(100% - 20px);
max-height: calc(100dvh - 20px);
}
.studio-app .studio-asset-dialog__body {
padding: 20px 16px 22px;
}
.studio-app .asset-picker .asset-picker-results {
grid-template-columns: 1fr;
}
.studio-app .asset-picker .asset-picker-card {
grid-template-columns: 72px minmax(0, 1fr);
}
.studio-app .asset-picker-preview {
width: 72px;
height: 64px;
}
.studio-app .asset-picker-insert {
display: none;
}
}
@@ -377,7 +377,7 @@ describe("shared Public record renderer", () => {
벽이다. 접혀 있어도 문서에는 있어야 하므로 존재는 확인하고, 손잡이가 무엇이 들었는지 벽이다. 접혀 있어도 문서에는 있어야 하므로 존재는 확인하고, 손잡이가 무엇이 들었는지
말하는지까지 본다. 말하는지까지 본다.
*/ */
expect(screen.getByText("실험 조건 · 검증 환경과 데이터")).toBeVisible(); expect(screen.getByText("검증 환경", { selector: "summary > span" })).toBeVisible();
expect(screen.getByText("수정 중인 데이터셋")).toBeInTheDocument(); expect(screen.getByText("수정 중인 데이터셋")).toBeInTheDocument();
expect(screen.getByText(/게시 2026\.08\.14 · 마지막 검증 2030\.01\.02/)).toBeInTheDocument(); expect(screen.getByText(/게시 2026\.08\.14 · 마지막 검증 2030\.01\.02/)).toBeInTheDocument();
/* /*
@@ -388,7 +388,7 @@ describe("shared Public record renderer", () => {
1, 1,
); );
expect(screen.getByRole("navigation", { name: "이 글에서" })).toBeInTheDocument(); expect(screen.getByRole("navigation", { name: "이 글에서" })).toBeInTheDocument();
expect(screen.getByRole("navigation", { name: "지금 위치" })).toBeInTheDocument(); expect(screen.getByRole("navigation", { name: "읽기 맥락" })).toBeInTheDocument();
expect(screen.getByText("목차 · 강조 강함 코드")).toBeVisible(); expect(screen.getByText("목차 · 강조 강함 코드")).toBeVisible();
expect(screen.getByRole("link", { name: "강조 강함 코드 바로가기" })).toBeVisible(); expect(screen.getByRole("link", { name: "강조 강함 코드 바로가기" })).toBeVisible();
/* /*
@@ -398,7 +398,8 @@ describe("shared Public record renderer", () => {
묶음 이름은 대상의 종류에서 온다. 예전에는 작성자가 쓴 문장이 이 자리에 눌려 들어가 묶음 이름은 대상의 종류에서 온다. 예전에는 작성자가 쓴 문장이 이 자리에 눌려 들어가
한 줄짜리 라벨인 척했고, 그래서 문장은 문장대로 잘려 보이고 종류는 어디에도 없었다. 한 줄짜리 라벨인 척했고, 그래서 문장은 문장대로 잘려 보이고 종류는 어디에도 없었다.
*/ */
const relation = screen.getByRole("link", { name: /적용 기준\s*연결된 기준/ }); const relations = screen.getByRole("heading", { name: "다음에 읽을 것" }).closest("section");
const relation = within(relations!).getByRole("link", { name: /적용 기준\s*연결된 기준/ });
expect(relation).toHaveAttribute("href", "/references/linked"); expect(relation).toHaveAttribute("href", "/references/linked");
// 작성자가 남긴 문장은 이름이 아니라 설명 자리에 온다. // 작성자가 남긴 문장은 이름이 아니라 설명 자리에 온다.
expect(relation).not.toHaveAccessibleName(/그대로 이 기준이/); expect(relation).not.toHaveAccessibleName(/그대로 이 기준이/);
@@ -79,9 +79,8 @@ describe("TechLog consumer-visible style contract", () => {
expect(rootStyle.getPropertyValue("--ink")).toBe("#17181b"); expect(rootStyle.getPropertyValue("--ink")).toBe("#17181b");
expect(rootStyle.getPropertyValue("--signal")).toBe("#3e5cc7"); expect(rootStyle.getPropertyValue("--signal")).toBe("#3e5cc7");
expect(rootStyle.getPropertyValue("--shell")).toBe("1180px"); expect(rootStyle.getPropertyValue("--shell")).toBe("1180px");
// 42rem 은 영문 기준 측정값이었다. 한글 본문에서 좁았고, 바로 위의 유형/프로젝트 줄이 // 장문 한글 본문은 약 720~760px의 읽기 단을 기준으로 한다. 코드·표·근거 자료도 같은 단을 따른다.
// shell 전체를 쓰고 있어 대비가 더 심했다. 읽는 단 전체가 이 값 하나를 따른다. expect(rootStyle.getPropertyValue("--body-copy")).toBe("47rem");
expect(rootStyle.getPropertyValue("--body-copy")).toBe("56rem");
expect(rootStyle.color).toBe("var(--ink)"); expect(rootStyle.color).toBe("var(--ink)");
expect(rootStyle.background).toBe("var(--canvas)"); expect(rootStyle.background).toBe("var(--canvas)");
expect(bodyStyle.color).toBe("var(--ink)"); expect(bodyStyle.color).toBe("var(--ink)");