Bug: UIKit PreviewBlock cover image tiles repeatedly and stretches across viewport when zoomed out

Aperta Adatta ai principianti
#1,480 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@swarnendusahu10-dotcom ci sta già lavorando.

Dal 1/12/2026.

  • #1481 di @swarnendusahu10-dotcom — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css, javascript, react
Ambito
frontend

Direzione di ricerca

Trova i componenti MessageGenericPreview e MessageGenericPreviewCoverImage e leggi come impostano la larghezza della scheda di anteprima e gli stili dell’immagine di copertina. Imposta la larghezza massima della scheda a 368px e fai in modo che l’immagine di copertina venga visualizzata una sola volta, centrata e ridimensionata per coprire l’area. Verifica che l’anteprima resti compatta e che l’immagine non si ripeta a mosaico in un viewport ampio o con lo zoom del browser ridotto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
  1. Open EmbeddedChat in a channel containing a GitHub PR/issue preview block (e.g., #community-chat-any-topic).
  2. View the message on a wide screen or zoom the browser out to 50% / 25%.
  3. 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
  • MessageGenericPreview has no max-width constraint, causing the card to stretch to the full message container width.
  • MessageGenericPreviewCoverImage sets background-image: url(...) without background-repeat: no-repeat, background-size: cover, or background-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

Lingua principale
JavaScript
Stelle
171
Fork
421
Merge medio
3g 6h
PR unite (30g)
4

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RocketChat/EmbeddedChat

Tutte le issue di RocketChat/EmbeddedChat

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.