docs: sync plan with A-5 polish actually shipped (partiallyKnown filter, opacity split)

Final reviewer flagged that the plan still showed the pre-polish RecipeHint
shape and tierGroups pipeline. Update the plan code blocks to match HEAD
so future implementers see the shipped pattern (partiallyKnown field,
.filter(...) drop, undiscoveredDimStyle opacity wrapper, module-scope
MAX_UNDISCOVERED_PER_TIER).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-04 04:25:25 +09:00
parent 559ca8d934
commit 4ce2ce2614

View File

@@ -355,6 +355,7 @@ const elementMap = Object.fromEntries(elementsData.map((el) => [el.id, el]));
interface RecipeHint {
display: string;
craftableNow: boolean;
partiallyKnown: boolean; // 적어도 한 재료가 발견된 상태 — `? + ?` 카드 노출 방지용
}
function getRecipeHintForElement(
@@ -375,6 +376,7 @@ function getRecipeHintForElement(
return {
display: `${aSym} + ${bSym}`,
craftableNow: aDiscovered && bDiscovered && hasA && hasB,
partiallyKnown: aDiscovered || bDiscovered,
};
}
```
@@ -477,9 +479,13 @@ interface ElementCardProps {
`ElementsScreen` 본문에서 기존 `tierGroups` 정의를 다음으로 교체:
```ts
const MAX_UNDISCOVERED_PER_TIER = 6;
> `MAX_UNDISCOVERED_PER_TIER`는 module 상수 (예: `TIER_LABELS` 옆)에 두는 편을 권장. 게임 디자인 캡이지 런타임 상태가 아님.
```ts
// module scope
const MAX_UNDISCOVERED_PER_TIER = 6;
// ElementsScreen 함수 본문
const tierGroups = [1, 2, 3, 4, 5].map((tier) => {
const tierElements = elementsData.filter((el) => el.tier === tier);
const owned = tierElements.filter((el) => discoveredElementIds.includes(el.id));
@@ -487,6 +493,7 @@ interface ElementCardProps {
const undiscoveredWithHints = undiscovered
.map((el) => ({ el, hint: getRecipeHintForElement(el.id, discoveredElementIds, elements) }))
.filter(({ hint }) => hint?.partiallyKnown ?? false) // `? + ?` 카드 차단
.sort((a, b) => {
const aCraftable = a.hint?.craftableNow ? 1 : 0;
const bCraftable = b.hint?.craftableNow ? 1 : 0;
@@ -505,6 +512,8 @@ interface ElementCardProps {
}).filter(({ owned, undiscovered }) => owned.length > 0 || undiscovered.length > 0);
```
> 미발견 카드의 opacity 처리: 카드 wrapper 전체에 `opacity: 0.4`를 걸면 craftable hint의 파란색이 묻힘. `undiscoveredCardStyle`에서 opacity를 빼고, sprite + `???` name만 별도 wrapper(`undiscoveredDimStyle`, opacity 0.45 + flex-column 정렬)로 dim 처리. 힌트 span은 dim wrapper 바깥에 두어 full-color 유지.
기존 tierGroups 렌더링 JSX를 다음으로 교체:
```tsx