a2ui-project / a2ui-project/a2ui

Fix Modal implementation

Offen
#1,837 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
component: genui component: standard catalog specification P2 status: first-line-handled
Vorherrschende Sprache
TypeScript
Sterne
16.4k
Forks
1.3k
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
134

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.