a2ui-project / a2ui-project/a2ui
Fix Modal implementation
- 主要言語
- TypeScript
- スター
- 16.4k
- フォーク
- 1.3k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 134
説明
_↴ Ported from [flutter/genui#504](https://github.com/flutter/genui/issues/504) — originally opened by [jacobsimionato](https://github.com/jacobsimionato) on 2025-11-10._
_Original labels: P2, front-line-handled, second-line-triaged, a: core_catalog_
---
It seems like we implemented Modal so that it accepts a child which should be a button, and then there's an undocumented protocol for the event that this button must emit to show the modal, and special cased logic in genui_surface.dart to handle it.
We should not have any of this special cased logic for specific catalog items in the core SDK code.
Instead, I think the entryPointChild of Modal should be like a "text" widget etc, and Modal itself should wrap it with a tap handler or button which triggers the modal.
---
### 2 comment(s) from the original issue
**[gspencergoog](https://github.com/gspencergoog)** commented on 2025-11-11:
In general, I think we need to think more about what "modal" use case is. Should it be a modal dialog? Should it be a bottom sheet? Should it be a menu? It feels ill-defined. Once we have a better handle on it, then it seems like we could make better decisions about how it should operate.
For your specific suggestion about `entryPointChild`, it makes me wonder how the LLM could make the button look like other buttons, if it, say, puts it in a row of chips.
I agree we shouldn't have any special-cased logic for specific items, though.
---
**[jacobsimionato](https://github.com/jacobsimionato)** commented on 2025-11-12:
Hey yes +1 about defining it better!
I think all those options you mentioned are interesting hints though they're more about rendering than usage.
There is also an interesting example of navigation in the "A2UI Customer Requirements" doc which could also maybe be handled by this component.
コントリビューションガイド
評価
この issue はまだ評価されていません。