Skip to content

[Feat] Image Box 컴포넌트 제작#12

Merged
KyeongJooni merged 22 commits into
mainfrom
feat/image-box-component-9
Jul 6, 2026
Merged

[Feat] Image Box 컴포넌트 제작#12
KyeongJooni merged 22 commits into
mainfrom
feat/image-box-component-9

Conversation

@KyeongJooni

@KyeongJooni KyeongJooni commented Jul 5, 2026

Copy link
Copy Markdown
Member

#️⃣ 연관된 이슈

Close #9

🚧 Work in Progress

  • 작업 진행 중

📌 주요 변경사항

  • 공용/도메인 컴포넌트를 컴포넌트별 폴더 구조로 재구성
  • 파트너 이미지 박스, 이미지 업로드 박스 컴포넌트 신규 추가
  • Storybook 도입으로 전체 컴포넌트 시각 확인 환경 구성
  • Tailwind 반경 토큰의 shadcn 잔재 제거로 디자인 스펙과 실제 렌더링 값 일치

📝작업 내용

  • 컴포넌트 폴더 재구성: src/components/{domain}/{ComponentName}/{ComponentName}.tsx 구조로 common/introductions/projects 전체 컴포넌트 이동, .test.tsx를 co-locate. scripts/gen-index.ts를 재귀 구조로 바꿔 깊이와 무관하게 barrel index.ts를 자동 생성
  • 파트너 이미지 박스 컴포넌트 추가: 이미지 교체/삭제 hover 오버레이 포함, Figma hover 상태 스펙 대조 확인
  • 이미지 업로드 박스 컴포넌트 추가: 숨긴 파일 input과 label/버튼으로 파일 선택 트리거
  • 이미지 박스 썸네일에 size(m/l) variant 추가
  • Storybook 설정 및 GitHub Pages 배포 workflow 추가: common/introductions/projects 전 컴포넌트에 스토리 27개 작성, hover 상태는 play 함수로 실제 상호작용 재현
  • Tailwind 반경 토큰 수정: shadcn 스캐폴딩 잔재(--radius 커스텀 계산식)가 Tailwind 기본 반경 스케일(6/8/12px)을 덮어써서 rounded-md/lg/xl이 Figma보다 2px씩 크게 렌더링되던 문제 수정
  • 미사용 shadcn 관련 설정·placeholder 파일 정리
  • 검증: pnpm type-check, pnpm lint, pnpm format:check, pnpm test, Storybook build 전부 통과

📸 스크린샷 (선택)

image image image image image image

💬리뷰 요구사항(선택)

  • ImageUploadBox는 실제 브라우저 파일 업로드 동작은 미확인입니다.
  • @kusitms.com/tokensstatus-negative/fill-destructive 색상값이 Figma와 다른 것을 발견해 .claude/known-issues/records/design-token-color-mismatch.md에 기록해뒀습니다. 이 PR에서 수정한 문제는 아니고 패키지 쪽 이슈입니다.
  • PartnerImageBox의 호버 상태에서 flip_carmera 아이콘은 assets에 없어 lucide-react 아이콘을 사용했습니다.

Summary by CodeRabbit

  • New Features
    • Storybook 환경과 주요 컴포넌트 스토리를 추가하고, 메인 브랜치 변경 시 GitHub Pages로 자동 배포합니다.
    • 이미지 업로드/미리보기/교체·삭제 UI(ImageUploadBox, PartnerImageBox)와 파일 선택 훅(useImageFileInput)을 제공합니다.
  • Breaking Changes
    • 이미지 썸네일 컴포넌트(ImageBoxThumbnail) 제거되었습니다.
  • Tests
    • 업로드·삭제·교체 동작을 검증하는 컴포넌트 테스트가 추가되었습니다.
  • Style
    • 전역 Tailwind/테마 스타일이 갱신되어 전체 화면 톤이 변경될 수 있습니다.

@github-actions github-actions Bot changed the title Feat/image box component 9 [Feat] Image Box 컴포넌트 제작 Jul 5, 2026
@github-actions github-actions Bot added the ✨Feature 새로운 기능 label Jul 5, 2026
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Storybook 배포 설정과 컴포넌트 구조가 추가·정리되었다. 재귀적 index 생성, 공통/introductions 컴포넌트의 barrel export와 스토리, 이미지 업로드·썸네일 컴포넌트 구현, 전역 스타일과 빌드 설정이 함께 갱신되었다.

Changes

Storybook 인프라 및 컴포넌트 확장

Layer / File(s) Summary
Storybook CI/설정 기반 구축
.github/workflows/deploy-storybook.yml, .storybook/main.ts, .storybook/preview.tsx, eslint.config.js, package.json, tsconfig.node.json, .gitignore, src/index.css, src/lib/tv.ts, src/lib/utils.ts
Storybook Pages 배포 워크플로우, Vite/preview 설정, ESLint 규칙, 패키지 스크립트/의존성, Storybook 타입 포함 범위, 추적 제외 항목과 전역 스타일이 추가된다.
gen-index.ts 재귀 export 생성 로직
scripts/gen-index.ts
components/hooks 하위 index.ts 생성을 재귀적 디렉터리 순회 방식으로 바꾼다.
공통 컴포넌트 import 경로 및 스토리 정리
src/components/common/{Button,Logo,PageHeader,SegmentedControl,Sidebar}/*
공통 컴포넌트의 상대 import 경로를 조정하고, barrel export와 Storybook 스토리를 추가한다.
ImageBoxThumbnail 컴포넌트 신규 도입
src/components/introductions/ImageBoxThumbnail/*
ImageBoxThumbnail 신규 컴포넌트와 스토리, barrel export를 추가한다.
ImageUploadBox 컴포넌트 신규 구현
src/hooks/**/*, src/components/introductions/ImageUploadBox/*
파일 입력 훅과 이미지 업로드/교체 UI, 관련 스토리, 테스트, barrel export가 추가된다.
PartnerImageBox 컴포넌트 신규 구현
src/components/introductions/PartnerImageBox/*
PartnerImageBox 컴포넌트, hover 스토리, 테스트, barrel export가 추가된다.
introductions 경로 정리 및 barrel export 확장
src/components/introductions/{Inputfield,IntroductionCard,PartImageCard}/*, src/components/introductions/index.ts, src/components/projects/ProjectThumbnailCard/*
introductions 하위 import 경로 정리, Inputfield·IntroductionCard·PartImageCard의 barrel export와 스토리, 프로젝트 썸네일 카드 스토리와 재export가 추가된다.

Sequence Diagram(s)

sequenceDiagram
  participant GitHub as GitHub Actions
  participant pnpm
  participant Storybook
  participant Pages as GitHub Pages
  GitHub->>pnpm: install --frozen-lockfile
  GitHub->>Storybook: build-storybook (STORYBOOK_BASE_PATH)
  Storybook->>GitHub: storybook-static 생성
  GitHub->>Pages: upload-pages-artifact
  GitHub->>Pages: deploy-pages
Loading

Possibly related PRs

  • kusitms-com/makers-admin-fe#8: PageHeaderButton의 연결, 공통 컴포넌트 경로 정리와 같은 UI 구성 변경이 함께 나타난다.

Suggested labels: 🛠️Chore

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Storybook 배포, Tailwind 전역 CSS, index 생성기, 다른 컴포넌트 추가 등 #9와 무관한 변경이 다수 포함됩니다. Image Box 썸네일 관련 변경만 유지하고, 나머지 Storybook/배포/공용 컴포넌트 작업은 별도 PR로 분리하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 Image Box 컴포넌트 제작이라는 핵심 변경을 간결하게 요약합니다.
Linked Issues check ✅ Passed Image Box 썸네일 컴포넌트와 관련 테스트/스토리가 추가되어 #9의 요구를 충족합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/image-box-component-9

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

CI 결과

항목 결과
TypeScript 🟢 통과
Prettier 🟢 통과
Generated 🟢 통과
ESLint 🟢 통과
Test 🟢 통과
Build 🟢 통과

@KyeongJooni KyeongJooni force-pushed the feat/image-box-component-9 branch from c0dc398 to 2d8653b Compare July 5, 2026 09:09
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

CI 결과

항목 결과
TypeScript 🟢 통과
Prettier 🟢 통과
Generated 🟢 통과
ESLint 🟢 통과
Test 🟢 통과
Build 🟢 통과

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/components/introductions/PartnerImageBox/PartnerImageBox.stories.tsx (1)

31-39: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Hovered 스토리에 실제 검증(assert) 없음

userEvent.hover 후 오버레이가 실제로 보이는지 assertion이 없어 회귀가 발생해도 테스트가 통과합니다. expect로 오버레이 버튼의 가시성을 확인하는 것을 권장합니다.

 export const Hovered: Story = {
   args: { imageUrl: PLACEHOLDER_IMAGE },
   play: async ({ canvasElement }) => {
     const container = canvasElement.querySelector('div')
     if (container) {
       await userEvent.hover(container)
+      await expect(canvas.getByLabelText('이미지 변경')).toBeVisible()
     }
   },
 }

As per path instructions, "타입 안정성, React 상태/효과 사용, 접근성, 테스트 필요성을 검토한다."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/introductions/PartnerImageBox/PartnerImageBox.stories.tsx`
around lines 31 - 39, The Hovered story in PartnerImageBox.stories.tsx performs
a hover action but never verifies the overlay actually appears, so add an
assertion in the play function after userEvent.hover using expect on the overlay
button or its visible state. Use the existing Hovered story and its play
callback to locate the change, and make the assertion specific enough to fail if
the hover interaction stops showing the overlay.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/deploy-storybook.yml:
- Around line 24-25: The Checkout code step in the deploy-storybook workflow
uses actions/checkout@v4 without explicitly disabling credential persistence.
Update the checkout configuration to set persist-credentials to false so the
GITHUB_TOKEN is not left in local git config for later steps; reference the
Checkout code action in the workflow to apply the change.

In `@src/components/introductions/PartnerImageBox/PartnerImageBox.tsx`:
- Around line 34-51: The hover overlay in PartnerImageBox is only revealed on
mouse hover, so keyboard users cannot reach the change/delete actions. Update
the overlay container in PartnerImageBox to also show on focus within, alongside
the existing group-hover behavior, so the buttons can be tabbed to and used
without a mouse.

---

Nitpick comments:
In `@src/components/introductions/PartnerImageBox/PartnerImageBox.stories.tsx`:
- Around line 31-39: The Hovered story in PartnerImageBox.stories.tsx performs a
hover action but never verifies the overlay actually appears, so add an
assertion in the play function after userEvent.hover using expect on the overlay
button or its visible state. Use the existing Hovered story and its play
callback to locate the change, and make the assertion specific enough to fail if
the hover interaction stops showing the overlay.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7e1cd14b-2b7a-4b9a-bf5f-16c34651af6f

📥 Commits

Reviewing files that changed from the base of the PR and between ba84ce5 and c0dc398.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (59)
  • .github/workflows/deploy-storybook.yml
  • .gitignore
  • .storybook/main.ts
  • .storybook/preview.tsx
  • components.json
  • eslint.config.js
  • package.json
  • scripts/gen-index.ts
  • src/assets/icons/svg/.gitkeep
  • src/components/.gitkeep
  • src/components/common/Button/Button.stories.tsx
  • src/components/common/Button/Button.test.tsx
  • src/components/common/Button/Button.tsx
  • src/components/common/Button/index.ts
  • src/components/common/Logo/Logo.stories.tsx
  • src/components/common/Logo/Logo.tsx
  • src/components/common/Logo/index.ts
  • src/components/common/PageHeader/PageHeader.stories.tsx
  • src/components/common/PageHeader/PageHeader.test.tsx
  • src/components/common/PageHeader/PageHeader.tsx
  • src/components/common/PageHeader/index.ts
  • src/components/common/SegmentedControl/SegmentedControl.stories.tsx
  • src/components/common/SegmentedControl/SegmentedControl.test.tsx
  • src/components/common/SegmentedControl/SegmentedControl.tsx
  • src/components/common/SegmentedControl/index.ts
  • src/components/common/Sidebar/Sidebar.stories.tsx
  • src/components/common/Sidebar/Sidebar.test.tsx
  • src/components/common/Sidebar/Sidebar.tsx
  • src/components/common/Sidebar/index.ts
  • src/components/introductions/ImageBoxThumbnail.tsx
  • src/components/introductions/ImageBoxThumbnail/ImageBoxThumbnail.stories.tsx
  • src/components/introductions/ImageBoxThumbnail/ImageBoxThumbnail.tsx
  • src/components/introductions/ImageBoxThumbnail/index.ts
  • src/components/introductions/ImageUploadBox/ImageUploadBox.stories.tsx
  • src/components/introductions/ImageUploadBox/ImageUploadBox.tsx
  • src/components/introductions/ImageUploadBox/index.ts
  • src/components/introductions/Inputfield/Inputfield.stories.tsx
  • src/components/introductions/Inputfield/Inputfield.tsx
  • src/components/introductions/Inputfield/index.ts
  • src/components/introductions/IntroductionCard/IntroductionCard.stories.tsx
  • src/components/introductions/IntroductionCard/IntroductionCard.test.tsx
  • src/components/introductions/IntroductionCard/IntroductionCard.tsx
  • src/components/introductions/IntroductionCard/index.ts
  • src/components/introductions/PartImageCard/PartImageCard.stories.tsx
  • src/components/introductions/PartImageCard/PartImageCard.test.tsx
  • src/components/introductions/PartImageCard/PartImageCard.tsx
  • src/components/introductions/PartImageCard/index.ts
  • src/components/introductions/PartnerImageBox/PartnerImageBox.stories.tsx
  • src/components/introductions/PartnerImageBox/PartnerImageBox.tsx
  • src/components/introductions/PartnerImageBox/index.ts
  • src/components/introductions/index.ts
  • src/components/projects/ProjectThumbnailCard/ProjectThumbnailCard.stories.tsx
  • src/components/projects/ProjectThumbnailCard/ProjectThumbnailCard.test.tsx
  • src/components/projects/ProjectThumbnailCard/ProjectThumbnailCard.tsx
  • src/components/projects/ProjectThumbnailCard/index.ts
  • src/index.css
  • src/lib/tv.ts
  • src/lib/utils.ts
  • tsconfig.node.json
💤 Files with no reviewable changes (5)
  • src/components/.gitkeep
  • src/assets/icons/svg/.gitkeep
  • components.json
  • src/components/introductions/ImageBoxThumbnail.tsx
  • src/components/common/Button/Button.tsx

Comment thread .github/workflows/deploy-storybook.yml
Comment thread src/components/introductions/PartnerImageBox/PartnerImageBox.tsx Outdated
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

CI 결과

항목 결과
TypeScript 🟢 통과
Prettier 🟢 통과
Generated 🟢 통과
ESLint 🟢 통과
Test 🟢 통과
Build 🟢 통과

@leemanjae02 leemanjae02 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 코멘트 남겨드렸으니 확인부탁드려요😊

@leemanjae02 leemanjae02 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파트너 이미지 박스, 이미지 업로드 박스도 다른 컴포넌트들처럼 유닛 테스트 추가하는건 어떨까요?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미지 업로드 박스는 내부에 파일 input이 있어서 실제 파일 선택창이 뜨는데
파트너 이미지 박스는 파일 input 없이 onChange() 콜백만 있어서 파일 입력 로직을 공통 훅으로 뽑아서 두 컴포넌트가 같이 쓰도록 하면 어떨까요?

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

CI 결과

항목 결과
TypeScript 🟢 통과
Prettier 🟢 통과
Generated 🟢 통과
ESLint 🟢 통과
Test 🟢 통과
Build 🟢 통과

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/hooks/introductions/useImageFileInput.ts`:
- Around line 23-34: 숨겨진 file input이 라벨이 없을 때도 Tab 포커스에 남는 문제가 있으며,
useImageFileInput의 inputProps를 만드는 부분에서 input 자체를 탭 순서에서 제외하도록 수정하세요.
openFilePicker로 여는 버튼이나 htmlFor를 가진 label이 실제 트리거이므로, inputRef/inputId를 유지하되 탭으로
접근되지 않게 관련 속성을 조정해 접근성 문제를 해결하세요.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a7222e5f-611e-4914-aa83-d2bf361478a0

📥 Commits

Reviewing files that changed from the base of the PR and between 37007f0 and 83c2918.

📒 Files selected for processing (7)
  • src/components/introductions/ImageUploadBox/ImageUploadBox.test.tsx
  • src/components/introductions/ImageUploadBox/ImageUploadBox.tsx
  • src/components/introductions/PartnerImageBox/PartnerImageBox.test.tsx
  • src/components/introductions/PartnerImageBox/PartnerImageBox.tsx
  • src/hooks/index.ts
  • src/hooks/introductions/index.ts
  • src/hooks/introductions/useImageFileInput.ts
✅ Files skipped from review due to trivial changes (1)
  • src/components/introductions/PartnerImageBox/PartnerImageBox.test.tsx

Comment thread src/hooks/introductions/useImageFileInput.ts
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

CI 결과

항목 결과
TypeScript 🟢 통과
Prettier 🟢 통과
Generated 🟢 통과
ESLint 🟢 통과
Test 🟢 통과
Build 🟢 통과

…ent-9

# Conflicts:
#	eslint.config.js
#	package.json
#	pnpm-lock.yaml
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

CI 결과

항목 결과
TypeScript 🟢 통과
Prettier 🟢 통과
Generated 🟢 통과
ESLint 🟢 통과
Test 🟢 통과
Build 🟢 통과

@leemanjae02 leemanjae02 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!! 👍

@KyeongJooni KyeongJooni merged commit ea0d626 into main Jul 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨Feature 새로운 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] #9 - Image Box 컴포넌트 제작

2 participants