Conversation
Toast 알림 기능 구현을 위한 sonner 라이브러리 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Toast warning 타입에서 사용할 경고 아이콘 컴포넌트 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Toaster 컴포넌트: sonner Toaster 래퍼 (offset, mobileOffset, gap 지원) - toast.warning() 유틸 함수: className 방식으로 Figma 디자인 적용 - layout.tsx에 Toaster 추가 - ToastTest 컴포넌트 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of ChangesHello @youngminss, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자에게 비침습적인 피드백을 제공하기 위한 토스트(Toast) 알림 시스템을 애플리케이션에 도입합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
토스트 컴포넌트가 성공적으로 추가되었습니다. sonner 라이브러리를 활용하여 토스트 기능을 구현하고, AlertCircleIcon과 Toaster 컴포넌트를 새로 정의하여 통합한 점이 좋습니다. 전반적으로 기능 구현은 잘 되었으나, 몇 가지 유지보수성 및 코드 일관성 측면에서 개선할 수 있는 부분이 있습니다. 특히 아이콘의 색상 관리와 viewBox 설정, 그리고 토스트 스타일링을 위한 Tailwind 클래스 관리 방식에 대한 피드백을 드립니다. 또한, 테스트용 컴포넌트는 프로덕션 코드에서 제거하는 것이 좋습니다.
| stroke="#E5E7EB" | ||
| strokeWidth="2" | ||
| strokeLinecap="round" | ||
| /> | ||
| <circle cx="9" cy="13" r="1.5" fill="#E5E7EB" /> |
There was a problem hiding this comment.
아이콘 내부 요소(path의 stroke와 circle의 fill)에 #E5E7EB와 같은 하드코딩된 색상 값이 사용되었습니다. 이는 디자인 시스템의 색상 토큰을 우회하여 테마 관리 및 일관성 유지에 어려움을 줄 수 있습니다. IconBase 컴포넌트의 color prop을 활용하여 currentColor를 사용하면 아이콘의 색상을 외부에서 유연하게 제어할 수 있습니다. toast.ts에서 ygi:text-palette-primary-500 클래스를 통해 아이콘 색상을 동적으로 설정하고 있으므로, 내부 요소도 currentColor를 따르도록 변경하는 것이 좋습니다.
| stroke="#E5E7EB" | |
| strokeWidth="2" | |
| strokeLinecap="round" | |
| /> | |
| <circle cx="9" cy="13" r="1.5" fill="#E5E7EB" /> | |
| stroke="currentColor" | |
| strokeWidth="2" | |
| strokeLinecap="round" | |
| /> | |
| <circle cx="9" cy="13" r="1.5" fill="currentColor" /> |
| ...props | ||
| }: AlertCircleIconProps) => { | ||
| return ( | ||
| <IconBase size={size} viewBox="-1 -1 20 20" {...props}> |
There was a problem hiding this comment.
viewBox 속성이 "-1 -1 20 20"으로 설정되어 있습니다. SVG 아이콘의 viewBox가 음수 좌표로 시작하는 것은 일반적이지 않으며, 아이콘이 스케일되거나 다른 컨텍스트에서 사용될 때 예상치 못한 렌더링 또는 클리핑 문제를 일으킬 수 있습니다. 아이콘의 실제 내용이 18x18 그리드 내에 있다고 가정할 때, viewBox="0 0 18 18"과 같이 0,0에서 시작하는 표준 viewBox를 사용하는 것이 더 견고하고 예측 가능합니다.
| <IconBase size={size} viewBox="-1 -1 20 20" {...props}> | |
| <IconBase size={size} viewBox="0 0 18 18" {...props}> |
| classNames: { | ||
| toast: "ygi:bg-button-primary! ygi:text-text-inverse! ygi:body-14-md! ygi:rounded-sm! ygi:py-3! ygi:pl-4! ygi:pr-5! ygi:gap-2! ygi:flex! ygi:items-center! ygi:border-none!", |
There was a problem hiding this comment.
classNames.toast 속성에 Tailwind 클래스 문자열이 길게 하드코딩되어 있습니다. 이 방식은 토스트의 스타일을 동적으로 변경하거나(예: 성공, 오류 등 다양한 토스트 유형에 따라) 디자인 시스템 내에서 효과적으로 관리하기 어렵게 만듭니다. Button 컴포넌트에서 사용된 cva (class-variance-authority)와 같은 유틸리티를 사용하여 스타일을 정의하고 적용하면, 다양한 변형을 지원하고 재사용성을 높여 더 구조적이고 유지보수하기 쉬운 코드를 만들 수 있습니다. 현재는 warning 타입만 있지만, 향후 success, error 등 다른 타입의 토스트가 추가될 경우 cva를 활용하는 것이 훨씬 효율적입니다.
app/page.tsx
Outdated
| import { Layout } from "#/components/layout"; | ||
| import { StepHeader } from "#/components/stepHeader"; | ||
| import { colors } from "#/constants/color"; | ||
| import { ToastTest } from "./_test/ToastTest"; |
app/page.tsx
Outdated
| <div className="ygi:flex ygi:h-layout-footer-height ygi:w-full ygi:items-center ygi:justify-center ygi:bg-surface-gray"> | ||
| Footer | ||
| <div className="ygi:flex ygi:h-layout-footer-height ygi:w-full ygi:items-center ygi:justify-center ygi:gap-md ygi:bg-surface-gray"> | ||
| <ToastTest /> |
Toast 알림 기능 구현을 위한 sonner 라이브러리 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Toast warning 타입에서 사용할 경고 아이콘 컴포넌트 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Toaster 컴포넌트: sonner Toaster 래퍼 (offset, mobileOffset, gap 지원) - toast.warning() 유틸 함수: className 방식으로 Figma 디자인 적용 - layout.tsx에 Toaster 추가 - ToastTest 컴포넌트 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f342de4 to
a6c79d2
Compare
|
@youngminss main 에서 개선된 workflow 변경 이력을 추가해서 여기에 rebase 했어! |
…rs/hereeat into feature/ds-toast-component
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ToastTest 컴포넌트 제거 - layout.tsx에서 Toaster 컴포넌트 제거 - page.tsx 테스트용 UI 코드 정리 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- eslint-config-prettier, eslint-plugin-prettier 설치 - ESLint 설정에 Prettier 플러그인 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: sonner 라이브러리 설치 Toast 알림 기능 구현을 위한 sonner 라이브러리 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: AlertCircleIcon 컴포넌트 추가 Toast warning 타입에서 사용할 경고 아이콘 컴포넌트 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: Toast 컴포넌트 및 유틸 함수 추가 - Toaster 컴포넌트: sonner Toaster 래퍼 (offset, mobileOffset, gap 지원) - toast.warning() 유틸 함수: className 방식으로 Figma 디자인 적용 - layout.tsx에 Toaster 추가 - ToastTest 컴포넌트 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: sonner 라이브러리 설치 Toast 알림 기능 구현을 위한 sonner 라이브러리 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: AlertCircleIcon 컴포넌트 추가 Toast warning 타입에서 사용할 경고 아이콘 컴포넌트 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: Toast 컴포넌트 및 유틸 함수 추가 - Toaster 컴포넌트: sonner Toaster 래퍼 (offset, mobileOffset, gap 지원) - toast.warning() 유틸 함수: className 방식으로 Figma 디자인 적용 - layout.tsx에 Toaster 추가 - ToastTest 컴포넌트 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: format 스크립트에 app 디렉터리 추가 및 코드 포맷팅 적용 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: 테스트용 코드 정리 - ToastTest 컴포넌트 제거 - layout.tsx에서 Toaster 컴포넌트 제거 - page.tsx 테스트용 UI 코드 정리 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: 불필요한 import 제거 * chore: formatting * chore: ESLint를 통한 Prettier 포맷팅 설정 추가 - eslint-config-prettier, eslint-plugin-prettier 설치 - ESLint 설정에 Prettier 플러그인 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: eslint prettier error rule 제거 --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
## 1.0.0-beta.1 (2026-02-16) ### Features * [#70](#70) ([#72](#72)) ([b676e0e](b676e0e)) * [QA] 모임 생성 완료, 결과페이지 페이지 UI 개선 ([#66](#66)) ([f10225d](f10225d)) * [QA] 서비스 전체 배경색 및 Layout Root 그림자 효과 적용 ([#59](#59)) ([384b56f](384b56f)) * api client 모듈 생성 ([#37](#37)) ([a37b0a9](a37b0a9)), closes [#38](#38) [#39](#39) [#40](#40) [#41](#41) * Button 컴포넌트 추가 ([#11](#11)) ([83b7607](83b7607)) * Chip Component 추가 ([#9](#9)) ([e9d8b8f](e9d8b8f)) * Color theme 초기화 ([#2](#2)) ([97f1dcc](97f1dcc)) * DotsLoader 컴포넌트 추가 ([#48](#48)) ([cfe4582](cfe4582)), closes [#49](#49) * GA4 이벤트 트래킹 통합 ([#70](#70)) ([0c1b9fa](0c1b9fa)) * GTM(Google Tag Manager) 통합을 위한 Analytics 컴포넌트 추가 ([#57](#57)) ([87a6ded](87a6ded)) * IconBase 컴포넌트 및 아이콘 컴포넌트들 구축 ([#13](#13)) ([8557b75](8557b75)), closes [#FFCD00](https://github.com/Nexters/yogieat/issues/FFCD00) [#FFAD00](https://github.com/Nexters/yogieat/issues/FFAD00) [#15](#15) [#ff5a3c](https://github.com/Nexters/yogieat/issues/ff5a3c) * InputField 컴포넌트 추가 ([#16](#16)) ([99b8aa2](99b8aa2)) * Landing / Opinion Form 페이지 분리 ([#61](#61)) ([0f11e71](0f11e71)) * Layout 컴포넌트 추가 ([#10](#10)) ([9efce6f](9efce6f)) * Semantic Color Token 추가 ([#19](#19)) ([fcaedaf](fcaedaf)) * Spacing utility 클래스 초기화 ([#8](#8)) ([2e38d7a](2e38d7a)) * Tag 컴포넌트 추가 ([#20](#20)) ([f69dd05](f69dd05)) * Toast 컴포넌트 추가 ([#21](#21)) ([76e84b0](76e84b0)) * 모임 생성 퍼널 Step 1 (인원 선택) 구현 ([#23](#23)) ([7fc01a1](7fc01a1)), closes [#24](#24) [#1f2933](https://github.com/Nexters/yogieat/issues/1f2933) [#ff5a3c](https://github.com/Nexters/yogieat/issues/ff5a3c) [#25](#25) [#26](#26) [#27](#27) [#28](#28) [#29](#29) [#30](#30) [#31](#31) [#32](#32) [#34](#34) * 프로젝트 기초 세팅 진행 ([aa0ec20](aa0ec20)) * 프로젝트 폴더 구조 반영 ([e54962d](e54962d)) ### Bug Fixes * 1순위를 1개라도 선택했다면 바로 CTA 가 활성화 되도록 수정 ([#60](#60)) ([e5758b4](e5758b4)) * 1차 MVP 배포 이전 최종 QA 항목 반영 ([#58](#58)) ([6574231](6574231)) * Button/Chip type 속성 추가 및 의견 수렴 UX 개선 ([#50](#50)) ([7e86e4a](7e86e4a)), closes [#51](#51) [#52](#52) [#53](#53) [#54](#54) [#55](#55) [#56](#56) * cat 에서 echo 로 env.production 파일을 생성하도록 수정 ([f15307d](f15307d)) * CI/CD health check 타이밍 개선 및 수동 배포 기능 추가 ([54fd2b8](54fd2b8)) * Docker build-args로 환경 변수 전달 방식 변경 ([#77](#77)) ([e5fa0b9](e5fa0b9)) * Docker 이미지 강제 pull 및 컨테이너 재생성 ([#79](#79)) ([c253ec1](c253ec1)) * Health check 전략 개선 및 curl 기반으로 변경 ([765d3da](765d3da)) * nginx http2 deprecated 경고 해결 ([2fd9c75](2fd9c75)) * PendingView 내에서 ShareButton 을 렌더링 하지 않도록 수정 ([7bc3e12](7bc3e12)) * 결과 페이지 맛집 이미지 기본 placeholder, 공유하기 toast 미노출 ([#68](#68)) ([3c80844](3c80844)) * 동시 배포 방지를 위한 concurrency 설정 추가 ([e9bfd52](e9bfd52)) * 모임 생성 퍼널 필드 상태 초기화 버그 수정 ([#64](#64)) ([3934066](3934066)), closes [#65](#65) * 모임 생성 폼 필드명 변경 (meetingDate → scheduledDate, location → region) ([#35](#35)) ([e90beed](e90beed)) * 배포 워크플로우에 GA4 환경 변수 추가 ([#73](#73)) ([835ae1f](835ae1f)) * 의견 수렴 페이지 내 UI 수정 및 인터렉션 개선 ([#36](#36)) ([a74f7da](a74f7da)) * 의견 수합 Form Capacity 폴링 제거 및 ErrorCode 타입 시스템 추가 ([#67](#67)) ([d55dba1](d55dba1)) * 인원 수 선택 Grid 및 의견 수렴 QA 수정 사항 반영 ([f01626e](f01626e)) * 테스트 용으로 추가했던 페이지 제거 및 icons 폴더 추가 ([4116025](4116025)) ### Code Refactoring * Button 컴포넌트 스펙을 Figma 명세에 맞춰 수정 ([#14](#14)) ([2e27f17](2e27f17)) ### Build System * Docker 빌드 시 NEXT_PUBLIC 환경변수 주입 프로세스 추가 ([#47](#47)) ([88ba163](88ba163)) ### Documentation * 프로젝트 개발 가이드 문서 추가 ([#84](#84)) ([4313145](4313145))
## 1.0.0 (2026-02-16) ### Features * [#70](#70) ([#72](#72)) ([b676e0e](b676e0e)) * [QA] 모임 생성 완료, 결과페이지 페이지 UI 개선 ([#66](#66)) ([f10225d](f10225d)) * [QA] 서비스 전체 배경색 및 Layout Root 그림자 효과 적용 ([#59](#59)) ([384b56f](384b56f)) * analytics 개선 및 네이버 서치 어드바이저 등록 ([#88](#88)) ([4372aa5](4372aa5)) * api client 모듈 생성 ([#37](#37)) ([a37b0a9](a37b0a9)), closes [#38](#38) [#39](#39) [#40](#40) [#41](#41) * Button 컴포넌트 추가 ([#11](#11)) ([83b7607](83b7607)) * Chip Component 추가 ([#9](#9)) ([e9d8b8f](e9d8b8f)) * Color theme 초기화 ([#2](#2)) ([97f1dcc](97f1dcc)) * DotsLoader 컴포넌트 추가 ([#48](#48)) ([cfe4582](cfe4582)), closes [#49](#49) * GA4 이벤트 트래킹 통합 ([#70](#70)) ([0c1b9fa](0c1b9fa)) * GTM(Google Tag Manager) 통합을 위한 Analytics 컴포넌트 추가 ([#57](#57)) ([87a6ded](87a6ded)) * IconBase 컴포넌트 및 아이콘 컴포넌트들 구축 ([#13](#13)) ([8557b75](8557b75)), closes [#FFCD00](https://github.com/Nexters/yogieat/issues/FFCD00) [#FFAD00](https://github.com/Nexters/yogieat/issues/FFAD00) [#15](#15) [#ff5a3c](https://github.com/Nexters/yogieat/issues/ff5a3c) * InputField 컴포넌트 추가 ([#16](#16)) ([99b8aa2](99b8aa2)) * Landing / Opinion Form 페이지 분리 ([#61](#61)) ([0f11e71](0f11e71)) * Layout 컴포넌트 추가 ([#10](#10)) ([9efce6f](9efce6f)) * Semantic Color Token 추가 ([#19](#19)) ([fcaedaf](fcaedaf)) * Spacing utility 클래스 초기화 ([#8](#8)) ([2e38d7a](2e38d7a)) * Tag 컴포넌트 추가 ([#20](#20)) ([f69dd05](f69dd05)) * Toast 컴포넌트 추가 ([#21](#21)) ([76e84b0](76e84b0)) * 모임 생성 완료 페이지 UI 리뉴얼 ([#89](#89)) ([17a3fc1](17a3fc1)) * 모임 생성 퍼널 Step 1 (인원 선택) 구현 ([#23](#23)) ([7fc01a1](7fc01a1)), closes [#24](#24) [#1f2933](https://github.com/Nexters/yogieat/issues/1f2933) [#ff5a3c](https://github.com/Nexters/yogieat/issues/ff5a3c) [#25](#25) [#26](#26) [#27](#27) [#28](#28) [#29](#29) [#30](#30) [#31](#31) [#32](#32) [#34](#34) * 프로젝트 기초 세팅 진행 ([aa0ec20](aa0ec20)) * 프로젝트 폴더 구조 반영 ([e54962d](e54962d)) ### Bug Fixes * 1순위를 1개라도 선택했다면 바로 CTA 가 활성화 되도록 수정 ([#60](#60)) ([e5758b4](e5758b4)) * 1차 MVP 배포 이전 최종 QA 항목 반영 ([#58](#58)) ([6574231](6574231)) * Button/Chip type 속성 추가 및 의견 수렴 UX 개선 ([#50](#50)) ([7e86e4a](7e86e4a)), closes [#51](#51) [#52](#52) [#53](#53) [#54](#54) [#55](#55) [#56](#56) * cat 에서 echo 로 env.production 파일을 생성하도록 수정 ([f15307d](f15307d)) * CI/CD health check 타이밍 개선 및 수동 배포 기능 추가 ([54fd2b8](54fd2b8)) * Docker build-args로 환경 변수 전달 방식 변경 ([#77](#77)) ([e5fa0b9](e5fa0b9)) * Docker 이미지 강제 pull 및 컨테이너 재생성 ([#79](#79)) ([c253ec1](c253ec1)) * Health check 전략 개선 및 curl 기반으로 변경 ([765d3da](765d3da)) * nginx http2 deprecated 경고 해결 ([2fd9c75](2fd9c75)) * PendingView 내에서 ShareButton 을 렌더링 하지 않도록 수정 ([7bc3e12](7bc3e12)) * 결과 페이지 맛집 이미지 기본 placeholder, 공유하기 toast 미노출 ([#68](#68)) ([3c80844](3c80844)) * 동시 배포 방지를 위한 concurrency 설정 추가 ([e9bfd52](e9bfd52)) * 모임 생성 퍼널 필드 상태 초기화 버그 수정 ([#64](#64)) ([3934066](3934066)), closes [#65](#65) * 모임 생성 폼 필드명 변경 (meetingDate → scheduledDate, location → region) ([#35](#35)) ([e90beed](e90beed)) * 배포 워크플로우에 GA4 환경 변수 추가 ([#73](#73)) ([835ae1f](835ae1f)) * 의견 수렴 페이지 내 UI 수정 및 인터렉션 개선 ([#36](#36)) ([a74f7da](a74f7da)) * 의견 수합 Form Capacity 폴링 제거 및 ErrorCode 타입 시스템 추가 ([#67](#67)) ([d55dba1](d55dba1)) * 인원 수 선택 Grid 및 의견 수렴 QA 수정 사항 반영 ([f01626e](f01626e)) * 테스트 용으로 추가했던 페이지 제거 및 icons 폴더 추가 ([4116025](4116025)) ### Code Refactoring * Button 컴포넌트 스펙을 Figma 명세에 맞춰 수정 ([#14](#14)) ([2e27f17](2e27f17)) ### Build System * Docker 빌드 시 NEXT_PUBLIC 환경변수 주입 프로세스 추가 ([#47](#47)) ([88ba163](88ba163)) ### Documentation * 프로젝트 개발 가이드 문서 추가 ([#84](#84)) ([4313145](4313145))
🎯 PR 제목
Toast 컴포넌트 및 유틸 함수 추가
📑 작업 상세 내역
sonner라이브러리 설치 (v2.0.7)AlertCircleIcon컴포넌트 추가IconBase를 기반으로 구현Toaster컴포넌트 추가sonner의Toaster를 래핑한 컴포넌트offset,mobileOffset,gap,toastOptionsprops 지원bottom-center, 기본 duration: 3000mstoast.warning()유틸 함수 추가AlertCircleIcon을 아이콘으로 사용app/layout.tsx에Toaster컴포넌트 통합{ bottom: 80 }{ bottom: 150 }app/_test/ToastTest.tsx테스트 컴포넌트 추가🙏 리뷰 요청 사항
toast.warning()외에 다른 타입의 toast (success, error 등)가 필요한지 검토 부탁드립니다Toaster컴포넌트의 props 타입 정의가 적절한지 확인 부탁드립니다추가 변경사항
format스크립트에app디렉터리 추가ToastTest컴포넌트 제거layout.tsx에서Toaster컴포넌트 제거page.tsx테스트용 UI 코드 정리eslint-config-prettier,eslint-plugin-prettier설치📃 참고 자료
🖼️ 작업 결과물