refactor: POP 디자인 감사 + WYSIWYG 정렬 + MES/장바구니 분리 + 장바구니 코드 제거

POP 컴포넌트 전반의 디자인 일관성을 확보하고, 디자이너-뷰어 간 WYSIWYG를
달성하며, MES 공정흐름 컴포넌트에서 장바구니 코드를 완전 분리한다.
[POP 디자인 종합 감사]
- PopRenderer 고스트 보더 제거 (border-2 bg-white -> 투명 래퍼)
- 하드코딩 배경색 -> CSS 변수 hsl(var(--background))
- 빈 상태 메시지 border-dashed bg-muted/30 제거
- 콘텐츠 컴포넌트만 선택적 보더 (rounded-lg border-border/40 bg-card)
[뷰어-디자이너 WYSIWYG 통일]
- PopRenderer 행 높이: 디자이너/뷰어 모두 고정 24px (minmax 제거)
- page.tsx mx-auto + maxWidth 제거 -> 뷰어 전체 폭 채움
- pop-icon 셀 내 스케일링 (maxWidth/maxHeight 100% + aspectRatio)
- pop-icon 라벨 표시 + 배경 투명/아이콘 색상 설정 UI 추가
- pop-profile 반응형, pop-button 오버플로 클리핑
[마키(흐르는 텍스트) 추가]
- pop-text에 marquee 옵션 (marqueeSpeed, marqueeIcon 설정)
- CSS animation + paddingRight 100vw 연속 스크롤
[컴포넌트 이름 명확화]
- pop-card-list-v2: "카드 목록 V2" -> "MES 공정흐름"
- pop-card-list: "카드 목록" -> "장바구니 목록"
[MES 공정흐름에서 장바구니 코드 완전 제거]
- PopCardListV2Component: useCartSync, parseCartRow, isCartListMode,
  selectedKeys, cartRef, cart 이벤트 3개, fetchCartData,
  handleDeleteItem/UpdateQuantity/CartAdd/Cancel/Delete 제거 (~250줄)
- cell-renderers: CartButtonCell, DynamicLucideIcon, ShoppingCart 제거 (~50줄)
- PopCardListV2Config: cart-button 셀 편집 UI 제거
- index.tsx: cart_updated/cart_save_completed/selected_items/
  cart_save_trigger/confirm_trigger 이벤트 메타 제거
- migrate.ts: cartAction/cartListMode 마이그레이션 제거
- types.ts: PopCardListV2Config cartAction/cartListMode 필드,
  CardCellDefinitionV2 cart 4필드, CardCellType "cart-button" 제거
- pop-card-list(장바구니 목록)의 타입/훅은 그대로 유지
- 매 Phase마다 tsc --noEmit 검증, 신규 에러 0건
This commit is contained in:
SeongHyun Kim
2026-03-20 16:31:25 +09:00
parent 73674385be
commit 461ff6dbf7
17 changed files with 265 additions and 430 deletions

View File

@@ -70,8 +70,8 @@ const COMPONENT_TYPE_LABELS: Record<string, string> = {
"pop-text": "텍스트",
"pop-icon": "아이콘",
"pop-dashboard": "대시보드",
"pop-card-list": "카드 목록",
"pop-card-list-v2": "카드 목록 V2",
"pop-card-list": "장바구니 목록",
"pop-card-list-v2": "MES 공정흐름",
"pop-field": "필드",
"pop-button": "버튼",
"pop-string-list": "리스트 목록",

View File

@@ -41,13 +41,13 @@ const PALETTE_ITEMS: PaletteItem[] = [
},
{
type: "pop-card-list",
label: "카드 목록",
label: "장바구니 목록",
icon: LayoutGrid,
description: "테이블 데이터를 카드 형태로 표시",
},
{
type: "pop-card-list-v2",
label: "카드 목록 V2",
label: "MES 공정흐름",
icon: LayoutGrid,
description: "슬롯 기반 카드 (CSS Grid + 셀 타입별 렌더링)",
},

View File

@@ -75,8 +75,8 @@ const COMPONENT_TYPE_LABELS: Record<PopComponentType, string> = {
"pop-text": "텍스트",
"pop-icon": "아이콘",
"pop-dashboard": "대시보드",
"pop-card-list": "카드 목록",
"pop-card-list-v2": "카드 목록 V2",
"pop-card-list": "장바구니 목록",
"pop-card-list-v2": "MES 공정흐름",
"pop-button": "버튼",
"pop-string-list": "리스트 목록",
"pop-search": "검색",
@@ -145,13 +145,9 @@ export default function PopRenderer({
return Math.max(10, maxRowEnd + 3);
}, [components, overrides, mode, hiddenIds]);
// V6: CSS Grid - 열은 1fr(뷰포트 꽉 채움), 행은 고정 BLOCK_SIZE
const rowTemplate = isDesignMode
? `repeat(${dynamicRowCount}, ${BLOCK_SIZE}px)`
: `repeat(${dynamicRowCount}, minmax(${BLOCK_SIZE}px, auto))`;
const autoRowHeight = isDesignMode
? `${BLOCK_SIZE}px`
: `minmax(${BLOCK_SIZE}px, auto)`;
// V6: CSS Grid - 열은 1fr(뷰포트 꽉 채움), 행은 고정 BLOCK_SIZE (디자이너/뷰어 동일 = WYSIWYG)
const rowTemplate = `repeat(${dynamicRowCount}, ${BLOCK_SIZE}px)`;
const autoRowHeight = `${BLOCK_SIZE}px`;
const gridStyle = useMemo((): React.CSSProperties => ({
display: "grid",
@@ -161,7 +157,7 @@ export default function PopRenderer({
gap: `${finalGap}px`,
padding: `${finalPadding}px`,
minHeight: "100%",
backgroundColor: "#ffffff",
backgroundColor: "hsl(var(--background))",
position: "relative",
}), [columns, finalGap, finalPadding, dynamicRowCount, rowTemplate, autoRowHeight]);
@@ -296,11 +292,20 @@ export default function PopRenderer({
);
}
// 뷰어 모드: 드래그 없는 일반 렌더링 (overflow visible로 컨텐츠 확장 허용)
// 콘텐츠 영역 컴포넌트는 라운드 테두리 표시
const contentTypes = new Set([
"pop-dashboard", "pop-card-list", "pop-card-list-v2",
"pop-string-list", "pop-work-detail", "pop-sample",
]);
const needsBorder = contentTypes.has(comp.type);
return (
<div
key={comp.id}
className="relative overflow-hidden rounded-lg border-2 border-border bg-white transition-all z-10"
className={cn(
"relative overflow-hidden transition-all z-10",
needsBorder && "rounded-lg border border-border/40 bg-card"
)}
style={positionStyle}
>
<ComponentContent