Skip to content

[Feature/#233] 플랫폼 연동 페이지 UI 구현#234

Open
YermIm wants to merge 5 commits into
developfrom
feature/#233
Open

[Feature/#233] 플랫폼 연동 페이지 UI 구현#234
YermIm wants to merge 5 commits into
developfrom
feature/#233

Conversation

@YermIm
Copy link
Copy Markdown
Collaborator

@YermIm YermIm commented May 24, 2026

🚨 관련 이슈

close #233

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

screencapture-localhost-5173-integrations-2026-05-25-01_50_54
  • 플랫폼 연동 페이지 (/integrations)

    • Meta / Google / Naver 연동 카드 UI (연동됨 · 미연동 · 연동 오류 · 동기화 중 배지)
    • 연동됨: 마지막 동기화 시각, 재연동·연결 해제 버튼
    • 미연동: 안내 문구 + 연동하기
    • 오류: 에러 메시지 + 재연동
  • 사이드바

    • 푸터에 플랫폼 연동 추가
    • 연동 목록에 error 상태가 있으면 펼침 시 연동 필요 뱃지

😅 미완성 작업

N/A

📢 논의 사항 및 참고 사항

API 연동하면서 필요한 UI 추가 예정입니다!

💬 리뷰어 가이드 (P-Rules)
P1: 필수 반영 (Critical) - 버그 가능성, 컨벤션 위반. 해결 전 머지 불가.
P2: 적극 권장 (Recommended) - 더 나은 대안 제시. 가급적 반영 권장.
P3: 제안 (Suggestion) - 아이디어 공유. 반영 여부는 드라이버 자율.
P4: 단순 확인/칭찬 (Nit) - 사소한 오타, 칭찬 등 피드백.

Summary by CodeRabbit

릴리스 노트

  • New Features
    • 플랫폼 연동 페이지 추가: 다양한 플랫폼의 연결 상태를 한눈에 확인하고 관리할 수 있습니다.
    • 사이드바에 플랫폼 연동 메뉴 추가: 네비게이션에서 쉽게 접근 가능합니다.
    • 연동 상태 배지: 주의가 필요한 연동이 있을 때 사이드바에서 알림을 표시합니다.
    • 연결/재연결/연결 해제 기능: 각 플랫폼별로 연동 상태를 간편하게 관리할 수 있습니다.

Review Change Stack

@YermIm YermIm requested review from Seojegyeong and jjjsun May 24, 2026 17:04
@YermIm YermIm self-assigned this May 24, 2026
@YermIm YermIm added 🎨 Html&css 마크업 & 스타일링 ✨ Feature 기능 개발 labels May 24, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

📝 Walkthrough

Walkthrough

플랫폼 연동 기능을 추가합니다. 메타, 구글, 네이버 광고 계정을 워크스페이스별로 연결하고 상태를 관리하는 화면을 구현했으며, 사이드바에 메뉴 항목과 주의 배지를 추가하고 라우팅을 등록했습니다.

Changes

플랫폼 연동 기능 전체 흐름

Layer / File(s) Summary
타입 정의 및 연동 계약
src/types/integration/platformConnection.ts
TIntegrationProvider, TPlatformConnectionStatus (disconnected | connected | error | syncing), IPlatformConnectionItem 인터페이스를 정의하여 플랫폼 연결 데이터 구조를 확립합니다.
플랫폼 연동 카드 컴포넌트
src/components/integration/PlatformIntegrationCard.tsx
제공자별 로고, 상태별 뱃지 및 라벨 매핑, 마지막 동기화 시각의 ko-KR 포맷 변환, 에러 메시지 조건부 표시, 상태별 버튼(연동, 재연동, 연결 해제, 비활성) 렌더링과 콜백을 구현합니다.
로딩 스켈레톤 컴포넌트
src/components/integration/skeleton/PlatformIntegrationsSkeleton.tsx
PlatformIntegrationCardSkeleton은 카드 형태의 로딩 레이아웃을, PlatformIntegrationsPageSkeleton은 3개 항목 그리드를 생성하며 ARIA 접근성 속성을 포함합니다.
데이터 조회 훅 및 mock 데이터
src/hooks/integration/usePlatformConnections.ts, src/pages/integration/platformIntegrations.mock.ts
needsIntegrationAttention은 에러 상태 존재 여부를 판정하고, usePlatformConnections는 워크스페이스 기반 쿼리로 mock 데이터를 조회합니다.
플랫폼 연동 페이지
src/pages/integration/PlatformIntegrationsPage.tsx
훅으로 데이터를 조회하고 로딩/에러/성공 상태를 조건부 렌더링하며, 반응형 3열 그리드에 카드를 배치하고 토스트 콜백을 연결합니다.
사이드바 메뉴 및 주의 배지
src/components/sidebar/Sidebar.tsx, src/constants/sidebarNav.ts
footerNav에 "플랫폼 연동" 항목을 추가하고, 훅으로 주의 필요 상태를 계산하여 펼쳐진 상태에서 infoRed 배지를 표시합니다.
SidebarItem 트레일링 슬롯 지원
src/components/sidebar/SidebarItem.tsx
선택적 trailing prop을 받아 접힘/펼침 상태에 따라 렌더링하고, twMerge 기반 공통 클래스를 NavLink와 버튼에 재사용합니다.
라우트 등록
src/routes/MainRoutes.tsx
PlatformIntegrationsPage를 동적 임포트하여 workspace/:workspaceId/integrations 경로로 라우팅 합니다.
레이아웃 미세 조정
src/layout/main/MainLayout.tsx
Outlet 컨테이너 너비 제약을 조정하고 Outlet 컨텍스트 값을 명시적으로 매핑합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • jjjsun
  • Seojegyeong

📋 리뷰 포인트

구조 및 설계

  • 타입 안정성: TIntegrationProvider = TProvider 재사용으로 기존 캠페인 공급자 타입과 일관성 유지 ✅
  • 상태 관리: 연동 상태(disconnected, connected, error, syncing) 매핑이 명확하고 버튼 렌더링 로직과 정렬됨 ✅
  • 의존성 방향: 페이지 → 훅 → 타입 순서로 순환 의존성 없음 ✅

접근성

  • 스켈레톤 ARIA: aria-busy="true", aria-label로 로딩 상태 전달 ✅
  • 에러 표시: 경고 영역(alert role 권장)에 에러 메시지 명확히 노출
  • 배지 접근성: 주의 배지는 trailing으로 시각적 표시만 제공 (라벨 검토 권장)

성능

  • 메모이제이션: PlatformIntegrationCardmemo로 감싸 재렌더링 최소화 ✅
  • useMemo 활용: Sidebar에서 showIntegrationsAttention 계산 시 의존성 배열 확인 필요
  • 쿼리 조건: orgId != null 체크로 불필요한 쿼리 호출 방지 ✅

안정성 및 버그 위험

  • Mock 데이터 지연: 800ms 지연은 개발/테스트용이므로, 프로덕션 전환 시 실제 API 호출로 교체 필요 ⚠️
  • Date 파싱: formatSyncedAt에서 new Date(lastSyncedAt) 실패 시 "Invalid Date" 처리 확인 ✅
  • null 안전성: needsIntegrationAttentionitems?.some() 선택적 체이닝으로 undefined 안전 ✅

UI/UX 일관성

  • 버튼 상태: 각 상태별 버튼이 명확하지만, 버튼 텍스트 다국어 지원 확인 (한국어 기준으로만 작성됨)
  • 토스트 메시지: connect/reconnect/disconnect 성공/실패 토스트 텍스트 정의 확인
  • 로딩 스켈레톤: 3개 고정 카드 수는 실제 데이터 개수와 불일치 가능성 검토

코드품질 및 유지보수성

  • 상수 정의: PLATFORM_LOGOS, STATUS_LABEL, CONNECTION_STATUS_BADGE로 매핑 중앙화 ✅
  • 코드 중복: SidebarItem 클래스 로직이 복잡하므로 itemClassName 생성 함수 분리 고려 가능
  • 테스트: 카드 상태별 렌더링, 콜백 호출 등 단위 테스트 추가 권장
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 플랫폼 연동 페이지 UI 구현이라는 주요 변경사항을 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으며, 관련 이슈, 변경사항, 작업 내용을 충분히 기술하고 스크린샷을 포함하고 있습니다.
Linked Issues check ✅ Passed PR에서 구현한 모든 주요 기능이 이슈 #233의 요구사항을 충족합니다: 플랫폼 연동 페이지 구현, 사이드바 메뉴 추가, Meta/Google/Naver 연동 UI 상태 관리.
Out of Scope Changes check ✅ Passed 모든 변경사항이 플랫폼 연동 페이지 UI 구현 범위 내에 있으며, 관련 없는 기능 추가나 불필요한 리팩토링이 없습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#233

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown

📚 Storybook 배포 완료

항목 링크
📖 Storybook https://69a147b60a56365d9e2185ef-blvgcjhmsa.chromatic.com/
🔍 Chromatic https://www.chromatic.com/build?appId=69a147b60a56365d9e2185ef&number=309

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/pages/integration/PlatformIntegrationsPage.tsx (1)

9-14: ⚡ Quick win

에러 상태에서 즉시 재시도 액션을 추가해 주세요.

현재는 실패 메시지만 보여서 사용자가 복구를 위해 페이지를 벗어나야 합니다. refetch를 노출해서 에러 영역에 다시 시도 버튼을 두면 UX가 좋아집니다.

제안 diff
 export default function PlatformIntegrationsPage() {
   const {
     data: platformConnections = [],
     isLoading,
     isError,
     error,
+    refetch,
   } = usePlatformConnections();

@@
       ) : isError ? (
         <div className="flex min-h-40 items-center justify-center rounded-3xl bg-surface-100 p-8 shadow-Soft">
-          <p className="text-center font-body2 text-text-muted">
-            {error?.message ??
-              "플랫폼 연동 정보를 불러오지 못했습니다. 잠시 후 다시 시도해 주세요."}
-          </p>
+          <div className="flex flex-col items-center gap-3">
+            <p className="text-center font-body2 text-text-muted">
+              {error?.message ??
+                "플랫폼 연동 정보를 불러오지 못했습니다. 잠시 후 다시 시도해 주세요."}
+            </p>
+            <button
+              type="button"
+              onClick={() => void refetch()}
+              className="rounded-xl border border-surface-300 px-4 py-2 font-body2 text-text-title hover:bg-surface-200"
+            >
+              다시 시도
+            </button>
+          </div>
         </div>

As per coding guidelines src/**: 6. 에러 처리: API 실패 대응 및 사용자 피드백 적절성 검토.

Also applies to: 20-26

🤖 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/pages/integration/PlatformIntegrationsPage.tsx` around lines 9 - 14, The
error UI in PlatformIntegrationsPage doesn't offer a retry; update the component
to use the refetch function from usePlatformConnections (add refetch to the
destructuring alongside data/isLoading/isError/error) and render a "다시 시도"
button in the error branch that calls refetch when clicked; ensure the error
block still displays a helpful message (using error) and disables the button
while isLoading to prevent duplicate calls.
🤖 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/components/sidebar/SidebarItem.tsx`:
- Around line 33-45: The collapsed-state rendering in SidebarItem currently
shows only the Icon with aria-hidden, which leaves the NavLink/button (rendered
elsewhere) without an accessible name; update the collapsed branch in the
content JSX so that when isCollapsed is true you add an accessible label (e.g.,
aria-label and optionally title) derived from item.label to the interactive
element that uses content (ensure the same label is applied when Icon exists or
is null), and keep aria-hidden on the decorative Icon; check NavLink/button
usages that consume content to ensure they forward the aria-label when
collapsed.

---

Nitpick comments:
In `@src/pages/integration/PlatformIntegrationsPage.tsx`:
- Around line 9-14: The error UI in PlatformIntegrationsPage doesn't offer a
retry; update the component to use the refetch function from
usePlatformConnections (add refetch to the destructuring alongside
data/isLoading/isError/error) and render a "다시 시도" button in the error branch
that calls refetch when clicked; ensure the error block still displays a helpful
message (using error) and disables the button while isLoading to prevent
duplicate calls.
🪄 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: 30ec8865-4f6e-4c5f-9b42-4ced4d53adee

📥 Commits

Reviewing files that changed from the base of the PR and between d4d7b94 and 8693a0a.

⛔ Files ignored due to path filters (1)
  • src/assets/icon/sidebar/connect.svg is excluded by !**/*.svg and included by src/**
📒 Files selected for processing (11)
  • src/components/integration/PlatformIntegrationCard.tsx
  • src/components/integration/skeleton/PlatformIntegrationsSkeleton.tsx
  • src/components/sidebar/Sidebar.tsx
  • src/components/sidebar/SidebarItem.tsx
  • src/constants/sidebarNav.ts
  • src/hooks/integration/usePlatformConnections.ts
  • src/layout/main/MainLayout.tsx
  • src/pages/integration/PlatformIntegrationsPage.tsx
  • src/pages/integration/platformIntegrations.mock.ts
  • src/routes/MainRoutes.tsx
  • src/types/integration/platformConnection.ts

Comment thread src/components/sidebar/SidebarItem.tsx
@jjjsun
Copy link
Copy Markdown
Collaborator

jjjsun commented May 25, 2026

P3: 혹시 지금 페이지 아래에는 비어있는듯한 느낌이 들어서, 플랫폼을 세로로 flex로 배치하고, 재연동/연결해제/연동하기 버튼들을 우측에 맞춰서 flex로 넣으면 어떨까요?
근데, 플랫폼을 flex로 배치하면 아래에서 비어보이는 이미지는 사라지지만, 안에 내용이 비어보이는 느낌이 있어서 애매하다는 생각이 들기도 합니다...
이러한 의견도 추가로 한번 제안드려봅니다...!!

@YermIm
Copy link
Copy Markdown
Collaborator Author

YermIm commented May 25, 2026

P3: 혹시 지금 페이지 아래에는 비어있는듯한 느낌이 들어서, 플랫폼을 세로로 flex로 배치하고, 재연동/연결해제/연동하기 버튼들을 우측에 맞춰서 flex로 넣으면 어떨까요? 근데, 플랫폼을 flex로 배치하면 아래에서 비어보이는 이미지는 사라지지만, 안에 내용이 비어보이는 느낌이 있어서 애매하다는 생각이 들기도 합니다... 이러한 의견도 추가로 한번 제안드려봅니다...!!

저도 이 부분 고민하다가 버튼이 멀어지면 가독성이 떨어질 것 같아서 일단 가로 배치했습니다. 화면적으로 봤을 때는 세로 배치가 더 좋을 것 같습니다. 수정해본 화면인데 이대로 진행할까요?!

screencapture-localhost-5173-integrations-2026-05-25-19_44_49

@jjjsun
Copy link
Copy Markdown
Collaborator

jjjsun commented May 25, 2026

P3: 혹시 지금 페이지 아래에는 비어있는듯한 느낌이 들어서, 플랫폼을 세로로 flex로 배치하고, 재연동/연결해제/연동하기 버튼들을 우측에 맞춰서 flex로 넣으면 어떨까요? 근데, 플랫폼을 flex로 배치하면 아래에서 비어보이는 이미지는 사라지지만, 안에 내용이 비어보이는 느낌이 있어서 애매하다는 생각이 들기도 합니다... 이러한 의견도 추가로 한번 제안드려봅니다...!!

저도 이 부분 고민하다가 버튼이 멀어지면 가독성이 떨어질 것 같아서 일단 가로 배치했습니다. 화면적으로 봤을 때는 세로 배치가 더 좋을 것 같습니다. 수정해본 화면인데 이대로 진행할까요?!

screencapture-localhost-5173-integrations-2026-05-25-19_44_49

음 저는 이 세로 배치가 더 나은것같습니다! 혹시 옆에 버튼들(재연동/연결해제)은 위아래로 배치해서 오른쪽에 붙게 하는건 어떨까요?

+)추가로 버튼들이 안에 텍스트 크기에 따라서 너비가 다른것같은데 너비 고정해서 너비 맞추는 것도 깔끔해보일것같아요!

@Seojegyeong
Copy link
Copy Markdown
Collaborator

P4: 저는 아래 이미지처럼 카드형 가로 배치가 좋을 것 같습니다! 이유는 아래와 같음

  • 가로 배치는 카드가 나란히 배치되어서 3개 플랫폼 상태를 한 눈에 비교할 수 있다. 세로 배치는 위아래로 시선을 이동해 비교해야 해서 직관적이지 않음
  • 버튼과 콘텐츠 연관성, 오류 상태 등이 잘 보임
  • 세로 배치는 버튼이 오른쪽 끝에 몰려 있어서 텍스트와 버튼 사이의 거리가 너무 멀다
스크린샷 2026-05-25 오후 10 19 39

하단이 비어보이는 문제는 아래 방법을 통해 보완할 수 있을 것 같습니다!

  • 카드 안에 정보를 더 추가해 높이 늘리기
  • 하단 공간 활용하기 - 연동 가능한 다른 플랫폼 섹션 아래에 추가(추후 지원 예정인 플랫폼을 비활성화 카드로 보여줌)

@jjjsun
Copy link
Copy Markdown
Collaborator

jjjsun commented May 26, 2026

P4: 저는 아래 이미지처럼 카드형 가로 배치가 좋을 것 같습니다! 이유는 아래와 같음

  • 가로 배치는 카드가 나란히 배치되어서 3개 플랫폼 상태를 한 눈에 비교할 수 있다. 세로 배치는 위아래로 시선을 이동해 비교해야 해서 직관적이지 않음
  • 버튼과 콘텐츠 연관성, 오류 상태 등이 잘 보임
  • 세로 배치는 버튼이 오른쪽 끝에 몰려 있어서 텍스트와 버튼 사이의 거리가 너무 멀다
스크린샷 2026-05-25 오후 10 19 39 하단이 비어보이는 문제는 아래 방법을 통해 보완할 수 있을 것 같습니다!
  • 카드 안에 정보를 더 추가해 높이 늘리기
  • 하단 공간 활용하기 - 연동 가능한 다른 플랫폼 섹션 아래에 추가(추후 지원 예정인 플랫폼을 비활성화 카드로 보여줌)

저는 가로배치가 아래부분이 비어보이는 점이 수정되었으면 좋겠다는 점에서 세로배치를 제안드렸는데,
제경님 말씀처럼 안에 추가내용으로 높이를 늘리고, 하단에 추가 섹션을 넣는다면 가로 배치로 진행하는것도 좋다고 생각합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 기능 개발 🎨 Html&css 마크업 & 스타일링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [Feature] 플랫폼 연동 화면 UI 구현

3 participants