-
Notifications
You must be signed in to change notification settings - Fork 3
fix: 채팅 프로필 이미지 찌그러짐 수정 #531
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,14 +180,14 @@ const ChatMessageBox = ({ | |
| }; | ||
|
|
||
| return isMine ? ( | ||
| <div className="flex justify-end"> | ||
| <div className="flex max-w-xs flex-row-reverse gap-2"> | ||
| <div className="flex flex-col items-end"> | ||
| <div className="flex items-end gap-1"> | ||
| <span className="text-k-500 typo-regular-4">{formatTime(message.createdAt)}</span> | ||
| <div className="rounded-b-xl rounded-tl-xl bg-primary px-3 py-2 text-white"> | ||
| <div className="flex min-w-0 justify-end"> | ||
| <div className="flex max-w-[min(80%,24rem)] min-w-0 flex-row-reverse gap-2"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||
| <div className="flex min-w-0 flex-col items-end"> | ||
| <div className="flex min-w-0 items-end gap-1"> | ||
| <span className="shrink-0 text-k-500 typo-regular-4">{formatTime(message.createdAt)}</span> | ||
| <div className="min-w-0 rounded-b-xl rounded-tl-xl bg-primary px-3 py-2 text-white"> | ||
| {shouldShowContent(messageType) && ( | ||
| <p className="whitespace-pre-line typo-regular-2">{message.content}</p> | ||
| <p className="whitespace-pre-line break-words typo-regular-2">{message.content}</p> | ||
| )} | ||
| {renderAttachments()} | ||
| </div> | ||
|
|
@@ -196,19 +196,19 @@ const ChatMessageBox = ({ | |
| </div> | ||
| </div> | ||
| ) : ( | ||
| <div className="flex justify-start"> | ||
| <div className="flex max-w-xs flex-row gap-2"> | ||
| <div className="flex min-w-0 justify-start"> | ||
| <div className="flex max-w-[min(100%,28rem)] min-w-0 flex-row gap-2"> | ||
| <ProfileWithBadge isMentor={isPartnerMentor} width={32} height={32} /> | ||
| <div className="flex flex-col items-start"> | ||
| <div className="flex min-w-0 flex-col items-start"> | ||
| <span className="mb-1 text-k-900 typo-medium-5">{partnerNickname}</span> | ||
| <div className="flex items-end gap-1"> | ||
| <div className="rounded-b-xl rounded-tr-xl bg-k-100 px-3 py-2 text-k-900"> | ||
| <div className="flex min-w-0 items-end gap-1"> | ||
| <div className="min-w-0 rounded-b-xl rounded-tr-xl bg-k-100 px-3 py-2 text-k-900"> | ||
| {shouldShowContent(messageType) && ( | ||
| <p className="whitespace-pre-line typo-regular-2">{message.content}</p> | ||
| <p className="whitespace-pre-line break-words typo-regular-2">{message.content}</p> | ||
| )} | ||
| {renderAttachments()} | ||
| </div> | ||
| <span className="text-k-500 typo-regular-4">{formatTime(message.createdAt)}</span> | ||
| <span className="shrink-0 text-k-500 typo-regular-4">{formatTime(message.createdAt)}</span> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting
shouldForceScrollToBottomRef.current = trueduringsendTextMessageleaves a sticky force-scroll state until the message list length increases. If the publish call succeeds locally but no message is appended (e.g., transient disconnect or server-side rejection), the next unrelated incoming message will still force-jump the user to bottom even when they are intentionally reading older history. This regression is introduced by the new force-scroll path and should be reset when no corresponding message append occurs.Useful? React with 👍 / 👎.