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: 매칭 채팅 UI 구현 #45

Merged
merged 17 commits into from
Jan 19, 2025
Merged

Conversation

woneeeee
Copy link
Collaborator

@woneeeee woneeeee commented Jan 17, 2025

1. 무슨 이유로 코드를 변경했나요?

매칭 채팅 UI를 구현하였습니다.

2. 어떤 위험이나 장애를 발견했나요?


3. 관련 스크린샷을 첨부해주세요.

image image

4. 완료 사항


5. 추가 사항

src/components/chat/MessageList.tsx 이 부분에서 현재 api 연결 로직 부분은 다 주석 처리 후 mockMessage를 넣어서 현재 UI만 먼저 구현하였습니다. 그래서 보실때 주석 처리된 부분은 다음 api 연결 이슈에서 다시 수정할 예정이라 그냥 무시하시고 봐주세요😅 저 부분 코드가 길어보이지만 mock 삭제하고 api 연결 로직 부분 무시하시면 막상... 많이 없습니다 ㅎㅎ... 그리고 src/libs/apis/chat/MessageList.api.ts 이 부분도 무시하시고 봐주세요... 머지 후 api 연결 이슈에서 다시 수정할 예정입니당...

그리고 새로 나온 모달 UI는 새로운 이슈파서 다 구현하도록 하겠습니다!

@woneeeee woneeeee added fix fix design css labels Jan 17, 2025
@woneeeee woneeeee requested a review from WooGi1020 January 17, 2025 07:37
@woneeeee woneeeee self-assigned this Jan 17, 2025
@woneeeee woneeeee linked an issue Jan 17, 2025 that may be closed by this pull request
Copy link

구현 기능 확인하기: https://gachtaxi-h2u5szaal-cogis-projects.vercel.app

Copy link

구현 기능 확인하기: https://gachtaxi-m8dqya8v9-cogis-projects.vercel.app

Copy link
Collaborator

@WooGi1020 WooGi1020 left a comment

Choose a reason for hiding this comment

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

정말 고생하셨습니다!! 새로 나온 모달 UI가 택시호출할떄 쓰는거 말씀하시는 거면 디자이너분들한테 여쭤봐서 그냥 하나의 모달로 통일하는 것도 괜찮은거 같아요 😊
만약 된다면 제가 약관 동의페이지 구현할 때 모달을 전역으로 만들어놔서 그냥 거기에 UI만 추가해주시면 될겁니다 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

제가 알기론 아마 책임분배의 원칙이라고 해서 함수뿐 아니라 파일도 전역적인 함수가 두개 이상 있으면 안된다..? 까진 아니고 분리하는게 좀 국룰인걸로 알아요!! 요건 폴더링하셔서 index.tsxMenuItem.tsx로 나누시는것도 좋을 것 같습니다!

import CancelMatching from '@/assets/icon/cancelMatching.svg?react';
import CloseMatching from '@/assets/icon/closeMatching.svg?react';

const menuItems = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

시간 되실때 상수 분리해주세요 😊😊😊


return (
<>
<div className="h-[55px] flex items-center gap-2 p-4">
Copy link
Collaborator

Choose a reason for hiding this comment

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

아마 요 부분은 부모로부터 width가 종속되는거면 모바일 뷰에서는 양옆이 짤리는 느낌으로 보일 수도 있을 것 같아요..!! 확인 한번 해보시구 만약 그렇다면 NavBar 컴포넌트 스타일처럼 fixedabsolute 사용해서 아예 루트에 종속되도록 해서 꽉 채우게 하는것도 좋을 것 같습니다!

{showMenu ? <ChatX /> : <ChatPlus />}
</button>

<input
Copy link
Collaborator

Choose a reason for hiding this comment

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

저희 바텀메뉴가 높이가 별로 크지 않아서 포커싱을 유지하는 상태로 바텀메뉴를 열수 있게 하는것도 괜찮을 것 같기도 하고... 요 부분은 다같이 말해봐도 좋겠네요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

채팅방 배열 나눠서 사람별로 구분하는거 어려우셨을 텐데 고생 많으셨습니다 😁👍

msg.senderName.trim() === '나' ? 'justify-end' : 'justify-start'
} mb-4`}
>
{msg.senderName.trim() === '나' ? (
Copy link
Collaborator

Choose a reason for hiding this comment

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

요 놈들도 따로 분리해주는 것도 좋겠네요!!

...(lastMessageTimeStamp && { lastMessageTimeStamp }),
}).toString();

const response = await fetch(`/api/chat/${roomId}/messages?${queryParams}`, {
Copy link
Collaborator

Choose a reason for hiding this comment

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

아직 웹소켓을 사용하지 않으신거라 충돌이 있을지는 잘 모르겠는데 웹소켓 로직 자체를 떠나서 애초에 fetch를 사용하는 거면 axios 활용해도 괜찮을 것 같다는 생각이 드네요...??

<div className="sticky top-0 bg-[#011A11]">
<BackButton />
<div className="flex h-[48px] items-center">
<h1 className="font-bold text-header">채팅방</h1>
Copy link
Collaborator

Choose a reason for hiding this comment

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

요것도 국룰같은 느낌이긴한데 접근성 측면에서 h1 태그는 페이지당 하나만 있는게 좋다고 합니다!! 알아두시면 좋을 것 같아요 😁그래서 단순히 숫자를 표현하는 태그는 span도 좋을 것 같습니다요!!

@WooGi1020
Copy link
Collaborator

정말 고생하셨습니다!! 새로 나온 모달 UI가 택시호출할떄 쓰는거 말씀하시는 거면 디자이너분들한테 여쭤봐서 그냥 하나의 모달로 통일하는 것도 괜찮은거 같아요 😊 만약 된다면 제가 약관 동의페이지 구현할 때 모달을 전역으로 만들어놔서 그냥 거기에 UI만 추가해주시면 될겁니다 👍

디자이너분께 여쭤봤는데 모달 디자인 통일해서 사용해도 좋다고 하시네요!!

Copy link

구현 기능 확인하기: https://gachtaxi-dc2ljsoud-cogis-projects.vercel.app

Copy link

구현 기능 확인하기: https://gachtaxi-qo3agdl8o-cogis-projects.vercel.app

@woneeeee woneeeee requested a review from WooGi1020 January 19, 2025 08:24
Copy link

구현 기능 확인하기: https://gachtaxi-839bqdgd2-cogis-projects.vercel.app

@woneeeee woneeeee merged commit 1781749 into main Jan 19, 2025
1 check passed
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.

feat: 매칭 채팅 UI 구현
2 participants