feat: show the way to publish, and what is blocking it, in the editor
Publishing was reachable only by walking the whole chain blind. The editor offered one link — "저장본 검증" — and the word "게시" appeared nowhere until three screens later, so an author with a finished draft could not tell how to publish it. The working-copy list already named the next step, but the name was plain text with nowhere to go. The editor now shows the whole path: 검증 → 미리보기 → 게시, each a link. The list's next step is a link to that step. Neither weakens the gates — an unvalidated document is still refused at preview, an unpreviewed one at publish. What changes is that the order stops being a secret. What is blocking publication now appears where it gets fixed. The validation report lived on its own screen, so an author read the list, navigated back, and had to remember which field each item meant. The editor shows the same issues above the fields, in red, and says plainly when they describe an older saved version rather than the current one. The clock is read during render, not captured as an effect dependency. It is a new function on every render of the provider, so depending on it refetched the document endlessly — the editor never settled, and a tab click did not even register. A value you are asking about now does not belong in a dependency array.
This commit is contained in:
@@ -25,6 +25,21 @@ const nextLabel = {
|
||||
NONE: "완료",
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* 다음 단계는 이름만 있고 갈 곳이 없었다. 작성자는 편집 → 검증 → 미리보기 → 게시를 순서대로
|
||||
* 밟아야만 게시 화면에 닿을 수 있었고, 그 경로 어디에도 "게시" 라는 말이 먼저 보이지 않아
|
||||
* 게시하는 방법을 알기 어려웠다. 서버가 이미 다음 할 일을 알려 주므로, 그 말을 그대로 링크로
|
||||
* 만든다.
|
||||
*/
|
||||
const nextHref = {
|
||||
CONTINUE_EDITING: "edit",
|
||||
VALIDATE: "validation",
|
||||
FIX_VALIDATION: "edit",
|
||||
CREATE_PREVIEW: "preview",
|
||||
PUBLISH: "publish",
|
||||
NONE: "",
|
||||
} as const;
|
||||
|
||||
function isAbortError(error: unknown): boolean {
|
||||
return error instanceof DOMException && error.name === "AbortError";
|
||||
}
|
||||
@@ -251,7 +266,17 @@ export function DocumentList() {
|
||||
</div>
|
||||
<div>
|
||||
<dt>다음</dt>
|
||||
<dd>{nextLabel[item.nextAction]}</dd>
|
||||
<dd>
|
||||
{nextHref[item.nextAction] ? (
|
||||
<GuardedStudioLink
|
||||
href={`/studio/documents/${item.id}/${nextHref[item.nextAction]}`}
|
||||
>
|
||||
{nextLabel[item.nextAction]}
|
||||
</GuardedStudioLink>
|
||||
) : (
|
||||
nextLabel[item.nextAction]
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>수정</dt>
|
||||
|
||||
Reference in New Issue
Block a user