a2ui-project / a2ui-project/a2ui

Add built-in padding to the Core Catalog items

Đang mở
#1,844 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
component: genui component: standard catalog specification P2 status: first-line-handled
Ngôn ngữ chính
TypeScript
Star
16.4k
Fork
1.3k
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
134

Mô tả

_↴ Ported from [flutter/genui#562](https://github.com/flutter/genui/issues/562) — originally opened by [jacobsimionato](https://github.com/jacobsimionato) on 2025-11-19._
_Original labels: P2, front-line-handled, second-line-triaged, a: core_catalog_

---

A2UI intentionally doesn't not let the LLM choose padding. Instead, we the renderer is responsible for this.

Our core catalog items have no built-in padding, so everything looks bad in the simple chat app.

How about these rules:
- Leaf components (e.g. text, image etc) add padding around themselves on every dimension by default. They can be special cased via usage hints to not do this, e.g. a "header" image has no top or side padding, but does have bottom padding.
- Container components which render nothing add no padding (e.g. Row, Column etc)
- Container components which have a border (e.g. Card) add padding around themselves, but not around their children

---

### 2 comment(s) from the original issue

**[jacobsimionato](https://github.com/jacobsimionato)** commented on 2025-11-21:

See example of poor padding:

Image

---

**[jacobsimionato](https://github.com/jacobsimionato)** commented on 2026-01-21:

Downgrading to P2, because we decided that there are a couple of other more important steps to building out the standard catalog, so @andrewkolos probably won't get to it right away.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.