[FEAT] 채팅 메시지 버블/컴포저 UI 구현 및 버블 크기 동적 조절 - #17
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe
채팅 화면의 메시지 버블·컴포저 UI를 구현하고, 메시지 버블이 콘텐츠 길이에 맞춰 동적으로 크기가 조절되도록 개선했습니다.
Works made
.frame(maxWidth:)만으로는 부모 HStack의 공간 분배 방식에 따라 짧은 메시지에도 maxWidth까지 늘어나는 문제가 있어, 콘텐츠 intrinsic 너비와 maxWidth 중 작은 값을 직접 계산해 보고하도록 수정stripFractionalSeconds가 원본을 그대로 반환해 파싱이 통째로 실패하던 문제 수정Changes Made
As-Is
기존 로직
메시지 버블이 짧은 메시지에도 항상 maxWidth만큼 늘어나 보임. createdAt이 없어 타임스탬프도 표시되지 않았음.
To-BE
변경 로직
메시지 버블/컴포저 UI가 추가되었고, 버블은 콘텐츠 길이에 맞춰 짧으면 좁게, maxWidth를 넘으면 그 안에서 줄바꿈되도록 동작. 메시지마다 타임스탬프가 표시됨.
Additional context