feat: UX 리뷰의 남은 네 항목을 반영한다

H2. 편집기.
7,540px 폼에 섹션으로 갈 수단이 목차도 접기도 앵커도 없었다. 화면에 실제로 있는
`section[aria-labelledby]` 를 읽어 목차를 만든다 — 목록을 손으로 적지 않으므로
섹션이 바뀌어도 이 파일은 그대로다.

미리보기가 sticky 로 문서 맨 위에 고정돼, 폼 중반에서 지금 쓰는 문단이 미리보기
어디인지 볼 방법이 없었다. 커서가 지난 마지막 `##` 을 찾아 미리보기의 같은 제목으로
옮긴다. 스크롤 비율을 맞추는 방식은 두 쪽 길이가 다르면 늘 어긋난다. 손으로 넘기는
중에는 따라가지 않는다.

반복 그룹은 접을 수 있고 순서는 끌어서 바꾼다. 「위로/아래로」는 남긴다 — 끌기는
키보드로 할 수 없고, 그것만 두면 키보드로 쓰는 사람에게서 순서 바꾸기를 빼앗는다.
대신 작게 적는다.

H3. 주제와 프로젝트를 탭으로 나눈다.
한 화면이 성격이 다른 두 엔티티를 같은 문법으로 다뤘다. 「추가」 버튼 둘이 같은
이름·같은 모양으로 한 줄에 있었고, 주제 행은 프로젝트에 맞춘 그리드라 절반이
빈칸이었다. 버튼 이름을 「주제 추가」·「프로젝트 추가」로 가르고, 프로젝트 행에서
같은 주소를 두 번 가리키던 「내용 편집」 하나를 없애고, 주제 행에 편집 버튼을 둔다.

M10. 프로필에 연락·구독 수단. 계약은 처음부터 `contacts` 를 주고 있었고 화면이
읽지 않았다 — 읽고 나서 할 수 있는 일이 하나도 없었다. 프로필이 게시 전이면 빈
목록이고 그때는 구역을 그리지 않는다.

M11. 공개 화면 HTML 에 Studio 청크 셋이 modulepreload 로 붙어 있었다. 읽기만 하는
사람이 편집기 번들을 내려받았다. 빌드에서 그 셋만 뺀다 — 공개 라우트의 미리 받기는
그대로 둔다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTnWufiY9ATv57egkKKVAV
This commit is contained in:
DongHyeonka
2026-09-09 19:27:25 +09:00
co-authored by Claude Opus 5
parent 41b6457166
commit 02fff0cd03
12 changed files with 438 additions and 28 deletions
@@ -36,6 +36,12 @@ export function TaxonomyManager() {
주제와 프로젝트는 다른 기록이 매달려 있는 자리다. 지우기 직전에 무엇이 지워지는지 이름으로
보여 주고 한 번 묻는다 — 목록에서 두 줄 아래를 눌렀다는 것을 여기서 잡는다.
*/
/*
한 화면이 성격이 다른 두 엔티티를 같은 문법으로 다루고 있었다. 만들기 폼 둘이 한 줄에 붙어
「추가」 버튼 두 개가 같은 이름·같은 모양으로 나란히 섰고, 주제 행은 프로젝트에 맞춘 그리드라
절반이 빈칸이었다. 탭으로 나눠 한 번에 한 종류만 다룬다.
*/
const [tab, setTab] = useState<"TOPIC" | "PROJECT">("TOPIC");
const [pendingDelete, setPendingDelete] = useState<
{ kind: "TOPIC"; topic: TopicEdit } | { kind: "PROJECT"; project: ProjectIndexItem } | null
>(null);
@@ -219,7 +225,39 @@ export function TaxonomyManager() {
</div>
</header>
<section className="studio-document-tools" aria-label="주제 만들기">
<div className="studio-taxonomy-tabs" role="tablist" aria-label="주제와 프로젝트">
<button
type="button"
role="tab"
id="taxonomy-tab-topic"
aria-selected={tab === "TOPIC"}
aria-controls={tab === "TOPIC" ? "taxonomy-panel" : undefined}
tabIndex={tab === "TOPIC" ? 0 : -1}
onClick={() => setTab("TOPIC")}
>
{`주제 ${topics?.length ?? 0}`}
</button>
<button
type="button"
role="tab"
id="taxonomy-tab-project"
aria-selected={tab === "PROJECT"}
aria-controls={tab === "PROJECT" ? "taxonomy-panel" : undefined}
tabIndex={tab === "PROJECT" ? 0 : -1}
onClick={() => setTab("PROJECT")}
>
{`프로젝트 ${projects?.length ?? 0}`}
</button>
</div>
<section
id="taxonomy-panel"
role="tabpanel"
aria-labelledby={tab === "TOPIC" ? "taxonomy-tab-topic" : "taxonomy-tab-project"}
className="studio-document-tools"
aria-label={tab === "TOPIC" ? "주제 만들기" : "프로젝트 만들기"}
>
{tab === "TOPIC" ? (
<form onSubmit={submitTopic}>
<label htmlFor="taxonomy-topic-name">새 주제</label>
<div>
@@ -238,10 +276,11 @@ export function TaxonomyManager() {
onChange={(event) => setTopicSlug(event.target.value)}
/>
<button type="submit" disabled={pending}>
추가
주제 추가
</button>
</div>
</form>
) : (
<form onSubmit={submitProject}>
<label htmlFor="taxonomy-project-title">새 프로젝트</label>
<div>
@@ -253,10 +292,11 @@ export function TaxonomyManager() {
onChange={(event) => setProjectTitle(event.target.value)}
/>
<button type="submit" disabled={pending}>
추가
프로젝트 추가
</button>
</div>
</form>
)}
</section>
{loading ? (
@@ -270,7 +310,7 @@ export function TaxonomyManager() {
</p>
) : null}
{!loading && topics ? (
{!loading && topics && tab === "TOPIC" ? (
<>
<p className="studio-result-count">{topics.length}개의 주제</p>
{topics.length ? (
@@ -307,6 +347,19 @@ export function TaxonomyManager() {
</div>
</dl>
<div className="studio-row-actions">
{/*
편집 진입점이 제목 링크뿐이었다. 라벨이 없어 누를 수 있는지 알 수 없었고,
그 화면에 축·논지·범위가 있다는 사실도 목록에서는 드러나지 않았다 —
프로젝트 행과 같은 격으로 버튼을 둔다.
*/}
{topic.id ? (
<GuardedStudioLink
className="studio-secondary-button"
href={`/studio/topics/${topic.id}`}
>
편집
</GuardedStudioLink>
) : null}
<button
className="studio-secondary-button studio-danger-button"
type="button"
@@ -328,7 +381,7 @@ export function TaxonomyManager() {
</>
) : null}
{!loading && projects ? (
{!loading && projects && tab === "PROJECT" ? (
<>
<p className="studio-result-count">{projects.length}개의 프로젝트</p>
{projects.length ? (
@@ -358,20 +411,12 @@ export function TaxonomyManager() {
*/}
<dd>{visibilityLabel[project.targetVisibility] ?? project.targetVisibility}</dd>
</div>
<div>
<dt>다음</dt>
<dd>
<GuardedStudioLink href={`/studio/projects/${project.id}`}>
내용 편집
</GuardedStudioLink>
</dd>
</div>
</dl>
<div className="studio-row-actions">
{/*
「다음: 내용 편집」 을 안내하면서 정작 그 줄의 버튼은 게시 취소와 삭제뿐이라,
편집 진입점이 작은 텍스트 링크로만 있었다. 공개 프로젝트 화면이 비어 있던
이유가 여기다 — 쓰라고 안내하고 쓸 자리를 눈에 띄게 주지 않았다.
편집 진입점은 이 버튼 하나다. 예전에는 「다음: 내용 편집」 이라는 dl 칸과
이 버튼이 같은 주소를 가리키며 한 행에 150px 간격으로 두 번 나왔다 —
읽는 사람은 둘이 다른 일을 한다고 읽는다.
*/}
<GuardedStudioLink
className="studio-secondary-button"