a2ui-project / a2ui-project/a2ui

[FEATURE]: Rendered components should be traceable back to the A2UI Component

オープン
#2,434 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
P2
主要言語
TypeScript
スター
16.4k
フォーク
1.3k
平均マージ
2日 13時間
マージ済み PR(30日)
134

説明

In developing the [A2UI Composer](https://github.com/a2ui-project/composer), a few feature requests have come up where the user would want to select a rendered component and act on it.

The problem is, there's no way for us trace from a rendered component to the A2UI component it corresponds to.

I'm not sure how this would work in all cases, but at least for web-based renderers, if the outermost DOM element that represents the A2UI component had a `data-a2ui` property whose value is **exactly** the A2UI Component's ID, then that makes it easy. Not only is there a direct mapping, but its easy to query for DOM elements.

(For rendereed components which are from a "loop", then a few options are available; perhaps they all have the same `data-a2ui` value, with an additional `data-a2ui-instance` property to distinguish them? Or, depending on how they're rendered, perhaps there's a surrounding `div` or `span` that gets the `data-a2ui` property? Or, in the case of a list, maybe the `ol` or `ul` element gets the `data-a2ui`? Options :-))

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

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

評価

この issue はまだ評価されていません。

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

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