Skip to content

Feat/navigation bar#18

Merged
thswogh merged 4 commits intomainfrom
feat/navigation-bar
Jul 23, 2025
Merged

Feat/navigation bar#18
thswogh merged 4 commits intomainfrom
feat/navigation-bar

Conversation

@meteorqz6
Copy link
Contributor

@meteorqz6 meteorqz6 commented Jul 8, 2025

close #17

image

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • 다양한 SVG 아이콘(홈, 아카이빙, 업로딩, 랭킹, 마이 및 각 활성화 상태 아이콘)이 추가되어 탭바 UI가 개선되었습니다.
    • 공통 색상 팔레트와 내비게이션 기본 스타일 옵션이 도입되어 일관된 디자인이 적용됩니다.
  • 버그 수정

    • 탭 제목이 "아카이브"에서 "아카이빙"으로 변경되었습니다.
  • 개선 사항

    • SVG 아이콘 지원을 위해 번들러 설정이 개선되었습니다.
    • 의존성 버전 관리가 유연하게 변경되고, SVG 변환 도구가 추가되었습니다.
  • 리팩터링

    • 탭 레이아웃 구조 및 네이밍이 개선되었습니다.
    • 인증 조건과 관계없이 홈 탭으로 이동하도록 로직이 단순화되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Jul 8, 2025

Walkthrough

탭 레이아웃 컴포넌트가 리팩토링되어 UI 스타일과 네비게이션 옵션이 개선되었고, SVG 아이콘 지원을 위해 메트로 번들러 설정과 패키지 의존성이 변경되었습니다. 여러 SVG 아이콘이 추가되었으며, 색상 토큰과 네비게이션 기본 옵션이 새롭게 도입되었습니다. 인증 상태에 따른 라우팅 로직은 제거되었습니다.

Changes

파일/경로 변경 요약
app/(tabs)/_layout.tsx 컴포넌트명 변경, SafeAreaView 래핑, DefaultNavigationOptions 적용, 탭 아이콘 및 타이틀 개선
app/index.tsx 인증 기반 분기 제거, 무조건 홈 탭으로 라우팅, 스타일 포맷 수정
metro.config.js, package.json SVG 트랜스포머 적용 위한 메트로 설정 리팩토링, 관련 패키지 추가 및 버전 범위 변경
shared/assets/icons/index.ts home, archiving, uploading, ranking, my 및 각 active 상태 등 10개 SVG 아이콘 신규 export
shared/tokens/colors.ts beige, green100, green50 색상 포함 color 토큰 객체 신규 추가
shared/ui/navigation/index.tsx DefaultNavigationOptions 네비게이션 기본 옵션 객체 신규 추가

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant TabLayout
    participant Navigation
    participant Icon

    User->>App: 앱 실행
    App->>Navigation: 홈 탭으로 라우팅
    App->>TabLayout: TabLayout 렌더링
    TabLayout->>Navigation: DefaultNavigationOptions 적용
    TabLayout->>Icon: 탭별 아이콘 렌더링 (활성/비활성)
    Navigation->>User: 탭 UI 표시
Loading

Assessment against linked issues

Objective Addressed Explanation
네비게이션 바 컴포넌트 구현 (#17)

Assessment against linked issues: Out-of-scope changes

(없음)

Possibly related PRs

Poem

🐰
탭에 아이콘이 반짝반짝,
색상 토큰도 추가됐지!
SVG 파일도 이제는 척척,
네비 옵션 한 번에 적용,
토끼는 오늘도 기뻐서 깡총!
🎨✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-11T06_28_50_623Z-debug-0.log


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b81e10c and a30ae61.

⛔ Files ignored due to path filters (2)
  • shared/assets/icons/archiving.svg is excluded by !**/*.svg
  • shared/assets/icons/archiving_active.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • app/(tabs)/_layout.tsx (1 hunks)
  • shared/assets/icons/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/(tabs)/_layout.tsx
  • shared/assets/icons/index.ts
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 3

🧹 Nitpick comments (1)
app/(tabs)/_layout.tsx (1)

8-12: 불필요한 useMemo 사용을 제거하세요.

DefaultNavigationOptions는 상수 객체이므로 useMemo로 메모이제이션할 필요가 없습니다. 단순히 직접 사용하는 것이 더 효율적입니다.

다음과 같이 리팩토링하세요:

-  const screenOptions = useMemo(() => {
-    return {
-      ...DefaultNavigationOptions,
-    };
-  }, []);
+  const screenOptions = {
+    ...DefaultNavigationOptions,
+  };
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f8eaea and b81e10c.

⛔ Files ignored due to path filters (11)
  • package-lock.json is excluded by !**/package-lock.json
  • shared/assets/icons/archving.svg is excluded by !**/*.svg
  • shared/assets/icons/archving_active.svg is excluded by !**/*.svg
  • shared/assets/icons/home.svg is excluded by !**/*.svg
  • shared/assets/icons/home_active.svg is excluded by !**/*.svg
  • shared/assets/icons/my.svg is excluded by !**/*.svg
  • shared/assets/icons/my_active.svg is excluded by !**/*.svg
  • shared/assets/icons/ranking.svg is excluded by !**/*.svg
  • shared/assets/icons/ranking_active.svg is excluded by !**/*.svg
  • shared/assets/icons/uploading.svg is excluded by !**/*.svg
  • shared/assets/icons/uploading_active.svg is excluded by !**/*.svg
📒 Files selected for processing (7)
  • app/(tabs)/_layout.tsx (1 hunks)
  • app/index.tsx (1 hunks)
  • metro.config.js (1 hunks)
  • package.json (2 hunks)
  • shared/assets/icons/index.ts (1 hunks)
  • shared/tokens/colors.ts (1 hunks)
  • shared/ui/navigation/index.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
shared/ui/navigation/index.tsx (1)
shared/tokens/colors.ts (1)
  • basicColors (1-5)
app/(tabs)/_layout.tsx (2)
shared/ui/navigation/index.tsx (1)
  • DefaultNavigationOptions (3-19)
shared/ui/icon/index.tsx (1)
  • Icon (12-22)
🔇 Additional comments (15)
shared/tokens/colors.ts (1)

1-5: 색상 토큰 정의가 적절합니다.

일관된 네이밍 규칙을 따르고 있으며, 네비게이션 UI에서 사용할 색상들이 명확하게 정의되어 있습니다. 중앙화된 색상 관리를 통해 유지보수성이 향상됩니다.

package.json (2)

31-31: SVG 지원을 위한 의존성 변경이 적절합니다.

react-native-svg를 고정 버전에서 캐럿 범위로 변경하여 호환 가능한 패치 업데이트를 허용하도록 했습니다.


48-48: SVG 변환기 추가가 적절합니다.

react-native-svg-transformer를 devDependencies에 추가하여 SVG 파일 처리를 지원합니다. 이는 새로 추가된 아이콘들과 함께 사용될 것으로 보입니다.

shared/assets/icons/index.ts (1)

2-11: 아이콘 exports 구조가 잘 구성되어 있습니다.

각 탭에 대해 active/inactive 상태의 아이콘을 제공하는 것은 좋은 UX 설계입니다. 네비게이션 바에서 현재 선택된 탭을 명확히 표시할 수 있습니다.

shared/ui/navigation/index.tsx (2)

1-1: 색상 토큰 import가 적절합니다.

새로 생성된 색상 토큰 모듈을 올바르게 import하고 있습니다.


3-19: 네비게이션 옵션 중앙화가 훌륭합니다.

DefaultNavigationOptions를 통해 네비게이션 스타일을 중앙에서 관리하는 것은 좋은 패턴입니다. 색상 토큰을 사용하여 일관된 테마를 유지하고 있으며, 아이콘 크기와 여백, 폰트 크기 등이 적절하게 정의되어 있습니다.

app/index.tsx (4)

13-20: 인증 기반 라우팅 로직이 완전히 제거되었습니다.

기존의 조건부 라우팅 로직이 주석 처리되어 모든 사용자가 홈 탭으로 직접 이동하게 됩니다. 만약 이것이 의도된 변경이라면, 주석 처리된 코드를 제거하는 것을 고려해보세요.


24-24: useEffect 의존성 배열 업데이트가 적절합니다.

userInfo가 더 이상 사용되지 않으므로 의존성 배열에서 제거한 것이 올바릅니다.


28-28: 스타일 포맷팅 변경이 적절합니다.

따옴표를 일관되게 사용하도록 변경한 것이 좋습니다.


9-9: app/index.tsx에서 인증 로직 주석 처리 확인 필요

app/index.tsx에서 useAuth 훅을 통해 가져온 userInfo 사용과 초기 라우팅 로직이 모두 주석 처리되어 있습니다. 이 변경으로 인해 앱 진입 시 인증 흐름이 중단될 수 있으니 의도된 수정인지 확인 부탁드립니다.

  • 파일: app/index.tsx
    • 라인 9: // const { userInfo } = useAuth();
    • 라인 11~15: 초기 userInfo 기반 라우팅(router.replace("/(tabs)/home") / router.replace("/login")) 주석 처리

다른 페이지(ProfilePage, HomePage, LoginPage)에서는 여전히 useAuth를 사용 중이므로, 해당 주석이 임시 변경인지 또는 제거가 의도된 것인지 알려주세요. 필요 시 로직 복원 또는 대체 방안을 적용해 주시기 바랍니다.

app/(tabs)/_layout.tsx (4)

1-5: 새로운 imports가 올바르게 추가되었습니다.

Icon 컴포넌트, DefaultNavigationOptions, useMemo, SafeAreaView 등 필요한 의존성들이 적절히 추가되었습니다.


15-16: SafeAreaView 래퍼와 screenOptions 적용이 적절합니다.

SafeAreaView로 상단 영역을 보호하고 DefaultNavigationOptions를 통해 일관된 스타일을 적용한 것이 좋습니다.


21-21: 탭 아이콘 구현이 올바르게 되어 있습니다.

focused 상태에 따라 다른 아이콘을 표시하는 로직이 적절히 구현되었습니다.

Also applies to: 35-35, 42-42, 49-49


21-21: 아이콘 정의 확인 완료

  • shared/assets/icons/index.ts에 home, home_active, archving, archving_active, uploading, uploading_active, ranking, ranking_active, my, my_active 아이콘이 모두 정의되어 있습니다.
metro.config.js (1)

3-19: SVG 변환기 설정이 올바르게 구현되었습니다.

Metro 설정에서 SVG 파일을 소스 확장자로 처리하고 react-native-svg-transformer를 사용하도록 올바르게 구성되었습니다. IIFE 패턴의 사용도 적절합니다.


config.transformer = {
...transformer,
babelTransformerPath: require.resolve("react-native-svg-transformer/expo"),
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

SVG 변환기 패키지 의존성을 확인하세요.

react-native-svg-transformer/expo를 사용하고 있으므로 이 패키지가 package.json에 올바르게 설치되어 있는지 확인해야 합니다.

다음 스크립트를 실행하여 패키지 설치 상태를 확인하세요:


🏁 Script executed:

#!/bin/bash
# Description: react-native-svg-transformer 패키지 설치 확인

# package.json에서 react-native-svg-transformer 확인
echo "Checking package.json for react-native-svg-transformer..."
rg -A 2 -B 2 "react-native-svg-transformer" package.json

# node_modules 확인
echo "Checking if package is installed..."
ls node_modules/ | grep svg-transformer || echo "Package not found in node_modules"

Length of output: 566


SVG 변환기 패키지 설치 필요

  • package.json에는 react-native-svg-transformer가 선언되어 있으나, 현재 node_modules에 설치되어 있지 않습니다.
  • 프로젝트 루트에서 npm install 또는 yarn install을 실행해 의존성을 설치해주세요.
  • 설치 후 babelTransformerPath: require.resolve("react-native-svg-transformer/expo")가 정상 동작하는지 확인 바랍니다.
🤖 Prompt for AI Agents
In metro.config.js at line 10, the react-native-svg-transformer package is
referenced but not installed in node_modules. Run npm install or yarn install in
the project root to install all dependencies, including
react-native-svg-transformer. After installation, verify that
babelTransformerPath: require.resolve("react-native-svg-transformer/expo") works
correctly without errors.

@thswogh thswogh merged commit 5c56838 into main Jul 23, 2025
2 checks 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.

⚙️ [기능추가] navigation bar 컴포넌트 구현

2 participants