Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/anony #520

Merged
merged 20 commits into from
Dec 2, 2024
Merged

Feat/anony #520

merged 20 commits into from
Dec 2, 2024

Conversation

hye1ee
Copy link
Contributor

@hye1ee hye1ee commented Nov 28, 2024

요약 *

#504 이슈 기반으로 아래 내역 작업 진행

  • 익명 채팅 전송 옵션 UI
  • 익명 메세지 전송 로직
  • 채팅창 일부 UI 수정 (스크롤바, 날짜 변경선)
  • 로그아웃 모달 UI 수정 (본 pr과 관련 없는 업데이트지만, 한번에 리뷰할 수 있도록 본 브랜치에서 작업함)

스크린샷

Screenshot 2024-11-29 at 2 18 20 AM

이후 Task *

  • 없음

@hye1ee hye1ee linked an issue Nov 28, 2024 that may be closed by this pull request
2 tasks
Copy link

netlify bot commented Nov 28, 2024

Deploy Preview for biseo-preview ready!

Name Link
🔨 Latest commit 46b3381
🔍 Latest deploy log https://app.netlify.com/sites/biseo-preview/deploys/674d93030945750008e22edc
😎 Deploy Preview https://deploy-preview-520--biseo-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

</BubbleItem>
)}
</div>
<div css={sendIconStyle}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

현재 button icon만 존재하고 onClick() 함수가 정의 되어있지 않습니다.

따라서 채팅에서 send 버튼 눌러도 보내지지 않고 Enter를 눌러야지만 보내집니다

isAdmin: false,
displayName: "익명",
username: "익명",
};
Copy link
Collaborator

@MinjaeKimmm MinjaeKimmm Dec 2, 2024

Choose a reason for hiding this comment

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

프론트에서 MessageType enum (interface/chat/common.ts)에서
export const MessageType = z.enum([
"message",
"notice",
"anonymous",
"adminnotice"
]);

이렇게 4가지 타입이 정의되어 있습니다

이번에 anonymous 추가하면서 4번째가 추가되었다고 보실 수 있습니다.

기존에 anonymous가 없을때 send하면 항상 "message" type으로 다시 돌려줄 수 있었는데 이제 anonymous 타입을 추가했으니 프론트엔드에서는

  1. 일반 메시지면 type: "message"
  2. 익명 메시지면 type: "anonymous"

를 기대하고 있습니다.

따라서 지금 현재 백엔드 코드 (sendQuery)에서는
type: "message" 즉 익명이든 아니든 무조건 type을 메시지로 돌려주고 있어서 프론트랑 백에서 싱크가 되지 않습니다.

type: type로 해서 dynamic하게 바꿔주는걸 추천합니다.

Copy link
Collaborator

@rjsdn0 rjsdn0 left a comment

Choose a reason for hiding this comment

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

LGTM

@rjsdn0 rjsdn0 merged commit 893fbe7 into main Dec 2, 2024
5 checks passed
@rjsdn0 rjsdn0 deleted the feat/anony branch December 2, 2024 11:19
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.

익명 채팅 기능
4 participants