You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Web] PlaceDetailsCompact ignores horizontal orientation due to attribute/property casing mismatch #106
The Lit renderer converts the A2UI PlaceDetailsCompact.orientation value to the uppercase Maps JavaScript property enum, but then binds that value as an HTML attribute:
This produces orientation="HORIZONTAL". The Places UI Kit HTML API documents lowercase attribute values (orientation="horizontal"), while HORIZONTAL is the JavaScript property enum value. The component consequently falls back to its default vertical layout in this scenario.
This appears to have been introduced in commit f6dd90a. Before that change, the renderer hardcoded the lowercase HTML attribute orientation="horizontal".
Environment
@googlemaps/a2ui: 0.1.8
Web Lit renderer
Maps JavaScript API: v=alpha
One PlaceDetailsCompact component in the surface
Card container width: approximately 488 px
Reproduction
Render a component with an explicit horizontal orientation:
The Zod schema uses .default('horizontal'), so props.orientation ?? autoOrientation never reaches autoOrientation when the property is omitted. That conflicts with the comment saying a single sibling should default to vertical.
HTMLElementTagNameMap declares gmpx-place-details-compact, while the rendered element is gmp-place-details-compact.
The existing test only verifies the attribution ID and does not assert orientation forwarding or fallback behavior.
Activity
chrisjshull commentedon Sep 8, 2026
Very interesting. gmp-place-details-compact should ignore capitalization of
orientationwhen set via HTML.nilsingwersen commentedon Sep 9, 2026
Ohh yeah it works now for me. Maybe I had a caching issue