a2ui-project / a2ui-project/a2ui

Add built-in padding to the Core Catalog items

オープン
#1,844 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
component: genui component: standard catalog specification P2 status: first-line-handled
主要言語
TypeScript
スター
16.4k
フォーク
1.3k
平均マージ
2日 13時間
マージ済み PR(30日)
134

説明

_↴ 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Find the core catalog items in the codebase, likely under a directory like 'core_catalog'. Examine how leaf components (text, image) and container components (Row, Column, Card) are currently rendered. The change involves modifying these components to add default padding based on the proposed rules. Look for existing styling or layout logic to understand where padding should be applied. Test changes in the simple chat app to verify the visual improvement.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
design, frontend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。