fix: UX 리뷰의 출시 차단 다섯 건을 고친다
B1. 검증·미리보기 화면이 CSS 없이 배포됐다. `workflow.module.css` 를 import 하는 파일이 하나도 없었고, Vite 의 CSS Module 은 import 되어야 번들에 들어간다. 제목이 62px 가 아니라 16px 로 나왔고 미리보기의 링크 두 개가 공백 없이 붙었다. 규칙이 전부 `:global()` 이었으므로 모듈일 이유가 없다 — studio.css 로 옮겼다. B2. Asset 라이브러리에 스타일이 없고 진입 경로도 없었다. 네 클래스에 규칙이 하나도 없어 key·상태·사용 수가 공백 없이 이어 붙었다. 스무 개짜리 목록에 썸네일도 없어 무엇을 고르는지 눌러 봐야 알았다. 내비게이션에도 없어서 URL 을 직접 쳐야 닿았다 — "정리하는 화면" 에 정리하러 갈 길이 없었다. B3. 삭제에 확인이 없었다. 문서·주제·프로젝트·릴리즈·Asset 전부 한 번에 영구 삭제였고, 그 「삭제」가 행에서 시각적으로 가장 강한 요소였다(16px/600 빨강). 정작 그 행에서 해야 할 일인 「검증하기」는 13px/400 이었다. 확인 창을 하나 만들어 다섯 곳에 붙이고, 행의 우선순위를 되돌렸다. B4(일부). robots.txt 가 광고하던 sitemap 이 404 였다. 무엇이 게시됐는지는 서버만 알므로 정적 파일이 아니라 조회로 만든다(백엔드 커밋 참조). robots.txt 가 그 주소를 가리키게 했다. B5. 라우트 프리픽스 밖 URL 이 nginx 의 맨 `Not Found` 로 끝났다. 404 상태는 그대로 두고 — 크롤러에게 링크가 깨졌다고 말하는 것이 그것이다 — 본문만 앱을 주도록 `error_page 404 @not_found` 를 뒀다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PTnWufiY9ATv57egkKKVAV
This commit is contained in:
co-authored by
Claude Opus 5
parent
28dce83398
commit
bb6eba00db
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useId, useRef, useState, type FormEvent } from "react";
|
||||
import { DestructiveConfirmDialog } from "./destructive-confirm-dialog.tsx";
|
||||
|
||||
import type { Asset, AssetDetail } from "../../../contracts/studio/contract.ts";
|
||||
import type { StudioAssetGateway } from "../../../application/ports/studio-asset-gateway.ts";
|
||||
@@ -41,6 +42,7 @@ export function AssetLibrary(props: Readonly<{ gateway: StudioAssetGateway }>) {
|
||||
const [selected, setSelected] = useState<AssetDetail | null>(null);
|
||||
const [pending, setPending] = useState(false);
|
||||
const [notice, setNotice] = useState("");
|
||||
const [confirmDelete, setConfirmDelete] = useState(false);
|
||||
// Wrapped in an object, not a bare `string | null`: the "no appended row to
|
||||
// land on" case still needs a focus move (to the page heading), and a bare
|
||||
// null cannot express "a move is pending, target unknown".
|
||||
@@ -216,6 +218,7 @@ export function AssetLibrary(props: Readonly<{ gateway: StudioAssetGateway }>) {
|
||||
});
|
||||
setAssets((current) => current.filter((item) => item.id !== detail.asset.id));
|
||||
setNotice("삭제했습니다.");
|
||||
setConfirmDelete(false);
|
||||
closeDetailAfterRemoval();
|
||||
} catch (error) {
|
||||
setNotice(
|
||||
@@ -253,8 +256,12 @@ export function AssetLibrary(props: Readonly<{ gateway: StudioAssetGateway }>) {
|
||||
</form>
|
||||
</section>
|
||||
|
||||
{/*
|
||||
확인 창이 열려 있는 동안에는 같은 문구를 창 안에서만 말한다. 두 벌이 화면에 남으면 읽는
|
||||
사람은 무엇이 방금 일어난 일인지 고르게 된다.
|
||||
*/}
|
||||
<p role="status" aria-live="polite">
|
||||
{notice}
|
||||
{confirmDelete ? "" : notice}
|
||||
</p>
|
||||
|
||||
{listStatus === "LOADING" ? (
|
||||
@@ -292,6 +299,21 @@ export function AssetLibrary(props: Readonly<{ gateway: StudioAssetGateway }>) {
|
||||
<ul className="asset-library-list">
|
||||
{assets.map((asset) => (
|
||||
<li key={asset.id}>
|
||||
{/*
|
||||
key 만 있던 동안 이 목록은 "무엇을 고르는지" 를 말해 주지 못했다. Asset 이 스무
|
||||
개면 key 스무 줄이고, 그중 어느 것이 찾던 도식인지는 눌러 봐야 알았다.
|
||||
썸네일은 그 왕복을 없앤다.
|
||||
|
||||
주소가 없거나(업로드 처리 중) 그림이 아닌 것(첨부파일)에는 자리를 만들지 않는다 —
|
||||
빈 상자가 남으면 목록이 어긋나 보인다.
|
||||
*/}
|
||||
{asset.publicPath && asset.mediaType.startsWith("image/") ? (
|
||||
<img src={asset.publicPath} alt="" loading="lazy" />
|
||||
) : (
|
||||
<span className="asset-library-list__glyph" aria-hidden="true">
|
||||
{asset.kind === "ATTACHMENT" ? "파일" : "—"}
|
||||
</span>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
ref={(node) => {
|
||||
@@ -338,8 +360,12 @@ export function AssetLibrary(props: Readonly<{ gateway: StudioAssetGateway }>) {
|
||||
<p>사용 중인 문서가 없습니다.</p>
|
||||
)}
|
||||
<div className="asset-detail-actions">
|
||||
{/*
|
||||
삭제는 되돌릴 수 없다. 보관은 목록에서 내리는 것뿐이라 묻지 않는다 — 둘을 같은
|
||||
무게로 다루면 확인 창이 곧 습관이 되어 진짜 삭제도 그냥 지나간다.
|
||||
*/}
|
||||
{canHardDelete(selected) ? (
|
||||
<button type="button" disabled={pending} onClick={() => void remove(selected)}>
|
||||
<button type="button" disabled={pending} onClick={() => setConfirmDelete(true)}>
|
||||
삭제
|
||||
</button>
|
||||
) : (
|
||||
@@ -353,6 +379,20 @@ export function AssetLibrary(props: Readonly<{ gateway: StudioAssetGateway }>) {
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
<DestructiveConfirmDialog
|
||||
open={confirmDelete && selected !== null}
|
||||
pending={pending}
|
||||
title="Asset을 삭제합니다"
|
||||
targetName={selected?.asset.assetKey ?? ""}
|
||||
description="본문이 이 key로 가리키던 그림 자리는 빈 채로 남습니다."
|
||||
// 닫혀 있을 때도 children 은 DOM 에 남는다. 화면의 알림과 같은 문구가 두 벌 생기지
|
||||
// 않도록 열려 있을 때만 넘긴다.
|
||||
error={confirmDelete ? notice : ""}
|
||||
onCancel={() => setConfirmDelete(false)}
|
||||
onConfirm={() => {
|
||||
if (selected) void remove(selected);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user