Skip to content

[Feat/#2] 페이지 라우팅 구조 및 공통 레이아웃 설정#3

Merged
Hyochan02 merged 9 commits into
mainfrom
feature/2-common-layout
Jul 5, 2026
Merged

[Feat/#2] 페이지 라우팅 구조 및 공통 레이아웃 설정#3
Hyochan02 merged 9 commits into
mainfrom
feature/2-common-layout

Conversation

@Hyochan02

Copy link
Copy Markdown
Contributor

📌 관련 이슈번호

(Closes 키워드가 있어야 PR이 머지되었을 때 이슈가 자동으로 닫힌다)

📌 PR 유형

어떤 변경 사항이 있나요?

  • 새 기능 추가
  • 버그 수정
  • 리팩토링

📌 PR 요약

  • 피그마 화면 구성을 기준으로 앱 라우팅 폴더 구조를 잡고, 전 화면 공통 레이아웃 컴포넌트(ScreenContainer)를 추가
  • 템플릿에 남아있던 불필요 데모 코드 정리

📌 작업 세부 내용

  1. '(auth)'(로그인/회원가입), '(tabs)'(홈/캘린더/통계분석/설정), '(stacks)'(일정등록, 카테고리 추가/수정, 일기작성/상세, 통계상세, 미완료일정, 알림설정) 라우트 그룹 구조 설정 및 각 화면 최소 컴포넌트 스텁 추가
  2. 'ScreenContainer.tsx' 공통 레이아웃 컴포넌트 추가
    'variant' prop으로 '(tabs)'/'(auth)'는 'bg-bg', '(stacks)'는 'bg-gray-0`'배경 구분
  3. 'tailwind.config.js'의 'content'에 'src/' 경로 추가 (NativeWind 클래스가 'src/' 하위 파일에는 적용 안 되던 문제 수정)
  4. Expo 기본 템플릿 데모 코드 삭제

📸 스크린샷 (선택)

🔗 참고 자료

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4dfe41ce-a9b7-42a3-b972-bec23e49396f

📥 Commits

Reviewing files that changed from the base of the PR and between 4c38c60 and 3cbdd49.

📒 Files selected for processing (2)
  • app/(stacks)/category/index.tsx
  • app/(stacks)/diary/recommendations.tsx

Walkthrough

공통 레이아웃 컴포넌트 ScreenContainer가 추가되고, (auth), (stacks), (tabs) 그룹에 새 화면들이 생성되었습니다. 루트 스택과 탭 네비게이션 구성이 갱신되었고, 기존 starter 템플릿 화면 및 공용 UI 컴포넌트 일부가 제거되었습니다.

Changes

레이아웃 및 라우팅 구조 도입

Layer / File(s) Summary
ScreenContainer 공통 컴포넌트 및 export
src/components/common/ScreenContainer.tsx, src/components/common/index.ts, tailwind.config.js
ScreenContainer가 추가되고 common 인덱스에서 재-export되며, src 소스가 Tailwind 스캔 대상에 포함됨.
(auth) 라우트 화면 추가
app/(auth)/login.tsx, app/(auth)/signup.tsx
로그인/회원가입 화면이 ScreenContainer 기반으로 추가됨.
(stacks) 라우트 화면 추가
app/(stacks)/alarm/index.tsx, app/(stacks)/category/add.tsx, app/(stacks)/category/edit.tsx, app/(stacks)/category/index.tsx, app/(stacks)/diary/[id].tsx, app/(stacks)/diary/write.tsx, app/(stacks)/diary/recommendations.tsx, app/(stacks)/schedule/index.tsx, app/(stacks)/statistic/detail.tsx, app/(stacks)/statistic/incomplete.tsx
알람, 카테고리, 일기, 일정, 통계 관련 스택 화면들이 ScreenContainer(variant="stack") 기반으로 추가됨.
(tabs) 화면 교체 및 탭 레이아웃 재구성
app/(tabs)/index.tsx, app/(tabs)/calendar.tsx, app/(tabs)/settings.tsx, app/(tabs)/statistics.tsx, app/(tabs)/_layout.tsx, app/(tabs)/explore.tsx
홈 화면이 단순화되고 캘린더/설정/통계 탭이 추가되며 Explore 탭/화면이 제거됨.
루트 스택 라우팅 및 starter 컴포넌트 정리
app/_layout.tsx, app/modal.tsx, components/external-link.tsx, components/hello-wave.tsx, components/parallax-scroll-view.tsx, components/themed-text.tsx, components/themed-view.tsx, components/ui/collapsible.tsx, components/ui/icon-symbol.tsx
RootLayout 스택에 (auth), (stacks)가 추가되고 modal 화면이 제거되며, starter 컴포넌트들과 일부 아이콘 매핑이 삭제됨.

Estimated code review effort: 2 (Simple) | ~15 minutes

Related issues: #2 ([Feat] 공통 레이아웃 설정 및 페이지 라우팅 구조 설정)

Suggested labels: enable-auto-review

Suggested reviewers: 없음(정보 부족)

Poem
토끼가 폴더마다 팻말을 세우고,
ScreenContainer로 방마다 옷을 입혔네.
낡은 파랄랙스와 잘 가라 손 흔들며,
새 탭 세 개를 깡충깡충 이어붙였지.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 라우팅 구조와 공통 레이아웃 설정이라는 주요 변경 사항을 정확히 요약합니다.
Description check ✅ Passed 설명이 공통 레이아웃 추가, 라우팅 폴더 구조 설정, 템플릿 정리 등 변경 내용과 관련되어 있습니다.
Linked Issues check ✅ Passed 이슈 #2의 공통 레이아웃 구현과 폴더 구조 설정 요구를 모두 충족합니다.
Out of Scope Changes check ✅ Passed 추가된 파일과 제거된 템플릿 코드가 모두 라우팅 구조와 공통 레이아웃 설정 범위에 들어갑니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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/2-common-layout

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

@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.

🧹 Nitpick comments (3)
src/components/common/ScreenContainer.tsx (1)

27-29: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

className 병합에 clsx/tailwind-merge 사용 고려

현재 템플릿 리터럴로 className을 이어붙이고 있어, 외부에서 전달된 classNameflex-1 px-4 py-[34px] 등과 충돌(예: padding 재정의)할 경우 우선순위가 예측하기 어려울 수 있습니다. clsx + tailwind-merge(또는 nativewind의 cn 유틸)를 사용하면 이런 충돌을 안전하게 해결할 수 있습니다.

🤖 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/common/ScreenContainer.tsx` around lines 27 - 29, The
className composition in ScreenContainer should avoid raw template-string
concatenation because it can produce unstable Tailwind precedence when callers
pass conflicting styles. Update the View in ScreenContainer to build classes
through clsx plus tailwind-merge, or the existing cn utility if available, so
VARIANT_BG[variant], the base layout classes, and the optional className are
merged safely. Use the ScreenContainer component and its View className
expression as the main fix point.
app/(tabs)/_layout.tsx (2)

25-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

calendar/statistics/settings 탭에 아이콘 누락.

index 탭에만 tabBarIcon이 지정되어 있고 나머지 탭에는 아이콘이 없습니다. IconSymbolMAPPING에도 "house.fill"만 존재하는 것으로 보아, 후속 작업에서 각 탭에 맞는 아이콘 매핑 추가가 필요합니다.

🤖 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 `@app/`(tabs)/_layout.tsx around lines 25 - 33, The calendar, statistics, and
settings tabs are missing tabBarIcon definitions in the Tabs.Screen
configuration, while index is the only tab using IconSymbol. Update the tab
options in the _layout Tabs setup so each of these screens also passes a
tabBarIcon using IconSymbol, and add the corresponding icon names to
IconSymbol’s MAPPING so the new tab icons resolve correctly.

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

임시 주석 정리 필요.

"임시 - 공통 컴포넌트 구현 후 교체 예정" 주석이 남아있는데, 이번 PR에서 이미 공통 레이아웃(ScreenContainer)이 구현되었습니다. 해당 주석이 여전히 유효한지 확인 후 정리해주세요.

🤖 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 `@app/`(tabs)/_layout.tsx around lines 9 - 10, The temporary comment in the tab
layout is now stale because the shared layout has already been implemented.
Review the comments in the _layout.tsx tab routing setup and remove or rewrite
the “임시 - 공통 컴포넌트 구현 후 교체 예정” note so it matches the current
ScreenContainer-based implementation and no longer implies pending replacement.
🤖 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.

Nitpick comments:
In `@app/`(tabs)/_layout.tsx:
- Around line 25-33: The calendar, statistics, and settings tabs are missing
tabBarIcon definitions in the Tabs.Screen configuration, while index is the only
tab using IconSymbol. Update the tab options in the _layout Tabs setup so each
of these screens also passes a tabBarIcon using IconSymbol, and add the
corresponding icon names to IconSymbol’s MAPPING so the new tab icons resolve
correctly.
- Around line 9-10: The temporary comment in the tab layout is now stale because
the shared layout has already been implemented. Review the comments in the
_layout.tsx tab routing setup and remove or rewrite the “임시 - 공통 컴포넌트 구현 후 교체
예정” note so it matches the current ScreenContainer-based implementation and no
longer implies pending replacement.

In `@src/components/common/ScreenContainer.tsx`:
- Around line 27-29: The className composition in ScreenContainer should avoid
raw template-string concatenation because it can produce unstable Tailwind
precedence when callers pass conflicting styles. Update the View in
ScreenContainer to build classes through clsx plus tailwind-merge, or the
existing cn utility if available, so VARIANT_BG[variant], the base layout
classes, and the optional className are merged safely. Use the ScreenContainer
component and its View className expression as the main fix point.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 811cb3ac-d9d8-43e6-ab54-ea8650eb2d0c

📥 Commits

Reviewing files that changed from the base of the PR and between a6431b7 and ee043cf.

⛔ Files ignored due to path filters (4)
  • assets/images/partial-react-logo.png is excluded by !**/*.png, !**/assets/**
  • assets/images/react-logo.png is excluded by !**/*.png, !**/assets/**
  • assets/images/react-logo@2x.png is excluded by !**/*.png, !**/assets/**
  • assets/images/react-logo@3x.png is excluded by !**/*.png, !**/assets/**
📒 Files selected for processing (28)
  • app/(auth)/login.tsx
  • app/(auth)/signup.tsx
  • app/(stacks)/alarm/index.tsx
  • app/(stacks)/category/add.tsx
  • app/(stacks)/category/edit.tsx
  • app/(stacks)/diary/[id].tsx
  • app/(stacks)/diary/write.tsx
  • app/(stacks)/schedule/index.tsx
  • app/(stacks)/statistic/detail.tsx
  • app/(stacks)/statistic/incomplete.tsx
  • app/(tabs)/_layout.tsx
  • app/(tabs)/calendar.tsx
  • app/(tabs)/explore.tsx
  • app/(tabs)/index.tsx
  • app/(tabs)/settings.tsx
  • app/(tabs)/statistics.tsx
  • app/_layout.tsx
  • app/modal.tsx
  • components/external-link.tsx
  • components/hello-wave.tsx
  • components/parallax-scroll-view.tsx
  • components/themed-text.tsx
  • components/themed-view.tsx
  • components/ui/collapsible.tsx
  • components/ui/icon-symbol.tsx
  • src/components/common/ScreenContainer.tsx
  • src/components/common/index.ts
  • tailwind.config.js
💤 Files with no reviewable changes (9)
  • components/themed-text.tsx
  • components/hello-wave.tsx
  • components/external-link.tsx
  • components/parallax-scroll-view.tsx
  • components/ui/collapsible.tsx
  • app/(tabs)/explore.tsx
  • components/themed-view.tsx
  • app/modal.tsx
  • components/ui/icon-symbol.tsx

@yewon20804 yewon20804 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

페이지 라우팅이랑 전체 구조 잡아줘서 고마워융-! 짱짱👍👍👍

Comment thread app/(stacks)/category/add.tsx
Comment thread app/(stacks)/diary/write.tsx
@Hyochan02 Hyochan02 self-assigned this Jul 5, 2026
@Hyochan02 Hyochan02 merged commit 4b67465 into main Jul 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 공통 레이아웃 설정 및 페이지 라우팅 구조 설정

2 participants