refactor(design): 요청문과 설명문을 텍스트 역할 토큰으로 가른다

"한 장씩 봐 주세요" 같은 요청문이 읽고 넘어가는 설명문과 같은 무게로 놓여 있어
지나치기 쉬웠다. 역할별 토큰과 클래스를 두고 화면에 적용한다.

  .ui-ask   요청문. 사람이 무엇을 해야 하는지 말하는 문장 (17px·600·인디고)
  .ui-ask-block  문단으로 서는 요청문. 왼쪽 규칙선으로 설명과 구분한다
  .ui-body  설명 본문 (16px·slate-600)
  .ui-note  보조·출처 (14px·slate-400)

크기는 기존 화면을 세어 맞췄다. text-base 167회·text-sm 58회가 지배적이라
body 를 16px, note 를 14px 로 두면 치환해도 크기가 변하지 않고 역할과 색만 정리된다.

한글 줄바꿈: word-break keep-all 로 어절을 지키고, 긴 URL·영문 토큰만
overflow-wrap anywhere 로 자른다. text-wrap 으로 마지막 줄에 한 어절만 남는 것을
줄이고, 62ch 로 줄 길이를 묶는다. 제목에도 keep-all 과 balance 를 건다.

다크 섹션은 .on-dark 로 값을 뒤집고, 그 안의 흰 카드는 .on-light 로 되돌린다.
이걸 두지 않으면 흰 글씨가 흰 배경에 얹혀 보이지 않는다(디자인 시스템 기록된 실수).

사진 확인 화면의 썸네일 줄이 누를 수 있는 것으로 안 읽혀 같이 고친다. 72px 카드,
호버 반응, 순번 배지, 현재 위치 표시, 안 정한 것 아래 띠, 범례, 이전·다음 이동을 둔다.
상태가 안 보이는 것이 크기보다 큰 문제였다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Opus 5 committed 2026-09-18 16:56:52 +09:00
1 parent be1ea72fcc
commit 14c4b82155
18 files changed
+264 -106

No files matched your search

+102 -36
View File
@@ -116,7 +116,7 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
if (loading) {
return (
<section className="bg-white py-20 px-6">
<section className="on-light bg-white py-20 px-6">
<div className="max-w-7xl mx-auto"><p className="text-slate-500">사진을 불러오는 중입니다.</p></div>
</section>
);
@@ -124,10 +124,10 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
if (!items.length || !previewUrl) {
return (
<section className="bg-white py-20 px-6 [word-break:keep-all]">
<div className="max-w-3xl mx-auto bg-white border border-slate-200 rounded-2xl p-8 shadow-[3px_4px_12px_rgba(0,0,0,0.06)]">
<section className="on-light bg-white py-20 px-6 [word-break:keep-all]">
<div className="on-light max-w-3xl mx-auto bg-white border border-slate-200 rounded-2xl p-8 shadow-[3px_4px_12px_rgba(0,0,0,0.06)]">
<h2 className="font-bold text-xl text-primary-900 mb-2">아직 확인하실 사진이 없습니다</h2>
<p className="text-[17px] leading-[1.75] text-slate-600">
<p className="ui-body">
{loadError
? `자료를 불러오지 못했습니다. ${loadError}`
: !previewUrl
@@ -140,19 +140,22 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
}
return (
<section className="bg-white py-16 md:py-20 px-6 [word-break:keep-all]">
<section className="on-light bg-white py-16 md:py-20 px-6 [word-break:keep-all]">
<div className="max-w-7xl mx-auto">
{/* 진행 */}
<div className="flex flex-wrap items-end justify-between gap-4 mb-3">
<div>
<h2 className="font-serif text-3xl md:text-4xl font-bold text-[#0A1128]">Photo Check</h2>
<p className="text-[17px] leading-[1.75] text-slate-600 mt-2 max-w-[62ch]">
홈페이지에서 모은 사진 {items.length}장입니다. 서포터즈 사이트에 실어도 괜찮은 사진인지 한 장씩 봐 주세요.
{build?.report?.images?.used ? ` 이 중 ${build.report.images.used}장이 지금 사이트에 실립니다.` : ''}
<p className="ui-ask ui-ask-block mt-3">
홈페이지에서 모은 사진 {items.length}장입니다.{' '}
서포터즈 사이트에 실어도 괜찮은 사진인지 한 장씩 봐 주세요.
</p>
{build?.report?.images?.used ? (
<p className="ui-body mt-2">이 중 {build.report.images.used}장이 지금 사이트에 실립니다.</p>
) : null}
</div>
<div className="text-right shrink-0">
<p className="text-sm text-slate-500">확인</p>
<p className="ui-note">확인</p>
<p className="text-2xl font-bold text-[#1D0024]">{decidedCount}<span className="text-slate-400 text-lg"> / {items.length}</span></p>
</div>
</div>
@@ -174,7 +177,7 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -10 }}
transition={{ duration: 0.22 }}
className="bg-white rounded-2xl border border-slate-100 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] overflow-hidden"
className="on-light bg-white rounded-2xl border border-slate-100 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] overflow-hidden"
>
<div className="bg-slate-50 flex items-center justify-center p-4">
<img
@@ -189,11 +192,11 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
<RoleBadge role={current.role} />
<span className="text-xs font-semibold px-2.5 py-1 rounded-full bg-slate-100 text-slate-600">{CATEGORY_LABEL[current.category]}</span>
</div>
<h3 className="text-lg font-bold text-[#1D0024] mb-1.5">이 사진을 사이트에 써도 될까요?</h3>
<p className="text-[15px] leading-[1.7] text-slate-600 mb-1">
<h3 className="ui-ask text-lg mb-1.5">이 사진을 사이트에 써도 될까요?</h3>
<p className="ui-body mb-1">
{current.alt || '사진에 붙은 설명이 없습니다.'}
</p>
<p className="text-sm text-slate-500">
<p className="ui-note">
출처 {current.pages[0] ?? '홈페이지'}{current.pages.length > 1 ? ` 외 ${current.pages.length - 1}곳` : ''}
{' · '}
<a href={current.sourceUrl} target="_blank" rel="noreferrer" className="inline-flex items-center gap-1 underline underline-offset-4 text-slate-500">
@@ -224,14 +227,25 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
>
<CrossFilled size={16} /> 빼 주세요
</button>
<button
type="button"
onClick={() => setCursor((c) => Math.max(c - 1, 0))}
disabled={cursor === 0}
className="rounded-full px-5 py-3 text-base font-semibold text-slate-500 disabled:opacity-40"
>
이전
</button>
<div className="flex items-center gap-1 ml-auto">
<button
type="button"
onClick={() => setCursor((c) => Math.max(c - 1, 0))}
disabled={cursor === 0}
className="rounded-full px-4 py-3 text-base font-semibold text-slate-600 hover:bg-slate-100 disabled:opacity-40 disabled:hover:bg-transparent"
>
이전
</button>
<span className="text-sm text-slate-400 tabular-nums px-1">{cursor + 1} / {items.length}</span>
<button
type="button"
onClick={() => setCursor((c) => Math.min(c + 1, items.length - 1))}
disabled={cursor === items.length - 1}
className="rounded-full px-4 py-3 text-base font-semibold text-slate-600 hover:bg-slate-100 disabled:opacity-40 disabled:hover:bg-transparent"
>
다음
</button>
</div>
</div>
</div>
</motion.div>
@@ -239,49 +253,101 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
{/* 전체 훑기 */}
<div className="mt-6">
<p className="text-sm text-slate-500 mb-2">전체 {items.length}장 · 눌러서 이동</p>
<div className="flex flex-wrap gap-2">
<div className="flex items-baseline justify-between gap-3 mb-3">
<h3 className="text-base font-bold text-[#1D0024]">다른 사진으로 이동</h3>
<p className="ui-note">
{items.length - decidedCount > 0
? <>아직 <strong className="text-[#1D0024]">{items.length - decidedCount}장</strong>이 남았습니다</>
: '모두 확인하셨습니다'}
</p>
</div>
<div className="flex flex-wrap gap-2.5">
{items.map((i, idx) => {
const d = decisions[i.id];
const isCur = idx === cursor;
return (
<button
key={i.id}
type="button"
onClick={() => setCursor(idx)}
aria-label={`${idx + 1}번째 사진`}
className={`relative w-14 h-14 rounded-lg overflow-hidden border-2 transition-colors ${
idx === cursor ? 'border-[#6C5CE7]' : d === 'exclude' ? 'border-[#D4889A]' : d === 'use' ? 'border-[#9B8AD4]' : 'border-slate-200'
}`}
aria-label={`${idx + 1}번째 사진으로 이동${d ? (d === 'use' ? ', 사용으로 정함' : ', 빼기로 정함') : ', 아직 안 정함'}`}
aria-current={isCur ? 'true' : undefined}
title={i.alt || `${idx + 1}번째 사진`}
className={`group relative w-[72px] h-[72px] rounded-xl overflow-hidden bg-slate-100 cursor-pointer
transition-all duration-150 outline-none
hover:-translate-y-0.5 hover:shadow-[3px_5px_14px_rgba(0,0,0,0.14)]
focus-visible:ring-2 focus-visible:ring-[#6C5CE7] focus-visible:ring-offset-2
${isCur
? 'ring-2 ring-[#6C5CE7] ring-offset-2 shadow-[3px_4px_12px_rgba(108,92,231,0.28)]'
: 'ring-1 ring-slate-200 hover:ring-[#9B8AD4]'}`}
>
<img src={`${previewUrl}${i.src}`} alt="" className="w-full h-full object-cover" loading="lazy" />
{d === 'exclude' && <span className="absolute inset-0 bg-[#FFF0F0]/70 flex items-center justify-center text-[#7C3A4B]"><CrossFilled size={14} /></span>}
{d === 'use' && <span className="absolute bottom-0 right-0 bg-[#F3F0FF] text-[#4A3A7C] p-0.5 rounded-tl"><CheckFilled size={10} /></span>}
<img
src={`${previewUrl}${i.src}`}
alt=""
loading="lazy"
className={`w-full h-full object-cover transition-transform duration-200 group-hover:scale-[1.06]
${d === 'exclude' ? 'grayscale opacity-45' : ''}`}
/>
{/* 순번. 어디까지 봤는지 세기 쉽게 한다 */}
<span className="on-dark absolute top-1 left-1 min-w-[18px] h-[18px] px-1 rounded-md bg-[#0A1128]/65 text-white text-[11px] font-semibold leading-[18px] text-center">
{idx + 1}
</span>
{/* 정한 것 */}
{d === 'exclude' && (
<span className="absolute inset-0 flex items-center justify-center">
<span className="w-6 h-6 rounded-full bg-[#FFF0F0] border border-[#F5D5DC] text-[#7C3A4B] flex items-center justify-center">
<CrossFilled size={12} />
</span>
</span>
)}
{d === 'use' && (
<span className="absolute bottom-1 right-1 w-5 h-5 rounded-full bg-[#F3F0FF] border border-[#D5CDF5] text-[#4A3A7C] flex items-center justify-center">
<CheckFilled size={11} />
</span>
)}
{/* 아직 안 정한 것은 아래에 띠를 둬서 남은 일이 보이게 한다 */}
{!d && <span className="absolute inset-x-0 bottom-0 h-1 bg-[#D4A872]" />}
{/* 현재 보고 있는 것 */}
{isCur && (
<span className="absolute inset-x-0 bottom-0 bg-[#6C5CE7] text-white text-[10px] font-bold text-center py-0.5">
보는 중
</span>
)}
</button>
);
})}
</div>
<div className="ui-note flex flex-wrap items-center gap-x-4 gap-y-1 mt-3">
<span className="inline-flex items-center gap-1.5"><span className="w-3 h-1 rounded-full bg-[#D4A872]" /> 아직 안 정함</span>
<span className="inline-flex items-center gap-1.5"><span className="w-3.5 h-3.5 rounded-full bg-[#F3F0FF] border border-[#D5CDF5]" /> 사용</span>
<span className="inline-flex items-center gap-1.5"><span className="w-3.5 h-3.5 rounded-full bg-[#FFF0F0] border border-[#F5D5DC]" /> 빼기</span>
</div>
</div>
</div>
{/* 판단 기준 + 제출 */}
<div className="flex flex-col gap-5 lg:sticky lg:top-24">
<div className="bg-white rounded-2xl border border-slate-100 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] p-6">
<div className="on-light bg-white rounded-2xl border border-slate-100 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] p-6">
<div className="flex items-center gap-2 mb-3 text-[#7C5C3A]">
<WarningFilled size={16} />
<h3 className="text-base font-bold">이런 사진이면 빼 주세요</h3>
</div>
<ul className="flex flex-col gap-2">
{CHECKPOINTS.map((c) => (
<li key={c} className="text-[15px] leading-[1.65] text-[#1D0024] flex gap-2">
<li key={c} className="ui-body !text-[#1D0024] flex gap-2">
<span className="mt-[9px] w-1.5 h-1.5 rounded-full bg-[#D4A872] shrink-0" />
<span>{c}</span>
</li>
))}
</ul>
<p className="text-sm text-slate-500 mt-4">판단이 서지 않으면 빼는 쪽으로 봐 주세요. 나중에 다시 넣을 수 있습니다.</p>
<p className="ui-ask text-[15px] mt-4">판단이 서지 않으면 빼는 쪽으로 봐 주세요.{' '}<span className="ui-note">나중에 다시 넣을 수 있습니다.</span></p>
</div>
<div className="bg-white rounded-2xl border border-slate-100 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] p-6">
<div className="on-light bg-white rounded-2xl border border-slate-100 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] p-6">
<h3 className="text-base font-bold text-[#1D0024] mb-3">확인 결과</h3>
<dl className="flex flex-col gap-1.5 text-[15px]">
<div className="flex justify-between"><dt className="text-slate-500">사용</dt><dd className="font-bold text-[#4A3A7C]">{decidedCount - excluded.length}장</dd></div>
@@ -313,7 +379,7 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
)}
{saveError && <p className="text-sm text-[#7C3A4B] mt-3">보내지 못했습니다. {saveError}</p>}
{!done && decidedCount > 0 && !saved && (
<p className="text-sm text-slate-500 mt-3">지금 보내고 나중에 이어서 보셔도 됩니다.</p>
<p className="ui-note mt-3">지금 보내고 나중에 이어서 보셔도 됩니다.</p>
)}
</div>
@@ -322,7 +388,7 @@ export function ImageReviewPanel({ clinicId }: { clinicId: string }) {
href={previewUrl}
target="_blank"
rel="noreferrer"
className="inline-flex items-center justify-center gap-2 rounded-full bg-white border border-slate-200 text-[#021341] font-semibold px-6 py-3 text-base"
className="on-light inline-flex items-center justify-center gap-2 rounded-full bg-white border border-slate-200 text-[#021341] font-semibold px-6 py-3 text-base"
>
<EyeFilled size={15} /> 사이트 초안 열기
</a>