+ {/*
+ 게시본과 작업본이 갈라져 있다는 사실. 계약이 처음부터 주고 있었는데 화면이
+ 쓰지 않아, 작성자는 "이미 게시했는데 고친 게 아직 안 나갔다"를 목록에서
+ 알 수 없었다.
+ */}
+ {item.hasUnpublishedChanges ? (
+
+
변경
+
게시 뒤 수정됨
+
+ ) : null}
수정
@@ -440,7 +428,9 @@ export function DocumentList() {
{/*
편집은 제목 링크였고 삭제만 버튼이라, 행에서 눈에 띄는 단 하나가 되돌릴 수
- 없는 동작이었다. 편집을 같은 격의 버튼으로 올리고 삭제는 그 옆에 둔다.
+ 없는 동작이었다. 편집을 같은 격의 버튼으로 올리고, 삭제는 한 겹 안으로
+ 넣는다 — 61줄짜리 목록에서 「삭제」가 61번 반복되면 그것이 이 화면의 기본
+ 동작처럼 보인다.
*/}
편집
-
+
+
+ ⋯
+
+
+
+
+
))}
diff --git a/src/features/tech-log/presentation/studio/components/studio-dashboard.tsx b/src/features/tech-log/presentation/studio/components/studio-dashboard.tsx
index 89ad3db..b2a9a27 100644
--- a/src/features/tech-log/presentation/studio/components/studio-dashboard.tsx
+++ b/src/features/tech-log/presentation/studio/components/studio-dashboard.tsx
@@ -6,17 +6,49 @@ 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";
+import { NEXT_ACTION_LABELS, nextActionHref } from "../next-action.ts";
type DocumentSummary = components["schemas"]["DocumentSummary"];
-const actionLabel = {
- CONTINUE_EDITING: "작성 계속",
- VALIDATE: "검증하기",
- FIX_VALIDATION: "오류 수정",
- CREATE_PREVIEW: "미리보기 만들기",
- PUBLISH: "게시하기",
- NONE: "게시 완료",
-} as const;
+const actionLabel = NEXT_ACTION_LABELS;
+
+/**
+ * 지금 이어서 할 일 하나.
+ *
+ *
대시보드는 숫자 넷과 목록 셋으로 "무엇이 얼마나 있는지" 를 보고하고 있었다. 보고는
+ * 필요하지만 작성자가 이 화면을 여는 이유는 보고를 읽으려는 것이 아니라 하던 일을 이어서
+ * 하려는 것이다. 그런데 그 다음 한 걸음은 세 목록 중 어딘가에 같은 크기로 섞여 있었다.
+ *
+ *
가장 최근에 손댄 것 하나를 맨 위에 세우고, 그 작업본의 다음 화면으로 바로 보낸다.
+ */
+function ContinueWorking({ item }: Readonly<{ item: DocumentSummary }>) {
+ const href = nextActionHref(item.id, item.nextAction);
+ return (
+
+
+ {`마지막 수정 ${new Date(item.updatedAt).toLocaleDateString("ko-KR", {
+ timeZone: "Asia/Seoul",
+ })} · 다음 할 일 ${NEXT_ACTION_LABELS[item.nextAction]}`}
+
+ {href ? (
+
+ {NEXT_ACTION_LABELS[item.nextAction]}
+
+ ) : null}
+
+ );
+}
function WorkRow({ item }: Readonly<{ item: DocumentSummary }>) {
return (
@@ -114,6 +146,13 @@ export function StudioDashboard() {
const writingItems = continueWriting.filter(
(item) => !VALIDATION_ACTIONS.includes(item.nextAction) && !readyIds.has(item.id),
);
+ /*
+ 이어서 할 것 하나. 아직 할 일이 남은 작업본 중 가장 최근에 손댄 것이다 — 「완료」는 더
+ 이어서 할 것이 없으므로 뺀다.
+ */
+ const continueItem = [...continueWriting]
+ .filter((item) => item.nextAction !== "NONE")
+ .sort((left, right) => right.updatedAt.localeCompare(left.updatedAt))[0];
return (
@@ -146,6 +185,10 @@ export function StudioDashboard() {
위 내비게이션으로 돌아가 다시 눌러야 했다 — 대시보드가 세어 준 것과 그것을 볼 수
있는 곳이 이어져 있지 않았다.
*/}
+ {/*
+ 보고보다 이어서 하기가 먼저다. 가장 최근에 손댄 작업본 하나를 맨 위에 세운다.
+ */}
+ {continueItem ? : null}
전체 작업본
diff --git a/src/features/tech-log/presentation/studio/components/studio-header.tsx b/src/features/tech-log/presentation/studio/components/studio-header.tsx
index 7d4e47e..6e70869 100644
--- a/src/features/tech-log/presentation/studio/components/studio-header.tsx
+++ b/src/features/tech-log/presentation/studio/components/studio-header.tsx
@@ -21,9 +21,31 @@ const activeRules: Readonly boolean>> =
TECH_LOG_STUDIO_DOCUMENT_NEW: (path) => path === "/studio/documents/new",
});
+/**
+ * 어느 일에 속한 화면인가.
+ *
+ *
여섯 자리가 같은 무게로 늘어서 있었다. 「작업본」과 「릴리즈」가 같은 크기로 나란하면
+ * 어디부터 봐야 하는지를 화면이 말해 주지 않는다 — 정보 구조가 평평해 보이는 것이 그 때문이다.
+ *
+ *
글을 쓰는 일, 구조를 손보는 일, 자료를 관리하는 일, 내보내는 일 넷으로 묶는다. 계약이
+ * 이름과 순서를 갖고 있으므로 여기서는 묶음만 정한다 — `Record<…>` 라 계약에 탐색 항목이
+ * 늘면 컴파일러가 빈 자리를 잡는다.
+ */
+const GROUP_OF: Record = {
+ TECH_LOG_STUDIO_DOCUMENTS: "작업",
+ TECH_LOG_STUDIO_DOCUMENT_NEW: "작업",
+ TECH_LOG_STUDIO_TAXONOMY: "구조",
+ TECH_LOG_STUDIO_ASSETS: "자료",
+ TECH_LOG_STUDIO_PUBLICATIONS: "게시",
+ TECH_LOG_STUDIO_RELEASES: "게시",
+};
+
+const GROUP_ORDER = ["작업", "구조", "자료", "게시"] as const;
+
const navigation = techLogNavigation("STUDIO").map((entry) => ({
href: entry.path,
label: entry.label,
+ group: GROUP_OF[entry.routeId] ?? "작업",
active: activeRules[entry.routeId] ?? ((path: string) => path === entry.path),
}));
@@ -33,17 +55,28 @@ function StudioNavigation({
}: Readonly<{ currentPath: string; label: string }>) {
return (
);
}
diff --git a/src/features/tech-log/presentation/studio/next-action.ts b/src/features/tech-log/presentation/studio/next-action.ts
new file mode 100644
index 0000000..d56ba01
--- /dev/null
+++ b/src/features/tech-log/presentation/studio/next-action.ts
@@ -0,0 +1,38 @@
+import type { components } from "../../contracts/studio/generated.ts";
+
+type NextAction = components["schemas"]["DocumentSummary"]["nextAction"];
+
+/**
+ * 서버가 알려 주는 "다음에 할 일" 의 이름과 갈 곳.
+ *
+ *
이름만 있고 갈 곳이 없던 동안 작성자는 편집 → 검증 → 미리보기 → 게시를 순서대로 밟아야만
+ * 게시 화면에 닿을 수 있었고, 그 경로 어디에도 「게시」라는 말이 먼저 보이지 않아 게시하는
+ * 방법을 알기 어려웠다.
+ *
+ *
표가 대시보드와 목록 두 곳에 따로 있었다. `Record` 한 벌로 모은다 — 상태가
+ * 늘면 컴파일러가 빈 자리를 잡고, 두 화면이 같은 상태를 다른 이름으로 부르는 일도 없어진다.
+ */
+export const NEXT_ACTION_LABELS: Record = {
+ CONTINUE_EDITING: "작성 계속",
+ VALIDATE: "검증하기",
+ FIX_VALIDATION: "오류 수정",
+ CREATE_PREVIEW: "미리보기",
+ PUBLISH: "게시하기",
+ NONE: "완료",
+};
+
+/** 작업본 주소 뒤에 붙는 조각. 빈 문자열이면 더 갈 곳이 없다는 뜻이다. */
+export const NEXT_ACTION_STEP: Record = {
+ CONTINUE_EDITING: "edit",
+ VALIDATE: "validation",
+ FIX_VALIDATION: "edit",
+ CREATE_PREVIEW: "preview",
+ PUBLISH: "publish",
+ NONE: "",
+};
+
+/** 이 작업본에서 다음으로 갈 화면. 갈 곳이 없으면 `null`. */
+export function nextActionHref(documentId: string, action: NextAction): string | null {
+ const step = NEXT_ACTION_STEP[action];
+ return step ? `/studio/documents/${documentId}/${step}` : null;
+}
diff --git a/src/features/tech-log/presentation/styles/studio.css b/src/features/tech-log/presentation/styles/studio.css
index acb07e3..6e40e60 100644
--- a/src/features/tech-log/presentation/styles/studio.css
+++ b/src/features/tech-log/presentation/styles/studio.css
@@ -435,3 +435,36 @@
.studio-app .studio-taxonomy-tabs button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 17px; background: #f0f0ed; color: var(--muted); font: inherit; font-size: 14px; font-weight: 560; }
.studio-app .studio-taxonomy-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; font-weight: 650; }
.studio-app .studio-taxonomy-tabs button:hover:not([aria-selected="true"]) { color: var(--ink); }
+
+/*
+ 탐색을 넷으로 묶는다 — 글을 쓰는 일, 구조를 손보는 일, 자료를 관리하는 일, 내보내는 일.
+ 여섯 자리가 같은 무게로 늘어서 있으면 어디부터 봐야 하는지를 화면이 말해 주지 않는다.
+*/
+.studio-app .studio-nav-group { display: inline-flex; align-items: center; gap: 15px; }
+.studio-app .studio-nav-group + .studio-nav-group { padding-left: 26px; border-left: 1px solid var(--line); }
+.studio-app .studio-nav-group-label { color: var(--faint); font-size: 11px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; }
+.studio-app .studio-desktop-navigation nav,
+.studio-app .studio-mobile-navigation nav { gap: 0; }
+
+@media (max-width: 899px) {
+ .studio-app .studio-mobile-navigation nav { flex-direction: column; align-items: flex-start; gap: 6px; }
+ .studio-app .studio-nav-group { width: 100%; flex-wrap: wrap; }
+ .studio-app .studio-nav-group + .studio-nav-group { padding-left: 0; padding-top: 10px; border-left: 0; border-top: 1px solid var(--line); }
+}
+
+/* 이어서 하기 — 보고보다 다음 한 걸음이 먼저다 */
+.studio-app .studio-continue { padding-block: 30px 34px; border-bottom: 1px solid var(--line-strong); }
+.studio-app .studio-continue h2 { margin: 9px 0 0; font-size: 25px; font-weight: 650; letter-spacing: -0.028em; line-height: 1.3; }
+.studio-app .studio-continue h2 a { color: var(--ink); }
+.studio-app .studio-continue h2 a:hover { color: var(--signal); }
+.studio-app .studio-continue-where { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
+.studio-app .studio-continue-state { margin: 5px 0 0; color: var(--faint); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
+.studio-app .studio-continue .studio-primary-action { margin-top: 18px; }
+
+/* 행의 추가 동작 — 되돌릴 수 없는 것을 한 겹 안에 둔다 */
+.studio-app .studio-row-overflow { position: relative; }
+.studio-app .studio-row-overflow > summary { display: inline-flex; min-width: 34px; min-height: 34px; align-items: center; justify-content: center; border-radius: 5px; color: var(--muted); cursor: pointer; font-size: 15px; list-style: none; }
+.studio-app .studio-row-overflow > summary::-webkit-details-marker { display: none; }
+.studio-app .studio-row-overflow > summary:hover { background: var(--canvas); color: var(--ink); }
+.studio-app .studio-row-overflow > div { position: absolute; z-index: 5; top: 100%; right: 0; padding: 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); box-shadow: 0 6px 18px rgb(0 0 0 / 8%); }
+.studio-app .studio-unpublished-mark { color: var(--warning); }
diff --git a/tests/features/tech-log/studio-shell-smoke.test.tsx b/tests/features/tech-log/studio-shell-smoke.test.tsx
index 1d8c61d..99ed930 100644
--- a/tests/features/tech-log/studio-shell-smoke.test.tsx
+++ b/tests/features/tech-log/studio-shell-smoke.test.tsx
@@ -91,15 +91,26 @@ describe("TechLog Studio shell", () => {
container.querySelectorAll(".studio-desktop-navigation a"),
(link) => [link.textContent, link.getAttribute("href")],
),
+ /*
+ 탐색은 넷으로 묶인다 — 글을 쓰는 일, 구조를 손보는 일, 자료를 관리하는 일, 내보내는 일.
+ 여섯 자리가 같은 무게로 늘어서 있으면 어디부터 봐야 하는지를 화면이 말해 주지 않는다.
+ 항목과 주소는 계약이 정하고 여기서는 묶음 순서만 바뀐다.
+ */
).toEqual([
["작업본", "/studio/documents"],
- ["게시 기록", "/studio/publications"],
["새 문서", "/studio/documents/new"],
["주제·프로젝트", "/studio/taxonomy"],
["Asset", "/studio/assets"],
+ ["게시 기록", "/studio/publications"],
["릴리즈", "/studio/releases"],
["공개 사이트 보기", "/"],
]);
+ expect(
+ Array.from(
+ container.querySelectorAll(".studio-desktop-navigation .studio-nav-group-label"),
+ (label) => label.textContent,
+ ),
+ ).toEqual(["작업", "구조", "자료", "게시"]);
expect(screen.getByRole("link", { name: "공개 사이트 보기" })).toHaveAttribute("href", "/");
expect(screen.queryByText(/로그인|sign in/i)).not.toBeInTheDocument();