Skip to content

Conversation

@YouD0313
Copy link
Collaborator

@YouD0313 YouD0313 commented May 1, 2025

구현내용

신고 알림 필터 수정, 답변 replier 추가 (문의 답변 추후 추가 예정)

연관이슈

close #265

Summary by CodeRabbit

  • 신규 기능

    • 문의 이미지 아래에 "클릭하면 이미지를 크게 볼 수 있습니다." 안내 메시지가 추가되었습니다.
    • 알림 목록에서 특정 알림 유형(알림필터ID 5)에 대해 경고 스타일이 적용됩니다.
  • 버그 수정

    • 문의 이미지 모달에서 스크롤이 가능하도록 개선되었습니다.
  • 스타일

    • 문의 이미지 및 메시지 영역의 레이아웃과 색상이 개선되었습니다.
    • 테마에 경고(warn) 색상이 추가되었습니다.
  • 리팩터링

    • 문의 이미지 및 메시지 관련 스타일 컴포넌트 구조가 정리되었습니다.
    • 알림 링크 및 삭제 버튼 조건이 개선되었습니다.
  • 기타

    • 헤더의 알림 벨 UI가 임시로 비활성화되었습니다.

@YouD0313 YouD0313 self-assigned this May 1, 2025
@YouD0313 YouD0313 linked an issue May 1, 2025 that may be closed by this pull request
2 tasks
@coderabbitai
Copy link

coderabbitai bot commented May 1, 2025

Walkthrough

이번 변경사항은 주로 알림(Notification) 기능과 문의(Inquiry) 이미지 표시 관련 UI 개선에 초점을 맞추고 있습니다. Header 컴포넌트에서 알림 벨 UI와 관련된 코드가 주석 처리되어 사용되지 않게 되었으며, 문의 이미지 영역은 새로운 컨테이너 및 메시지 추가로 구조가 변경되었습니다. 알림 모델과 스타일에도 경고(warn) 상태를 위한 속성 및 스타일이 추가되었습니다. 또한, 알림 목록 렌더링 로직이 수정되어 특정 필터에 따라 링크 및 경고 스타일이 다르게 적용됩니다.

Changes

파일/그룹 변경 요약
src/components/common/header/Header.tsx useNotification 훅과 알림 벨 UI 관련 코드 전체 주석 처리
src/components/mypage/ContentTab.tsx handleChangeId 함수 뒤 불필요한 공백 제거
src/components/mypage/activityLog/inquiries/inquiry/Inquiry.styled.ts 이미지 컨테이너, 메시지 래퍼 등 새로운 스타일 컴포넌트 추가 및 기존 스타일 수정/이름 변경
src/components/mypage/activityLog/inquiries/inquiry/Inquiry.tsx 이미지 영역 구조 변경, 메시지 추가, 모달 메시지 래퍼 이름 변경
src/components/mypage/notifications/all/All.styled.ts SpanNotification에 $warn prop 추가, 경고 상태일 때 스타일 분기 처리
src/components/mypage/notifications/all/All.tsx linkUrl에 replier 파라미터 추가, alarmFilterId 5일 때 경고 스타일 및 링크 미적용, 삭제 버튼 조건 변경
src/constants/customerService.ts INQUIRY_MESSAGE에 blowUpMessage 문자열 추가
src/models/alarm.ts Alarm 인터페이스에 replier, reCommentUserId 속성 추가
src/style/theme.ts ColorKey 타입과 defaultTheme에 warn 색상(#EC1E4F) 추가

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AllNotifications
    participant Router

    User->>AllNotifications: 알림 목록 조회
    AllNotifications->>AllNotifications: alarmFilterId, replier 등 확인
    alt alarmFilterId == 5
        AllNotifications-->>User: 경고 스타일로 메시지 표시 (링크 없음)
    else
        AllNotifications->>Router: linkUrl(replier 등)로 이동
        AllNotifications-->>User: 일반 알림 메시지(링크 포함) 표시
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
신고 필터 수정, 댓글&답변 필터 수정 (#265)

Possibly related PRs

Suggested labels

⛏기능, 🛠개선

Suggested reviewers

  • layout-SY

Poem

🐰
알림 벨은 잠시 쉬고,
문의 이미지는 크게 보여주고,
경고 색상 반짝이며
필터 따라 달라지는 알림의 길!
코드 숲 속에서 토끼는 방긋,
오늘도 UI는 한 뼘 더 예뻐졌네.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

🔭 Outside diff range comments (1)
src/components/common/header/Header.tsx (1)

54-73: 💡 Verification agent

🧩 Analysis chain

헤더의 알림 벨 UI 제거에 대한 설명이 필요합니다.

알림 벨 UI 전체가 주석 처리되었습니다. 이는 사용자 인터페이스와 사용자 경험에 중요한 변화를 가져올 수 있습니다.

다음 확인이 필요합니다:

  1. 알림 UI가 다른 곳으로 이동되었는지
  2. 이것이 PR 목표인 "신고 알림필터 수정"의 일부인지
  3. 사용자들이 어떻게 알림을 확인할 수 있는지에 대한 대체 방법이 있는지

🏁 Script executed:

#!/bin/bash
# 알림 관련 컴포넌트가 다른 곳에서 사용되는지 확인
echo "알림 관련 컴포넌트 사용 현황 확인:"
rg -A 3 "Notification" --type ts --type tsx

Length of output: 122


추가 검증을 위해 아래 스크립트를 실행해주세요.
알림 관련 컴포넌트 정의 및 사용 위치를 파악합니다.


🏁 Script executed:

#!/bin/bash
echo "1) Notification 컴포넌트 파일 위치 확인:"
fd --extension tsx Notification.tsx

echo "2) Notification 컴포넌트 정의 검색:"
rg "export .*Notification" -n

echo "3) Notification 컴포넌트 사용 검색:"
rg "<Notification" -n

echo "4) import Notification 검색:"
rg "import .*Notification" -n

echo "5) S.Alarm(헤더 알림) 사용 검색:"
rg "S\\.Alarm" -n

Length of output: 2613


헤더 알림 아이콘 제거에 대한 설명 추가 필요

  • src/components/common/header/Notification/Notification.tsx 컴포넌트는 여전히 남아 있으나, 헤더(Header.tsx)에서 전체가 주석 처리되어 있습니다.
  • 실제 알림 내용은 src/routes/AppRoutes.tsx의 NotificationsAll(혹은 관련 NotificationsAppliedProjects 등) 페이지에서 확인할 수 있습니다.
  • 이 변경이 PR 목표인 “신고 알림 필터 수정” 의 일부인지, 또는 사용자에게 대체 알림 접근 경로(알림 페이지)로 안내하는 UI/네비게이션 추가가 필요한지 명확히 설명 부탁드립니다.
🧹 Nitpick comments (1)
src/components/mypage/notifications/all/All.styled.ts (1)

38-54: 가상 요소의 조건부 적용 로직이 복잡할 수 있습니다.

::after 가상 요소의 스타일을 경고 상태에 따라 조건부로 적용하는 부분이 다소 복잡합니다. 이 접근 방식은 작동하지만, 두 가지 다른 스타일드 컴포넌트로 분리하면 더 명확할 수 있습니다.

다음과 같이 두 개의 컴포넌트로 분리하는 방법을 고려해보세요:

-export const SpanNotification = styled.span<{
-  $enabled: boolean;
-  $warn: boolean;
-}>`
-  position: relative;
-  width: fit-content;
-  ${({ $warn, theme }) =>
-    $warn &&
-    css`
-      color: ${theme.color.warn};
-    `}
-  &::after {
-    ${({ $warn }) =>
-      !$warn &&
-      css`
-        content: '';
-        position: absolute;
-        left: 0;
-        bottom: -2px;
-        width: 100%;
-        height: 1px;
-        transform: scaleX(0);
-        transform-origin: left;
-        transition: transform 0.2s ease-in-out 0.1s;
-      `}
-    background: ${({ $warn, $enabled, theme }) =>
-      !$warn && $enabled ? theme.color.placeholder : '#000'};
-  }
-  &:hover::after {
-    transform: scaleX(1);
-  }
+const BaseSpanNotification = styled.span`
+  position: relative;
+  width: fit-content;
+`;
+
+export const SpanNotificationWarning = styled(BaseSpanNotification)<{
+  $enabled: boolean;
+}>`
+  color: ${({ theme }) => theme.color.warn};
+`;
+
+export const SpanNotification = styled(BaseSpanNotification)<{
+  $enabled: boolean;
+}>`
+  &::after {
+    content: '';
+    position: absolute;
+    left: 0;
+    bottom: -2px;
+    width: 100%;
+    height: 1px;
+    transform: scaleX(0);
+    transform-origin: left;
+    transition: transform 0.2s ease-in-out 0.1s;
+    background: ${({ $enabled, theme }) =>
+      $enabled ? theme.color.placeholder : '#000'};
+  }
+  &:hover::after {
+    transform: scaleX(1);
+  }
`;

이렇게 하면 조건부 로직이 줄어들고 각 컴포넌트의 역할이 더 명확해집니다.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c0e492 and 23dfcbe.

📒 Files selected for processing (9)
  • src/components/common/header/Header.tsx (4 hunks)
  • src/components/mypage/ContentTab.tsx (0 hunks)
  • src/components/mypage/activityLog/inquiries/inquiry/Inquiry.styled.ts (3 hunks)
  • src/components/mypage/activityLog/inquiries/inquiry/Inquiry.tsx (2 hunks)
  • src/components/mypage/notifications/all/All.styled.ts (2 hunks)
  • src/components/mypage/notifications/all/All.tsx (2 hunks)
  • src/constants/customerService.ts (1 hunks)
  • src/models/alarm.ts (1 hunks)
  • src/style/theme.ts (2 hunks)
💤 Files with no reviewable changes (1)
  • src/components/mypage/ContentTab.tsx
🧰 Additional context used
🧬 Code Graph Analysis (2)
src/components/mypage/activityLog/inquiries/inquiry/Inquiry.tsx (1)
src/constants/customerService.ts (1)
  • INQUIRY_MESSAGE (11-16)
src/components/mypage/notifications/all/All.tsx (1)
src/api/alarm.api.ts (1)
  • patchAlarm (24-36)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: accessibility-test
🔇 Additional comments (18)
src/constants/customerService.ts (1)

14-14: 사용자 친화적인 UI 메시지 추가에 대한 좋은 결정입니다.

이미지 확대 기능에 대한 안내 메시지를 추가하여 사용자 경험이 향상될 것입니다. 직관적인 메시지를 통해 사용자가 이미지와 상호작용하는 방법을 명확히 알 수 있게 됩니다.

src/models/alarm.ts (1)

24-25: 알람 모델 확장을 통한 기능 개선이 잘 이루어졌습니다.

replierreCommentUserId 속성을 옵셔널 필드로 추가하여 답변자와 대댓글 작성자 정보를 포함할 수 있게 되었습니다. 이는 PR 목표인 "답변 replier 추가"와 일치하며, 기존 코드와 호환성을 유지하면서 기능을 확장했습니다.

src/style/theme.ts (2)

12-13: 테마에 경고색 키 추가가 적절히 이루어졌습니다.

'warn' 색상 키를 타입 정의에 추가하여 타입 안전성을 유지했습니다. 경고 상태를 위한 시각적 피드백을 제공하는 데 필요한 변경사항입니다.


80-80: 경고 상태를 위한 적절한 색상 값이 설정되었습니다.

경고 메시지를 위한 선명한 붉은색(#EC1E4F)을 사용한 것은 시각적으로 주의를 끌기에 적합합니다. 알림 필터 수정 목적에 부합하는 색상 선택입니다.

src/components/common/header/Header.tsx (1)

19-19: 알림 훅 및 관련 기능의 주석 처리에 대한 의도 확인이 필요합니다.

useNotification 훅과 관련 상태 변수가 주석 처리되었습니다. 이는 알림 기능이 다른 곳으로 이동되거나 임시적으로 비활성화되었을 가능성을 시사합니다.

이 변경으로 인한 영향과 의도를 명확히 파악하기 위해 다음 사항을 확인해주세요:

  1. 알림 기능이 다른 위치에서 구현되었는지
  2. 이 변경이 임시적인지 혹은 영구적인지
  3. 사용자 경험에 어떤 영향을 미치는지

Also applies to: 28-28

src/components/mypage/notifications/all/All.styled.ts (2)

1-1: styled-components에서 css 헬퍼 추가는 적절합니다.

조건부 스타일 적용을 위해 css 헬퍼를 import한 것은 좋은 방법입니다. 이를 통해 조건부 스타일 블록을 더 깔끔하게 관리할 수 있게 되었습니다.


27-37: 경고 상태를 위한 스타일 확장이 잘 구현되었습니다.

$warn prop을 추가하여 경고 상태에 따른 조건부 스타일링이 가능하도록 하였습니다. 경고 메시지의 시각적 차별화를 위한 스타일 코드가 잘 작성되었습니다.

src/components/mypage/notifications/all/All.tsx (3)

16-29: linkUrl 함수의 라우팅 로직 개선

replier 매개변수를 추가하여 알림 유형(filter)에 따라 다른 경로로 라우팅하는 기능이 향상되었습니다. 특히 문의나 신고(filter가 1 또는 3)일 때 replier가 3인 경우 /activity-log/inquiries 페이지로 이동하도록 하는 조건부 로직이 잘 구현되었습니다.

주석에서 언급된 "문의, 신고 답변시 추후 수정" 내용이 구현된 것으로 보입니다.


57-77: 신고 알림에 대한 UI 처리 로직 개선

신고 알림(alarmFilterId가 5인 경우)을 다른 알림과 구분하여 처리하는 로직이 적절하게 구현되었습니다. 신고 알림은 링크로 이동하지 않고 경고 스타일($warn)을 적용하여 시각적으로 구분되도록 했습니다.

조건부 렌더링을 사용하여 알림 유형에 따라 다른 UI를 보여주는 접근 방식이 깔끔합니다.


78-85: 삭제 버튼 표시 조건 수정

신고 알림(alarmFilterId가 5인 경우)에 대해 삭제 버튼을 표시하지 않도록 조건이 수정되었습니다. 이는 신고 알림의 특성을 고려한 적절한 변경입니다.

이전에는 alarmFilterId가 4인 경우에 대한 조건이었는데, 5로 변경된 것으로 보입니다. 이는 신고 알림에 대한 일관된 처리를 보장합니다.

src/components/mypage/activityLog/inquiries/inquiry/Inquiry.tsx (2)

35-54: 이미지 표시 구조 개선 및 사용자 안내 메시지 추가

이미지 표시 섹션의 구조가 개선되었습니다. 새로운 S.InquiryImgContainer를 사용하여 이미지 컨테이너를 감싸고, 각 이미지는 개별 S.ImgWrapper로 래핑되었습니다. 또한 사용자에게 "클릭하면 이미지를 크게 볼 수 있습니다"라는 안내 메시지를 추가하여 사용자 경험을 향상시켰습니다.

이러한 구조 변경은 UI의 계층 구조를 명확히 하고 사용자에게 더 나은 안내를 제공합니다.


66-68: 모달 메시지 래퍼 이름 변경

모달 메시지 래퍼 컴포넌트의 이름이 S.ModalImgButtonWrapper에서 S.ModalImgMessageWrapper로 변경되었습니다. 이는 컴포넌트의 실제 역할(메시지 표시)을 더 정확히 반영하는 이름입니다.

이름 변경은 코드의 가독성과 유지보수성을 향상시킵니다.

src/components/mypage/activityLog/inquiries/inquiry/Inquiry.styled.ts (6)

34-37: 새로운 이미지 컨테이너 스타일 컴포넌트 추가

새로운 InquiryImgContainer 스타일 컴포넌트가 추가되었습니다. 이 컴포넌트는 flex 레이아웃을 사용하여 이미지와 메시지를 세로로 배치하는 역할을 합니다.

이 스타일 컴포넌트의 추가는 Inquiry.tsx 파일에서의 구조 변경과 일치하며, UI 레이아웃을 개선합니다.


39-44: 이미지 래퍼 스타일 개선

InquiryImgWrapper 스타일 컴포넌트에 width: fit-content 속성이 추가되었습니다. 이는 이미지 래퍼의 너비가 내용에 맞게 조정되도록 하여 레이아웃을 개선합니다.

이 변경은 이미지 표시 영역의 시각적 품질을 향상시킵니다.


46-46: 개별 이미지 래퍼 스타일 컴포넌트 추가

새로운 ImgWrapper 스타일 컴포넌트가 추가되었습니다. 비록 현재는 비어 있지만, 향후 개별 이미지 래퍼에 대한 스타일을 추가할 수 있는 확장성을 제공합니다.

이는 Inquiry.tsx에서의 구조 변경과 일치합니다.


52-54: 사용자 안내 메시지 스타일 컴포넌트 추가

새로운 MessageWrapper 스타일 컴포넌트가 추가되었습니다. 이 컴포넌트는 작은 글꼴 크기(0.8rem)를 사용하여 이미지 아래에 표시되는 사용자 안내 메시지의 스타일을 지정합니다.

이는 Inquiry.tsx에서 추가된 사용자 안내 메시지를 위한 적절한 스타일링입니다.


69-69: 모달 이미지 컨테이너에 오버플로 스크롤 추가

ModalImgContainer 스타일 컴포넌트에 overflow: auto 속성이 추가되었습니다. 이는 모달 내용이 화면 크기를 초과할 경우 스크롤이 가능하도록 하여 사용자 경험을 개선합니다.

큰 이미지를 볼 때 특히 유용한 개선사항입니다.


84-90: 모달 메시지 래퍼 이름 변경 및 스타일 유지

ModalImgButtonWrapperModalImgMessageWrapper로 이름이 변경되었습니다. 이 컴포넌트는 모달 내의 메시지를 위한 스타일을 정의하며, 흰색 텍스트와 네이비 배경색, 약간의 패딩을 가지고 있습니다.

이름 변경은 Inquiry.tsx 파일의 변경사항과 일치하며, 컴포넌트의 실제 역할을 더 정확히 반영합니다.

@YouD0313 YouD0313 added the 🛠개선 성능 개선/리팩토링에 대한 라벨 label May 2, 2025
@YouD0313 YouD0313 merged commit 67785c3 into develop May 2, 2025
4 checks passed
@YouD0313 YouD0313 deleted the feat/#265 branch May 2, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠개선 성능 개선/리팩토링에 대한 라벨

Projects

None yet

Development

Successfully merging this pull request may close these issues.

알림 기능 추가 구현

3 participants