[AA-7252] Fixed image height calculation when mixed with inline elements #23
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.
Summary
이미지와 텍스트/링크가 마크다운에서 빈 라인 없이 함께 작성될 때 발생하는 렌더링 문제를 수정
Problem
문제 1: 이미지 높이 오류
위와 같이 빈 라인 없이 작성하면 cmark-gfm이 하나의 paragraph로 파싱하고, ImageView 초기화가 실패하여 InlineText로 폴백됨.
이 경우 이미지가 화면 전체 높이로 잘못 렌더링됨.
문제 2: 과도한 간격
문제 1을 해결해도 이미지와 텍스트 사이에 테마의 마진 설정으로 인해 과도한 간격이 생김.
Solution
1. 혼합 콘텐츠 감지
2. CompactImageView 구현
SendbirdNetworkImage를 직접 사용하여 ResizeToFit 우회하고 GeometryReader의 추가 공간 생성 문제를 해결
3. 테마 독립적인 간격 조정
Result
Before
After
Technical Details
주요 변경사항
ParagraphView.swift
호환성
기존 동작 유지
Ticket
Changelog