Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
One or more issues must be addressed before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Clamps oversized inline images on iOS and Android to available content width and adds Maestro coverage for wrapping behavior.
Changes:
- Scales image attachment bounds and overlay frames on iOS.
- Propagates container width to Android image spans.
- Adds EnrichedText and EnrichedTextInput Maestro flows.
| File | Description |
|---|---|
| ios/utils/AttachmentLayoutUtils.mm | Updated as part of this pull request. |
| ios/interfaces/ImageAttachment.mm | Updated as part of this pull request. |
| android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt | Updated as part of this pull request. |
| android/src/main/java/com/swmansion/enriched/text/MeasurementStore.kt | Updated as part of this pull request. |
| android/src/main/java/com/swmansion/enriched/text/EnrichedTextView.kt | Updated as part of this pull request. |
| android/src/main/java/com/swmansion/enriched/common/spans/EnrichedImageSpan.kt | Updated as part of this pull request. |
| .maestro/enrichedText/flows/image_wrap.yaml | Updated as part of this pull request. |
| .maestro/enrichedInput/flows/image_width_clamping.yaml | Updated as part of this pull request. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ping down the image dimensions
szydlovsky
reviewed
Oct 12, 2026
Base automatically changed from
@ksienkiewicz/fix-ios-enriched-text-img-relayout
to
main
October 12, 2026 10:51
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
Closes #797
When the image's
widthwas exceeding the available horizontal space in the container's view, it lead to unwanted behavior on both mobile platforms.Android:
EnrichedText, it did not renderEnrichedTextandEnrichedTextInputiOS:
EnrichedTextthe width-exceeding images did not wrap properly and overflowed the container horizontallyEnrichedTextInputthe width-exceeding image was cut to the container's widthAdded a relevant e2e test suite that checks both clamping and wrapping inside both components.
Test Plan
Add some inline images width dimensions exceeding the container's ones. The image should be scaled down properly. Put them into a single paragraph to see if they wrap correctly.
Screenshots / Videos
Used HTML:
EnrichedTextAndroid:
Before:
After:
iOS:
Before:
After:
EnrichedTextInputAndroid:
Before:
After:
iOS:
Using HTML:
Before:
After:
Compatibility
Checklist