Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address repeated layout work and add regression coverage for inline-image wrapping.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes iOS inline-image positioning by relayouting attachments after the text view receives its actual dimensions.
Changes:
- Exposes the attachment relayout API.
- Triggers attachment positioning during
layoutSubviews.
| File | Summary | Review notes |
|---|---|---|
ios/EnrichedTextView.h |
Declares the attachment relayout API. | — |
ios/enrichedTextTextView/EnrichedTextTextView.mm |
Relayouts attachments after layout. | Limit repeated full relayouts to geometry changes and add regression coverage for inline-image wrapping after layout changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.

Summary
fixes #798
On iOS, rendered
EnrichedTextdid not relayout the attachments (inline images), after theTextViewknew its actual size. Any attachment relayout (preciselylayoutAttachmentsmethod call) was only carried out whentextView.frameandtextView.contentSizevalues were respectively{{0, 0}, {0, 0}}and{0, 0}.This caused inline images to not wrap correctly in
EnrichedText. Also images would disappear or be incorrectly positioned on layout changes - the issue described in #798All
EnrichedTextrelated e2e tests pass successfully.Test Plan
Add some inline images in the input, so they wrap around the lines and then push the text into the
EnrichedText. Images should wrap there identically.Screenshots / Videos
Inline images wrapping behavior:
Before:
After:
Bug reproduction provided in #798
Before:
Screen.Recording.2026-09-22.at.15.42.00.mov
After:
Screen.Recording.2026-09-22.at.15.36.01.mov
Compatibility
Checklist