Skip to content

Conversation

@HarrySeop
Copy link
Member

@HarrySeop HarrySeop commented Aug 4, 2025

🧩 관련 이슈 번호

📌 작업 내용

  • 번역 버튼, 영역 디자인 수정
  • 에러나 오류 반환시 새로고침 되도록 변경
  • 에러 메세지 토스트 메세지로 변경

✅ 체크리스트

  • PR 하기 전에 이슈에서 빼먹은건 없는지 확인했습니다
    • 라벨 및 마일스톤을 사이드 탭에서 등록했습니다.
  • PR을 보내는 브랜치가 올바른지 확인했습니다.
  • 팀원들이 리뷰하기 쉽도록 설명을 자세하게 작성했습니다.
  • 변경사항을 충분히 테스트 했습니다.
  • (함수를 구현 했을 때) JSDoc을 양식에 맞춰서 작성했습니다.
  • 컨벤션에 맞게 구현했습니다.

📷 UI 변경 사항 (선택)

image

❓무슨 문제가 발생했나요? (선택)

💬 기타 참고 사항 (선택)

Summary by CodeRabbit

  • 버그 수정

    • 번역 과정에서 발생하는 오류를 사용자에게 토스트 알림으로 안내하도록 개선했습니다.
  • 스타일

    • 언어 선택 드롭다운과 플로팅 버튼의 디자인이 개선되었습니다.
    • 플로팅 버튼 내 국기 아이콘의 스타일이 둥근 형태로 변경되었습니다.
  • 기타

    • 언어 감지 로직이 쿠키 우선 검사 방식으로 더욱 정확해졌습니다.
    • 국기 아이콘 컴포넌트의 스타일 클래스 병합 방식이 개선되었습니다.
    • 지원 언어 목록의 순서가 일부 조정되었습니다.

@HarrySeop HarrySeop added this to the 프로젝트 마감 milestone Aug 4, 2025
@HarrySeop HarrySeop self-assigned this Aug 4, 2025
@HarrySeop HarrySeop added ♻️ Refactor 코드 리팩토링 🎨 Design 마크업 및 스타일링 labels Aug 4, 2025
@HarrySeop HarrySeop linked an issue Aug 4, 2025 that may be closed by this pull request
@coderabbitai
Copy link

coderabbitai bot commented Aug 4, 2025

📝 Walkthrough

Walkthrough

이번 변경에서는 FlagIcon 컴포넌트의 Tailwind CSS 클래스 병합 방식을 twMerge 함수로 대체하였고, FloatingTranslateButton 컴포넌트의 에러 처리 방식을 콘솔 로그에서 사용자에게 토스트 알림을 띄우는 방식으로 개선하였습니다. 또한, 언어 감지 로직과 UI 스타일링도 일부 수정되었습니다. 마지막으로, languages 배열 내 언어 순서가 일부 조정되었습니다.

Changes

Cohort / File(s) Change Summary
Tailwind 클래스 병합 개선
apps/what-today/src/components/FlagIcon.tsx
Tailwind CSS 클래스 병합을 기존 템플릿 문자열 방식에서 twMerge 함수 사용으로 변경. 나머지 컴포넌트 로직은 동일.
에러 처리 및 UI 개선
apps/what-today/src/components/FloatingTranslateButton.tsx
에러 발생 시 콘솔 로그 대신 토스트 알림 표시로 변경. 언어 감지 로직 개선 및 UI 스타일 일부 수정.
언어 배열 순서 조정
apps/what-today/src/constants/languages.ts
languages 배열 내 프랑스어, 일본어, 힌디어 항목의 순서 변경. 언어 추가/삭제 없이 순서만 조정됨.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FloatingTranslateButton
    participant ToastSystem
    participant GoogleTranslate

    User->>FloatingTranslateButton: 언어 변경 시도
    FloatingTranslateButton->>GoogleTranslate: 언어 변경 요청
    alt 에러 발생
        FloatingTranslateButton->>ToastSystem: 번역 오류 토스트 표시
    else 성공
        GoogleTranslate-->>FloatingTranslateButton: 언어 변경 완료
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • 페이지 번역 기능 도입 #207: FlagIcon 컴포넌트의 최초 도입과 관련된 PR로, 이번 변경에서 해당 컴포넌트의 Tailwind 클래스 병합 방식이 개선되었습니다.

Suggested reviewers

  • kjhyun0830
  • Taeil08
  • MyungJiwoo

Poem

🐰
토스트 알림이 번역을 지켜주고,
깃발은 twMerge로 깔끔하게 빛나네.
에러는 이제 콘솔이 아닌
사용자에게 살포시 전해지네.
오늘도 코드밭에 평화가 오길!
🌱✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 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 59e22d8 and 4903ec6.

📒 Files selected for processing (1)
  • apps/what-today/src/constants/languages.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: kjhyun0830
PR: What-Today-FE/What-Today#77
File: apps/what-today/src/pages/mypage/manage-activities/index.tsx:50-63
Timestamp: 2025-07-19T01:23:56.149Z
Learning: User kjhyun0830 follows an incremental development approach in What-Today project, implementing UI first and adding functionality in later iterations, as confirmed in PR #77 for the experience management page.
Learnt from: HarrySeop
PR: What-Today-FE/What-Today#129
File: apps/what-today/src/pages/mypage/reservations-list/index.tsx:13-25
Timestamp: 2025-07-24T19:36:15.516Z
Learning: HarrySeop은 What-Today 프로젝트에서 API 에러 처리를 토스터(toast notification)로 처리하는 방식을 선호하며, 핸들러 함수 구현 시점에 함께 연결하는 접근 방식을 취함.
Learnt from: kjhyun0830
PR: What-Today-FE/What-Today#169
File: apps/what-today/src/hooks/useMyActivitiesQuery.ts:23-25
Timestamp: 2025-07-29T14:50:14.117Z
Learning: kjhyun0830은 What-Today 프로젝트에서 토스터 알림과 같은 UI 일관성이 필요한 기능들을 여러 페이지에 걸쳐 한 번에 수정하는 접근 방식을 선호한다.
Learnt from: kjhyun0830
PR: What-Today-FE/What-Today#219
File: apps/what-today/src/pages/mypage/main/index.tsx:108-157
Timestamp: 2025-08-03T00:45:03.763Z
Learning: kjhyun0830은 What-Today 프로젝트의 마이페이지(apps/what-today/src/pages/mypage/main/index.tsx)에서 다음 브랜치에 스켈레톤 UI 작업과 함께 로딩 상태 처리를 구현할 계획이라고 언급함.
Learnt from: kjhyun0830
PR: What-Today-FE/What-Today#178
File: apps/what-today/src/index.css:63-83
Timestamp: 2025-07-30T13:22:43.195Z
Learning: kjhyun0830은 What-Today 프로젝트에서 기능적으로 문제가 없는 코드에 대해서는 장기적인 유지보수 개선사항보다는 현재 작동하는 상태를 유지하는 것을 선호하는 실용적인 접근 방식을 취한다.
Learnt from: Taeil08
PR: What-Today-FE/What-Today#125
File: packages/design-system/src/components/DatePicker.tsx:25-28
Timestamp: 2025-07-24T13:33:33.202Z
Learning: packages/design-system/src/components/DatePicker.tsx에서 Taeil08은 sr-only 클래스를 가진 div 요소가 달력 트리거 버튼의 세로 정렬에 필요하다고 설명했음. 이 요소를 제거하면 버튼 정렬이 깨지는 레이아웃 의존성이 있음.
Learnt from: Taeil08
PR: What-Today-FE/What-Today#237
File: packages/design-system/src/components/Carousel/Carousel.tsx:19-25
Timestamp: 2025-08-04T04:16:10.940Z
Learning: Taeil08 prefers using translate-x-1/2 and translate-x-1/2 for carousel navigation button positioning in packages/design-system/src/components/Carousel/Carousel.tsx as it provides better flexibility for button positioning compared to fixed positioning without transforms.
🔇 Additional comments (1)
apps/what-today/src/constants/languages.ts (1)

10-13: 언어 순서 변경이 UX 개선에 적절합니다.

일본어를 3번째 위치로, 프랑스어를 힌디어 다음으로 이동한 변경사항이 합리적입니다. 한국 사용자에게 일본어가 프랑스어나 독일어보다 더 자주 사용될 가능성이 높아 사용자 경험 측면에서 개선된 것으로 보입니다.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/HarrySeop/258

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

Support

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

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 generate unit tests to generate unit tests for 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 or @coderabbitai 요약 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.

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

🚀 오늘뭐해 Preview Deploy 완료!
👉 미리보기 링크

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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fc6fade and 6e659a7.

📒 Files selected for processing (2)
  • apps/what-today/src/components/FlagIcon.tsx (2 hunks)
  • apps/what-today/src/components/FloatingTranslateButton.tsx (13 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: kjhyun0830
PR: What-Today-FE/What-Today#77
File: apps/what-today/src/pages/mypage/manage-activities/index.tsx:50-63
Timestamp: 2025-07-19T01:23:56.149Z
Learning: User kjhyun0830 follows an incremental development approach in What-Today project, implementing UI first and adding functionality in later iterations, as confirmed in PR #77 for the experience management page.
Learnt from: HarrySeop
PR: What-Today-FE/What-Today#129
File: apps/what-today/src/pages/mypage/reservations-list/index.tsx:13-25
Timestamp: 2025-07-24T19:36:15.516Z
Learning: HarrySeop은 What-Today 프로젝트에서 API 에러 처리를 토스터(toast notification)로 처리하는 방식을 선호하며, 핸들러 함수 구현 시점에 함께 연결하는 접근 방식을 취함.
Learnt from: kjhyun0830
PR: What-Today-FE/What-Today#169
File: apps/what-today/src/hooks/useMyActivitiesQuery.ts:23-25
Timestamp: 2025-07-29T14:50:14.117Z
Learning: kjhyun0830은 What-Today 프로젝트에서 토스터 알림과 같은 UI 일관성이 필요한 기능들을 여러 페이지에 걸쳐 한 번에 수정하는 접근 방식을 선호한다.
Learnt from: kjhyun0830
PR: What-Today-FE/What-Today#219
File: apps/what-today/src/pages/mypage/main/index.tsx:108-157
Timestamp: 2025-08-03T00:45:03.763Z
Learning: kjhyun0830은 What-Today 프로젝트의 마이페이지(apps/what-today/src/pages/mypage/main/index.tsx)에서 다음 브랜치에 스켈레톤 UI 작업과 함께 로딩 상태 처리를 구현할 계획이라고 언급함.
Learnt from: kjhyun0830
PR: What-Today-FE/What-Today#178
File: apps/what-today/src/index.css:63-83
Timestamp: 2025-07-30T13:22:43.195Z
Learning: kjhyun0830은 What-Today 프로젝트에서 기능적으로 문제가 없는 코드에 대해서는 장기적인 유지보수 개선사항보다는 현재 작동하는 상태를 유지하는 것을 선호하는 실용적인 접근 방식을 취한다.
Learnt from: Taeil08
PR: What-Today-FE/What-Today#125
File: packages/design-system/src/components/DatePicker.tsx:25-28
Timestamp: 2025-07-24T13:33:33.202Z
Learning: packages/design-system/src/components/DatePicker.tsx에서 Taeil08은 sr-only 클래스를 가진 div 요소가 달력 트리거 버튼의 세로 정렬에 필요하다고 설명했음. 이 요소를 제거하면 버튼 정렬이 깨지는 레이아웃 의존성이 있음.
Learnt from: Taeil08
PR: What-Today-FE/What-Today#237
File: packages/design-system/src/components/Carousel/Carousel.tsx:19-25
Timestamp: 2025-08-04T04:16:10.940Z
Learning: Taeil08 prefers using translate-x-1/2 and translate-x-1/2 for carousel navigation button positioning in packages/design-system/src/components/Carousel/Carousel.tsx as it provides better flexibility for button positioning compared to fixed positioning without transforms.
📚 Learning: the mainpage component in apps/what-today/src/pages/main/index.tsx contains placeholder/example code...
Learnt from: MyungJiwoo
PR: What-Today-FE/What-Today#43
File: apps/what-today/src/pages/main/index.tsx:7-7
Timestamp: 2025-07-14T13:36:17.941Z
Learning: The MainPage component in apps/what-today/src/pages/main/index.tsx contains placeholder/example code that will be modified later, including the fixed height class 'h-1400' which the user indicated is temporary.

Applied to files:

  • apps/what-today/src/components/FlagIcon.tsx
📚 Learning: in packages/design-system/src/components/button/index.tsx, harryseop uses handleclick wrapper for se...
Learnt from: HarrySeop
PR: What-Today-FE/What-Today#53
File: packages/design-system/src/components/button/index.tsx:32-41
Timestamp: 2025-07-16T06:51:15.152Z
Learning: In packages/design-system/src/components/button/index.tsx, HarrySeop uses handleClick wrapper for security purposes to prevent execution when users remove disabled attributes via developer tools. The onClick handler should be extracted from rest props before spreading to avoid being overwritten.

Applied to files:

  • apps/what-today/src/components/FlagIcon.tsx
  • apps/what-today/src/components/FloatingTranslateButton.tsx
📚 Learning: taeil08 prefers using translate-x-1/2 and translate-x-1/2 for carousel navigation button positioning...
Learnt from: Taeil08
PR: What-Today-FE/What-Today#237
File: packages/design-system/src/components/Carousel/Carousel.tsx:19-25
Timestamp: 2025-08-04T04:16:10.940Z
Learning: Taeil08 prefers using translate-x-1/2 and translate-x-1/2 for carousel navigation button positioning in packages/design-system/src/components/Carousel/Carousel.tsx as it provides better flexibility for button positioning compared to fixed positioning without transforms.

Applied to files:

  • apps/what-today/src/components/FloatingTranslateButton.tsx
📚 Learning: in the button component (packages/design-system/src/components/button/index.tsx), the children filte...
Learnt from: HarrySeop
PR: What-Today-FE/What-Today#53
File: packages/design-system/src/components/button/index.tsx:63-70
Timestamp: 2025-07-15T16:38:40.310Z
Learning: In the Button component (packages/design-system/src/components/button/index.tsx), the children filtering logic that only allows strings and Icon components is intentional design decision by HarrySeop. The validChildren filter is meant to restrict button content to only text strings and Icon components for consistency and to prevent component misuse.

Applied to files:

  • apps/what-today/src/components/FloatingTranslateButton.tsx
📚 Learning: packages/design-system/src/components/datepicker.tsx에서 taeil08은 sr-only 클래스를 가진 div 요소가 달력 트리거 버튼의 세...
Learnt from: Taeil08
PR: What-Today-FE/What-Today#125
File: packages/design-system/src/components/DatePicker.tsx:25-28
Timestamp: 2025-07-24T13:33:33.202Z
Learning: packages/design-system/src/components/DatePicker.tsx에서 Taeil08은 sr-only 클래스를 가진 div 요소가 달력 트리거 버튼의 세로 정렬에 필요하다고 설명했음. 이 요소를 제거하면 버튼 정렬이 깨지는 레이아웃 의존성이 있음.

Applied to files:

  • apps/what-today/src/components/FloatingTranslateButton.tsx
📚 Learning: popovertrigger component in controlled mode (when open and onopenchange props are provided to popove...
Learnt from: MyungJiwoo
PR: What-Today-FE/What-Today#117
File: apps/what-today/src/components/notification/NotificationPopover.tsx:21-21
Timestamp: 2025-07-24T08:18:09.297Z
Learning: PopoverTrigger component in controlled mode (when open and onOpenChange props are provided to PopoverRoot) does not automatically toggle the popover state on click. The developer must provide a manual onClick handler to manage the state toggle, as the internal handleClick only works when !isControlled.

Applied to files:

  • apps/what-today/src/components/FloatingTranslateButton.tsx
🧬 Code Graph Analysis (1)
apps/what-today/src/components/FloatingTranslateButton.tsx (1)
apps/what-today/src/constants/languages.ts (1)
  • findLanguageByCode (70-72)
🔇 Additional comments (9)
apps/what-today/src/components/FlagIcon.tsx (1)

2-2: LGTM!

twMerge 임포트가 올바르게 추가되었습니다. Tailwind CSS 클래스 충돌을 방지하고 더 나은 클래스 병합을 위한 좋은 선택입니다.

apps/what-today/src/components/FloatingTranslateButton.tsx (8)

2-2: LGTM!

에러 처리를 위한 useToast 훅 임포트가 올바르게 추가되었습니다. 이전 학습 내용에 따르면 HarrySeop님께서 토스트 알림을 통한 에러 처리를 선호하시는 것으로 확인됩니다.


19-19: LGTM!

useToast 훅의 사용법이 올바릅니다.


30-74: 언어 감지 로직 개선이 우수합니다!

쿠키 기반 언어 감지를 우선 순위로 두고, URL 파라미터와 body 클래스를 fallback으로 사용하는 계층적 접근 방식이 훌륭합니다. googtrans 쿠키는 Google Translate의 현재 상태를 가장 안정적으로 감지할 수 있는 방법입니다. 또한 콘솔 에러를 토스트 알림으로 대체한 것도 사용자 경험을 크게 개선합니다.


107-115: LGTM!

Google Translate 초기화 시 에러 처리가 토스트 알림으로 일관성 있게 개선되었습니다. 의존성 배열에 toast 추가도 올바릅니다.


146-155: LGTM!

스크립트 로딩 실패 시 토스트 알림 처리가 적절히 추가되었습니다. 의존성 배열 업데이트도 올바릅니다.


189-302: 언어 변경 함수의 에러 처리가 완벽하게 개선되었습니다!

모든 잠재적 실패 지점에 토스트 알림이 추가되어 사용자가 번역 과정의 문제를 명확히 인지할 수 있게 되었습니다. 특히 Google Translate가 준비되지 않았을 때, select 요소를 찾을 수 없을 때, 그리고 일반적인 예외 상황에 대한 처리가 모두 포함되어 있어 포괄적입니다.


319-348: UI 스타일링 개선이 우수합니다!

드롭다운의 패딩과 그림자 조정, 라벨 텍스트 색상 변경, 플로팅 버튼의 rounded-full 스타일 적용 등이 일관성 있게 적용되어 더 현대적이고 세련된 디자인을 만들어냅니다. FlagIconrounded-full 클래스를 추가한 것도 전체적인 디자인 통일성을 높입니다.


1-356: 전체적으로 훌륭한 리팩토링입니다!

이번 변경사항은 PR 목표에 완벽히 부합하는 포괄적인 개선을 보여줍니다:

  1. 에러 처리 개선: 콘솔 로그를 토스트 알림으로 대체하여 사용자 피드백을 크게 향상
  2. 언어 감지 강화: 쿠키 기반 감지를 우선순위로 하는 더 안정적인 로직
  3. UI 디자인 개선: 일관된 스타일링과 현대적인 디자인 요소 적용
  4. 코드 품질: 의존성 배열 정확한 관리와 에러 처리의 일관성

HarrySeop님의 이전 작업 패턴에 따른 토스트 알림 사용도 잘 반영되어 있습니다.

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

🚀 오늘뭐해 Preview Deploy 완료!
👉 미리보기 링크

Copy link
Contributor

@MyungJiwoo MyungJiwoo left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

🚀 오늘뭐해 Preview Deploy 완료!
👉 미리보기 링크

@HarrySeop HarrySeop merged commit e93e41b into develop Aug 4, 2025
2 checks passed
This was referenced Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎨 Design 마크업 및 스타일링 ♻️ Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

번역 기능 리팩토링

4 participants