[CSM Portal Microapp] Fit inline comment images to the screen width - #1169
Merged
Rashmika998 merged 1 commit intoJul 18, 2026
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated sanitized comment HTML styling so embedded images fit the microapp viewport, preserve their aspect ratio, and render consistently as block elements. ChangesComment image layout
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Rashmika998
approved these changes
Jul 18, 2026
Rashmika998
merged commit Jul 18, 2026
c3ea4ee
into
wso2-open-operations:dev-app-csm-portal
2 checks passed
This was referenced Aug 5, 2026
Merged
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.
Purpose
Images embedded in a case's comment history (Activities feed) overflow the microapp's narrow viewport instead of fitting within its margins.
Goals
Constrain inline comment images to the screen width, same as any other responsive image.
Approach
CommentBody.tsxsanitizes and renders comment HTML viadangerouslySetInnerHTML, styled throughHTML_CONTENT_SX(paragraph spacing, link color, list indent). That style object had no rule for<img>, so an embedded image rendered at its original (often desktop-sized) dimensions. Added& img: { maxWidth: "100%", height: "auto", display: "block" }so images scale down to fit their container.Checked
CaseActivityFeed.tsxto confirmCommentBodyis the only place in the Activities feed that renders HTML/images — attachment entries only show a filename/icon with no thumbnail, so there's no other overflow path in that feed.User stories
As a user viewing a case's activity history in the CSM microapp, an image embedded in a comment fits within the screen instead of overflowing the page horizontally.
Release note
Images embedded in case comments now fit the screen width in the CSM microapp's Activities feed.
Documentation
N/A — in-app UI fix only, no documentation impact.
Automation tests
Security checks
Test environment
Local Vite dev server, Chrome.
Summary by CodeRabbit