Bug: UIKit PreviewBlock cover image tiles repeatedly and stretches across viewport when zoomed out
Maintainers usually reply within 1 day
@swarnendusahu10-dotcom is already working on this.
Since Dec 1, 2026.
- #1481 by @swarnendusahu10-dotcom — open
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- css, javascript, react
- Domain
- frontend
Research direction
Find the MessageGenericPreview and MessageGenericPreviewCoverImage components and read how they set the preview card width and cover image styles. Set the card’s maximum width to 368px and make the cover image render once, centered and scaled to cover. Verify the preview stays compact and the image does not tile on a wide viewport or at reduced browser zoom.
Written by the indexing model from the issue text.
Description
Description
When a message contains a UIKit preview block (for example, a GitHub PR/issue link preview generated by a Rocket.Chat App), EmbeddedChat renders the preview card across the full width of the chat and repeats/tiles the cover image both horizontally and vertically—especially noticeable on wide viewports or when zooming out (e.g., 50% or 25% browser zoom).
Steps to Reproduce
- Open EmbeddedChat in a channel containing a GitHub PR/issue preview block (e.g.,
#community-chat-any-topic). - View the message on a wide screen or zoom the browser out to 50% / 25%.
- Observe the link preview image.
Expected Behavior
The preview card should remain a compact card (max-width: 368px, matching Rocket.Chat's UI) and the cover image should render once, scaled cleanly (background-repeat: no-repeat, background-size: cover, background-position: center).
Actual Behavior
MessageGenericPreviewhas nomax-widthconstraint, causing the card to stretch to the full message container width.MessageGenericPreviewCoverImagesetsbackground-image: url(...)withoutbackground-repeat: no-repeat,background-size: cover, orbackground-position: center, causing the image to tile repeatedly across the expanded container.
Screen Recording / Screenshots
https://github.com/user-attachments/assets/2ba85987-9b37-4908-97e6-471cec17d512
- Dominant language
- JavaScript
- Stars
- 171
- Forks
- 421
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/EmbeddedChat
-
Bug: username fallback in updateUserUsername never runs since the ddp-client migrationPossibly taken @MuhammadFaizan-prog claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RocketChat/EmbeddedChat#1489 ·
Maintainers usually reply within 1 day
-
[Bug]: Low contrast on color swatch borders in Theme Lab (Layout Editor)Possibly taken @yashsarvaiya45 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
RocketChat/EmbeddedChat#1486 ·
Maintainers usually reply within 1 day
-
bug(api): _doConnect swallows connection/auth errors and marks failed sessions as authenticatedPossibly taken @ashwanisingh011 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
RocketChat/EmbeddedChat#1484 ·
Maintainers usually reply within 1 day
-
Bug: White screen crash (`Cannot read properties of undefined (reading 'members')`) when rendering UserMention outside MarkupInteractionContextPossibly taken @swarnendusahu10-dotcom claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RocketChat/EmbeddedChat#1482 ·
Maintainers usually reply within 1 day
-
ug(react): guard against null childElement in MessageAggregator setJumpToMessagePossibly taken @Suraj704-glitch claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RocketChat/EmbeddedChat#1478 ·
Maintainers usually reply within 1 day
All issues in RocketChat/EmbeddedChat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
quasarframework/quasar#18614 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 65/100
microsoft/monaco-editor#5626 ·
Maintainers usually reply within 1 day
-
bug/1-unconfirmed kind/bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
521xueweihan/HelloGitHub#4714 ·