Skip to content

fix: 알림 토스트 상품명 말줄임 적용 - #696

Merged
iOdiO89 merged 2 commits into
devfrom
fix/toast-one-line
Sep 21, 2026
Merged

iOdiO89 merged 2 commits into
devfrom
fix/toast-one-line

Conversation

@iOdiO89

@iOdiO89 iOdiO89 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

작업 요약

  • 알림 토스트에서 상품명만 화면 너비에 맞춰 줄여 항상 한 줄로 노출
  • 토스트 콘텐츠 영역 축소 허용

작업 세부 내용

메시지 구성 전환

대상 이전 이후
토스트 메시지 제목 + 본문 한 문자열 제목·본문 분리 노드
긴 상품명 두 줄 줄바꿈 남는 너비까지 노출 후 말줄임
고정 문구 (아이템 등록이 완료되었습니다.) 줄바꿈에 밀림 항상 전체 노출
  • 제목에 truncate, 본문에 shrink-0
    • 원인: 가변 길이는 상품명 하나뿐
    • 결과: JS 측정 없이 브라우저 레이아웃이 계산해 너비 변화에 즉시 반응

콘텐츠 영역 축소 허용

  • sonner [data-content]min-width: 0 없음
    • 결과: 플렉스 아이템이 안 줄어 말줄임이 동작하지 않음
  • Toaster classNames.contentmin-w-0 추가

확장자 변경

  • hooks/useNotificationSSE.ts.tsx 로 리네임
    • 원인: 토스트 메시지를 JSX 노드로 구성
    • 사용처는 확장자 없는 경로라 영향 없음
    • 결과: buildToastMessage 외 diff 없음

스크린샷

스크린샷 2026-09-21 오전 11 26 21

Summary by CodeRabbit

  • 개선 사항
    • 알림 토스트가 한 줄로 표시되도록 개선했습니다.
    • 화면 너비가 좁을 때 알림 제목이 자동으로 생략되어 레이아웃이 깨지지 않습니다.
    • 알림 본문이 토스트 영역을 침범하지 않도록 표시 방식을 조정했습니다.

- 제목·본문을 분리해 제목만 truncate, 본문은 shrink-0
  - 원인: 가변 길이는 상품명 하나
- Toaster content 에 min-w-0 추가
  - 원인: sonner [data-content] 에 min-width 0 없어 플렉스 아이템이 안 줄어듦
- useNotificationSSE.ts 를 .tsx 로 리네임
  - 원인: 토스트 메시지를 JSX 노드로 구성
@iOdiO89 iOdiO89 self-assigned this Sep 21, 2026
@vercel

vercel Bot commented Sep 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
piki Ready Ready Preview Sep 21, 2026 2:50am UTC
1 Skipped Deployment
Project Deployment Actions Updated
piki-notify Skipped Skipped Sep 21, 2026 2:50am UTC

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 8c1ba21a-29c5-493d-870c-3cf9ddf285ca

📥 Commits

Reviewing files that changed from the base of the PR and between 4eb9c7e and 6068870.

📒 Files selected for processing (2)
  • apps/web/src/components/toast/index.tsx
  • apps/web/src/hooks/useNotificationSSE.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

토스트 콘텐츠가 flex 레이아웃에서 축소되도록 설정했습니다. 알림 메시지는 제목을 필요한 경우 축약하고 본문을 한 줄로 유지하는 React 요소로 변경했습니다.

Changes

토스트 표시

Layer / File(s) Summary
토스트 한 줄 렌더링
apps/web/src/hooks/useNotificationSSE.tsx, apps/web/src/components/toast/index.tsx
buildToastMessage가 제목에 truncate를 적용하고 본문을 축소하지 않는 flex 요소를 반환합니다. 토스트 콘텐츠에는 min-w-0을 추가했습니다.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: kanghaeun

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 알림 토스트의 상품명 말줄임 처리라는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@vercel
vercel Bot temporarily deployed to Preview – piki-notify September 21, 2026 02:48 Inactive
@iOdiO89
iOdiO89 merged commit feae85f into dev Sep 21, 2026
7 checks passed
@iOdiO89
iOdiO89 deleted the fix/toast-one-line branch September 21, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Something isn't working WEB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants