a2ui-project / a2ui-project/a2ui

React (v0.9) basic catalog `Image` distorts when placed in a flex `Row`

Offen Anfängerfreundlich
#1,297 1 Kommentar 1 Reaktion 1 zugewiesene Person Beansprucht von @ditman Auf GitHub ansehen
component: react renderer P2 type: bug type: feature/enhancement
Vorherrschende Sprache
TypeScript
Sterne
16.4k
Forks
1.3k
Ø Merge
3 T. 15 Std.
Gemergte PRs (30 T.)
134

Beschreibung

Running the react shell with restaurant finder, the images rendered inside card layouts appear visibly stretched/squished--pixels are scaled non-uniformly to match the row's height.

## Repro steps

1. Run the restaurant-finder agent (`samples/agent/adk/restaurant_finder`).
2. Run the React shell (`samples/client/react/shell`).
3. Open the app at `http://localhost:5003/` and submit any prompt (or use `?mock=true` to skip the agent call).
4. Observe the restaurant photos in the result cards.

Image

## Root cause

The basic catalog's `Row` defaults to `align-items: stretch`, so any flex child gets stretched to the row's height. The React `Image` renders a bare `` whose default `objectFit` is `'fill'`, causing the image to scale non-uniformly along the stretched axis.

Related: https://github.com/google/A2UI/issues/1298

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Look at the basic catalog's `Row` component and its default `align-items: stretch` style. The React `Image` component renders an `` with default `objectFit: 'fill'`. The fix likely involves adjusting the `Image` component's style or the `Row`'s alignment for these images. Start by running the restaurant-finder agent and React shell to reproduce the issue, then modify the relevant component files in the samples/client/react directory.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
react, typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Ruhig
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
70/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.